diff -r 9724876b3ae1 -r 9dccf3624839 src/devices/tap-bridge/tap-bridge.h --- a/src/devices/tap-bridge/tap-bridge.h Thu Dec 30 16:04:47 2010 -0800 +++ b/src/devices/tap-bridge/tap-bridge.h Thu Dec 30 14:19:48 2010 -0800 @@ -31,11 +31,17 @@ #include "ns3/data-rate.h" #include "ns3/ptr.h" #include "ns3/mac48-address.h" -#include "ns3/system-thread.h" +#include "ns3/unix-fd-reader.h" #include "ns3/realtime-simulator-impl.h" namespace ns3 { +class TapBridgeFdReader : public FdReader +{ +private: + FdReader::Data DoRead (void); +}; + class Node; /** @@ -248,9 +254,9 @@ /** * \internal * - * Loop to read and process packets + * Callback to process packets that are read */ - void ReadThread (void); + void ReadCallback (uint8_t *buf, ssize_t len); /* * \internal @@ -262,7 +268,7 @@ * received from the host. * \param buf The length of the buffer. */ - void ForwardToBridgedDevice (uint8_t *buf, uint32_t len); + void ForwardToBridgedDevice (uint8_t *buf, ssize_t len); /** * \internal @@ -336,7 +342,7 @@ * The socket (actually interpreted as fd) to use to talk to the Tap device on * the real internet host. */ - int32_t m_sock; + int m_sock; /** * \internal @@ -357,10 +363,10 @@ /** * \internal * - * Used to identify the ns-3 read thread used to do blocking reads on the - * socket (fd) corresponding to the host device. + * Includes the ns-3 read thread used to do blocking reads on the fd + * corresponding to the host device. */ - Ptr m_readThread; + Ptr m_fdReader; /** * \internal