A Discrete-Event Network Simulator
API
File Descriptor Network Device

This section documents the API of the ns-3 fd-net-device module. More...

Classes

class  ns3::DpdkNetDevice
 a NetDevice to read/write network traffic from/into a Dpdk enabled port. More...
 
class  ns3::EmuFdNetDeviceHelper
 build a set of FdNetDevice objects attached to a physical network interface More...
 
class  ns3::FdNetDevice
 a NetDevice to read/write network traffic from/into a file descriptor. More...
 
class  ns3::FdNetDeviceFdReader
 This class performs the actual data reading from the sockets. More...
 
class  ns3::FdNetDeviceHelper
 build a set of FdNetDevice objects Normally we eschew multiple inheritance, however, the classes PcapUserHelperForDevice and AsciiTraceUserHelperForDevice are treated as "mixins". More...
 
class  ns3::NetDeviceQueueLock
 Network device transmission queue with lock. More...
 
class  ns3::NetmapNetDevice
 a NetDevice to read/write network traffic from/into a netmap file descriptor. More...
 
class  ns3::NetmapNetDeviceFdReader
 This class performs the actual data reading from the netmap ring. More...
 
class  ns3::NetmapNetDeviceHelper
 build a set of FdNetDevice objects attached to a physical network interface More...
 
class  ns3::TapFdNetDeviceHelper
 build a set of FdNetDevice objects attached to a virtual TAP network interface More...
 

Functions

static void ns3::AddPIHeader (uint8_t *&buf, size_t &len)
 Synthesize PI header for the kernel. More...
 
static void ns3::RemovePIHeader (uint8_t *&buf, ssize_t &len)
 Removes PI header. More...
 
void ns3::SendSocket (const char *path, int fd, const int magic_number)
 Send the file descriptor back to the code that invoked the creation. More...
 

Detailed Description

This section documents the API of the ns-3 fd-net-device module.

For a generic functional description, please refer to the ns-3 manual.

Function Documentation

◆ AddPIHeader()

static void ns3::AddPIHeader ( uint8_t *&  buf,
size_t &  len 
)
static

Synthesize PI header for the kernel.

Parameters
bufthe buffer to add the header to
lenthe buffer length
Todo:
Consider having a instance member m_packetBuffer and using memmove instead of memcpy to add the PI header. It might be faster in this case to use memmove and avoid the extra mallocs.

Definition at line 350 of file fd-net-device.cc.

Referenced by ns3::FdNetDevice::SendFrom().

+ Here is the caller graph for this function:

◆ RemovePIHeader()

static void ns3::RemovePIHeader ( uint8_t *&  buf,
ssize_t &  len 
)
static

Removes PI header.

Parameters
bufthe buffer to add the header to
lenthe buffer length

Definition at line 392 of file fd-net-device.cc.

Referenced by ns3::FdNetDevice::ForwardUp().

+ Here is the caller graph for this function:

◆ SendSocket()

void ns3::SendSocket ( const char *  path,
int  fd,
const int  magic_number 
)

Send the file descriptor back to the code that invoked the creation.

Parameters
pathThe socket address information from the Unix socket we use to send the created socket back to.
fdThe file descriptor we're going to send.
magic_numberA verification number to verify the caller is talking to the right process.

Definition at line 54 of file creator-utils.cc.

References ABORT_IF, LOG, two-ray-to-three-gpp-ch-calibration::rc, and ns3::StringToBuffer().

+ Here is the call graph for this function: