This section documents the API of the ns-3 fd-net-device module. More...
Classes | |
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::PlanetLabFdNetDeviceHelper |
build a set of FdNetDevice objects attached to a virtual TAP network interface More... | |
class | ns3::TapFdNetDeviceHelper |
build a set of FdNetDevice objects attached to a virtual TAP network interface More... | |
Enumerations | |
enum | ns3::FdNetDevice::EncapsulationMode { ns3::FdNetDevice::DIX, ns3::FdNetDevice::LLC, ns3::FdNetDevice::DIXPI } |
Enumeration of the types of frames supported in the class. 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... | |
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.
Enumeration of the types of frames supported in the class.
Enumerator | |
---|---|
DIX |
DIX II / Ethernet II packet. |
LLC |
802.2 LLC/SNAP Packet |
DIXPI |
When using TAP devices, if flag IFF_NO_PI is not set on the device, IP packets will have an extra header: Flags [2 bytes] Proto [2 bytes] Raw protocol(IP, IPv6, etc) frame. |
Definition at line 96 of file fd-net-device.h.
|
static |
Synthesize PI header for the kernel.
buf | the buffer to add the header to |
len | the buffer length |
Definition at line 331 of file fd-net-device.cc.
Referenced by ns3::FdNetDevice::SendFrom().
|
static |
Removes PI header.
buf | the buffer to add the header to |
len | the buffer length |
Definition at line 373 of file fd-net-device.cc.
Referenced by ns3::FdNetDevice::ForwardUp().
void ns3::SendSocket | ( | const char * | path, |
int | fd, | ||
const int | magic_number | ||
) |
Send the file descriptor back to the code that invoked the creation.
path | The socket address information from the Unix socket we use to send the created socket back to. |
fd | The file descriptor we're going to send. |
magic_number | A 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, and ns3::StringToBuffer().