A Discrete-Event Network Simulator
API
ns3::DpdkNetDeviceHelper Class Reference

build a DpdkNetDevice object attached to a physical network interface More...

#include "dpdk-net-device-helper.h"

+ Inheritance diagram for ns3::DpdkNetDeviceHelper:
+ Collaboration diagram for ns3::DpdkNetDeviceHelper:

Public Member Functions

 DpdkNetDeviceHelper ()
 Construct a DpdkNetDeviceHelper and initialize DPDK EAL. More...
 
virtual ~DpdkNetDeviceHelper ()
 
void SetDpdkDriver (std::string dpdkDriver)
 Sets DPDK Driver to bind NIC to. More...
 
void SetLCoreList (std::string lCoreList)
 Sets list of logical cores to use. More...
 
void SetPmdLibrary (std::string pmdLibrary)
 Sets PMD Library to be used for the NIC. More...
 
- Public Member Functions inherited from ns3::EmuFdNetDeviceHelper
 EmuFdNetDeviceHelper ()
 Construct a EmuFdNetDeviceHelper. More...
 
virtual ~EmuFdNetDeviceHelper ()
 
std::string GetDeviceName (void)
 Get the device name of this device. More...
 
void HostQdiscBypass (bool hostQdiscBypass)
 Request host qdisc bypass. 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...
 
virtual ~FdNetDeviceHelper ()
 
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...
 
- 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...
 

Protected Member Functions

Ptr< NetDeviceInstallPriv (Ptr< Node > node) const
 This method creates an ns3::FdNetDevice attached to a physical network interface. More...
 
- Protected Member Functions inherited from ns3::EmuFdNetDeviceHelper
virtual int CreateFileDescriptor (void) const
 Call out to a separate process running as suid root in order to get a raw socket. More...
 
Ptr< NetDeviceInstallPriv (Ptr< Node > node) const
 This method creates an ns3::FdNetDevice attached to a physical network interface. More...
 
virtual void SetFileDescriptor (Ptr< FdNetDevice > device) const
 Sets a file descriptor on the FileDescriptorNetDevice. More...
 

Protected Attributes

std::string m_dpdkDriver
 DPDK Driver to bind NIC to. More...
 
std::string m_lCoreList
 Logical cores to use. More...
 
std::string m_pmdLibrary
 PMD Library to be used for NIC. More...
 
- Protected Attributes inherited from ns3::EmuFdNetDeviceHelper
std::string m_deviceName
 The Unix/Linux name of the underlying device (e.g., eth0) More...
 
bool m_hostQdiscBypass
 True if request host qdisc bypass. More...
 

Detailed Description

build a DpdkNetDevice object attached to a physical network interface

Definition at line 35 of file dpdk-net-device-helper.h.

Constructor & Destructor Documentation

◆ DpdkNetDeviceHelper()

ns3::DpdkNetDeviceHelper::DpdkNetDeviceHelper ( )

Construct a DpdkNetDeviceHelper and initialize DPDK EAL.

Parameters
argcDpdk EAL args count.
argvDpdk EAL args list.

Definition at line 30 of file dpdk-net-device-helper.cc.

References NS_LOG_FUNCTION, and ns3::FdNetDeviceHelper::SetTypeId().

+ Here is the call graph for this function:

◆ ~DpdkNetDeviceHelper()

virtual ns3::DpdkNetDeviceHelper::~DpdkNetDeviceHelper ( )
inlinevirtual

Definition at line 46 of file dpdk-net-device-helper.h.

Member Function Documentation

◆ InstallPriv()

Ptr< NetDevice > ns3::DpdkNetDeviceHelper::InstallPriv ( Ptr< Node node) const
protectedvirtual

This method creates an ns3::FdNetDevice attached to a physical network interface.

Parameters
nodeThe node to install the device in
Returns
A container holding the added net device.

Reimplemented from ns3::FdNetDeviceHelper.

Definition at line 58 of file dpdk-net-device-helper.cc.

References ns3::FdNetDeviceHelper::InstallPriv(), ns3::EmuFdNetDeviceHelper::m_deviceName, m_dpdkDriver, m_lCoreList, m_pmdLibrary, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ SetDpdkDriver()

void ns3::DpdkNetDeviceHelper::SetDpdkDriver ( std::string  dpdkDriver)

Sets DPDK Driver to bind NIC to.

Parameters
dpdkDriverThe DPDK Driver

Definition at line 52 of file dpdk-net-device-helper.cc.

References m_dpdkDriver.

◆ SetLCoreList()

void ns3::DpdkNetDeviceHelper::SetLCoreList ( std::string  lCoreList)

Sets list of logical cores to use.

Parameters
lCoreListComma separated logical core list (e.g., "0,1")

Definition at line 40 of file dpdk-net-device-helper.cc.

References m_lCoreList.

◆ SetPmdLibrary()

void ns3::DpdkNetDeviceHelper::SetPmdLibrary ( std::string  pmdLibrary)

Sets PMD Library to be used for the NIC.

Parameters
pmdLibraryThe PMD Library

Definition at line 46 of file dpdk-net-device-helper.cc.

References m_pmdLibrary.

Member Data Documentation

◆ m_dpdkDriver

std::string ns3::DpdkNetDeviceHelper::m_dpdkDriver
protected

DPDK Driver to bind NIC to.

Definition at line 93 of file dpdk-net-device-helper.h.

Referenced by InstallPriv(), and SetDpdkDriver().

◆ m_lCoreList

std::string ns3::DpdkNetDeviceHelper::m_lCoreList
protected

Logical cores to use.

Definition at line 83 of file dpdk-net-device-helper.h.

Referenced by InstallPriv(), and SetLCoreList().

◆ m_pmdLibrary

std::string ns3::DpdkNetDeviceHelper::m_pmdLibrary
protected

PMD Library to be used for NIC.

Definition at line 88 of file dpdk-net-device-helper.h.

Referenced by InstallPriv(), and SetPmdLibrary().


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