build a set of FdNetDevice objects attached to a physical network interface More...
#include "netmap-net-device-helper.h"
 Inheritance diagram for ns3::NetmapNetDeviceHelper:
 Collaboration diagram for ns3::NetmapNetDeviceHelper:Public Member Functions | |
| NetmapNetDeviceHelper () | |
| virtual | ~NetmapNetDeviceHelper () | 
| std::string | GetDeviceName () | 
| Get the device name of this device.  More... | |
| void | SetDeviceName (std::string deviceName) | 
| Set the device name of this device.  More... | |
  Public Member Functions inherited from ns3::FdNetDeviceHelper | |
| FdNetDeviceHelper () | |
| Construct a FdNetDeviceHelper.  More... | |
| ~FdNetDeviceHelper () override | |
| virtual NetDeviceContainer | Install (const NodeContainer &c) const | 
| This method creates a FdNetDevice and associates it to a node.  More... | |
| virtual NetDeviceContainer | Install (Ptr< Node > node) const | 
| This method creates a FdNetDevice and associates it to a node.  More... | |
| virtual NetDeviceContainer | Install (std::string name) const | 
| This method creates a FdNetDevice and associates it to a node.  More... | |
| void | SetAttribute (std::string n1, const AttributeValue &v1) | 
| void | SetTypeId (std::string type) | 
| Set the TypeId of the Objects to be created by this helper.  More... | |
  Public Member Functions inherited from ns3::PcapHelperForDevice | |
| PcapHelperForDevice () | |
| Construct a PcapHelperForDevice.  More... | |
| virtual | ~PcapHelperForDevice () | 
| Destroy a PcapHelperForDevice.  More... | |
| void | EnablePcap (std::string prefix, NetDeviceContainer d, bool promiscuous=false) | 
| Enable pcap output on each device in the container which is of the appropriate type.  More... | |
| void | EnablePcap (std::string prefix, NodeContainer n, bool promiscuous=false) | 
| Enable pcap output on each device (which is of the appropriate type) in the nodes provided in the container.  More... | |
| void | EnablePcap (std::string prefix, Ptr< NetDevice > nd, bool promiscuous=false, bool explicitFilename=false) | 
| Enable pcap output the indicated net device.  More... | |
| void | EnablePcap (std::string prefix, std::string ndName, bool promiscuous=false, bool explicitFilename=false) | 
| Enable pcap output the indicated net device using a device previously named using the ns-3 object name service.  More... | |
| void | EnablePcap (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool promiscuous=false) | 
| Enable pcap output on the device specified by a global node-id (of a previously created node) and associated device-id.  More... | |
| void | EnablePcapAll (std::string prefix, bool promiscuous=false) | 
| Enable pcap output on each device (which is of the appropriate type) in the set of all nodes created in the simulation.  More... | |
| virtual void | EnablePcapInternal (std::string prefix, Ptr< NetDevice > nd, bool promiscuous, bool explicitFilename)=0 | 
| Enable pcap output the indicated net device.  More... | |
  Public Member Functions inherited from ns3::AsciiTraceHelperForDevice | |
| AsciiTraceHelperForDevice () | |
| Construct an AsciiTraceHelperForDevice.  More... | |
| virtual | ~AsciiTraceHelperForDevice () | 
| Destroy an AsciiTraceHelperForDevice.  More... | |
| void | EnableAscii (Ptr< OutputStreamWrapper > stream, NetDeviceContainer d) | 
| Enable ascii trace output on each device in the container which is of the appropriate type.  More... | |
| void | EnableAscii (Ptr< OutputStreamWrapper > stream, NodeContainer n) | 
| Enable ascii trace output on each device (which is of the appropriate type) in the nodes provided in the container.  More... | |
| void | EnableAscii (Ptr< OutputStreamWrapper > stream, Ptr< NetDevice > nd) | 
| Enable ascii trace output on the indicated net device.  More... | |
| void | EnableAscii (Ptr< OutputStreamWrapper > stream, std::string ndName) | 
| Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service.  More... | |
| void | EnableAscii (Ptr< OutputStreamWrapper > stream, uint32_t nodeid, uint32_t deviceid) | 
| Enable ascii trace output on the device specified by a global node-id (of a previously created node) and associated device-id.  More... | |
| void | EnableAscii (std::string prefix, NetDeviceContainer d) | 
| Enable ascii trace output on each device in the container which is of the appropriate type.  More... | |
| void | EnableAscii (std::string prefix, NodeContainer n) | 
| Enable ascii trace output on each device (which is of the appropriate type) in the nodes provided in the container.  More... | |
| void | EnableAscii (std::string prefix, Ptr< NetDevice > nd, bool explicitFilename=false) | 
| Enable ascii trace output on the indicated net device.  More... | |
| void | EnableAscii (std::string prefix, std::string ndName, bool explicitFilename=false) | 
| Enable ascii trace output the indicated net device using a device previously named using the ns-3 object name service.  More... | |
| void | EnableAscii (std::string prefix, uint32_t nodeid, uint32_t deviceid, bool explicitFilename) | 
| Enable ascii trace output on the device specified by a global node-id (of a previously created node) and associated device-id.  More... | |
| void | EnableAsciiAll (Ptr< OutputStreamWrapper > stream) | 
| Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes created in the simulation.  More... | |
| void | EnableAsciiAll (std::string prefix) | 
| Enable ascii trace output on each device (which is of the appropriate type) in the set of all nodes created in the simulation.  More... | |
| virtual void | EnableAsciiInternal (Ptr< OutputStreamWrapper > stream, std::string prefix, Ptr< NetDevice > nd, bool explicitFilename)=0 | 
| Enable ascii trace output on the indicated net device.  More... | |
Protected Member Functions | |
| virtual int | CreateFileDescriptor () const | 
| Call out to a separate process running as suid root in order to get a raw socket.  More... | |
| Ptr< NetDevice > | InstallPriv (Ptr< Node > node) const | 
| This method creates an ns3::FdNetDevice attached to a physical network interface.  More... | |
| virtual void | SetDeviceAttributes (Ptr< FdNetDevice > device) const | 
| Sets device flags and MTU.  More... | |
| void | SwitchInNetmapMode (int fd, Ptr< NetmapNetDevice > device) const | 
| Switch the fd in netmap mode.  More... | |
| virtual Ptr< NetDevice > | InstallPriv (Ptr< Node > node) const | 
| This method creates an ns3::FdNetDevice and associates it to a node.  More... | |
Protected Attributes | |
| std::string | m_deviceName | 
| The unix/linux name of the underlying device (e.g., eth0)  More... | |
build a set of FdNetDevice objects attached to a physical network interface
Definition at line 44 of file netmap-net-device-helper.h.
| ns3::NetmapNetDeviceHelper::NetmapNetDeviceHelper | ( | ) | 
Definition at line 65 of file netmap-net-device-helper.cc.
References m_deviceName, and ns3::FdNetDeviceHelper::SetTypeId().
 Here is the call graph for this function:
      
  | 
  inlinevirtual | 
Definition at line 49 of file netmap-net-device-helper.h.
      
  | 
  protectedvirtual | 
Call out to a separate process running as suid root in order to get a raw socket.
We do this to avoid having the entire simulation running as root.
Definition at line 198 of file netmap-net-device-helper.cc.
References ns3::BufferToString(), EMU_MAGIC, check-style-clang-format::int, NS_ASSERT_MSG, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_INFO, and check-style-clang-format::path.
Referenced by InstallPriv().
 Here is the call graph for this function:
 Here is the caller graph for this function:| std::string ns3::NetmapNetDeviceHelper::GetDeviceName | ( | ) | 
Get the device name of this device.
Definition at line 72 of file netmap-net-device-helper.cc.
References m_deviceName.
This method creates an ns3::FdNetDevice attached to a physical network interface.
| node | The node to install the device in | 
Reimplemented from ns3::FdNetDeviceHelper.
Definition at line 84 of file netmap-net-device-helper.cc.
References CreateFileDescriptor(), ns3::NetDeviceQueueLock::GetTypeId(), ns3::FdNetDeviceHelper::InstallPriv(), SetDeviceAttributes(), and SwitchInNetmapMode().
 Here is the call graph for this function:
      
  | 
  protectedvirtual | 
Sets device flags and MTU.
| device | the FdNetDevice | 
Definition at line 109 of file netmap-net-device-helper.cc.
References m_deviceName, NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_LOGIC, and two-ray-to-three-gpp-ch-calibration::rc.
Referenced by InstallPriv().
 Here is the caller graph for this function:| void ns3::NetmapNetDeviceHelper::SetDeviceName | ( | std::string | deviceName | ) | 
Set the device name of this device.
| deviceName | The device name of this device. | 
Definition at line 78 of file netmap-net-device-helper.cc.
References m_deviceName.
      
  | 
  protected | 
Switch the fd in netmap mode.
| fd | the file descriptor | 
| device | the NetmapNetDevice | 
Definition at line 430 of file netmap-net-device-helper.cc.
References m_deviceName, NS_ASSERT, NS_FATAL_ERROR, and NS_LOG_FUNCTION.
Referenced by InstallPriv().
 Here is the caller graph for this function:
      
  | 
  protected | 
The unix/linux name of the underlying device (e.g., eth0)
Definition at line 94 of file netmap-net-device-helper.h.
Referenced by NetmapNetDeviceHelper(), GetDeviceName(), SetDeviceAttributes(), SetDeviceName(), and SwitchInNetmapMode().