A Discrete-Event Network Simulator
ns3::TapBridgeFdReader Class Reference

Class to perform the actual reading from a socket. More...

#include "tap-bridge.h"

+ Inheritance diagram for ns3::TapBridgeFdReader:
+ Collaboration diagram for ns3::TapBridgeFdReader:

Private Member Functions

FdReader::Data DoRead (void)
 The read implementation. More...

Additional Inherited Members

- Public Member Functions inherited from ns3::FdReader
 FdReader ()
 Constructor. More...
virtual ~FdReader ()
 Destructor. More...
void Start (int fd, Callback< void, uint8_t *, ssize_t > readCallback)
 Start a new read thread. More...
void Stop (void)
 Stop the read thread and reset internal state. More...
- Public Member Functions inherited from ns3::SimpleRefCount< FdReader >
 SimpleRefCount ()
 Default constructor. More...
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
void Ref (void) const
 Increment the reference count. More...
void Unref (void) const
 Decrement the reference count. More...
- Protected Attributes inherited from ns3::FdReader
int m_fd
 The file descriptor to read from. More...

Detailed Description

Class to perform the actual reading from a socket.

Definition at line 42 of file tap-bridge.h.

Member Function Documentation

◆ DoRead()

FdReader::Data ns3::TapBridgeFdReader::DoRead ( void  )

The read implementation.

The value of m_len returned controls further processing. The callback function is only invoked when m_len is positive; any data read is not processed when m_len is negative; reading stops when m_len is zero.

The management of memory associated with m_buf must be compatible with the read callback.

A structure representing what was read.

Implements ns3::FdReader.

Definition at line 53 of file tap-bridge.cc.


+ Here is the call graph for this function:

The documentation for this class was generated from the following files: