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

An OpenFlow 1.3 device that switches multiple CSMA segments via OpenFlow protocol. More...

#include "ofswitch13-device.h"

+ Inheritance diagram for ns3::OFSwitch13Device:
+ Collaboration diagram for ns3::OFSwitch13Device:

Classes

struct  PipelinePacket
 Structure to save packet metadata while it is under OpenFlow pipeline. More...
 
class  RemoteController
 Inner class to save information of a remote active controller connected to this OpenFlow switch. More...
 

Public Member Functions

 OFSwitch13Device ()
 Default constructor. More...
 
 ~OFSwitch13Device () override
 Dummy destructor, see DoDispose. More...
 
uint64_t GetDatapathId () const
 Get the OpenFlow datapath ID. More...
 
uint64_t GetDpId () const
 Alias for the GetDatapathId () method. More...
 
OpenFLow control channel counter accessors.
Returns
The requested value.
uint64_t GetFlowModCounter () const
 
uint64_t GetGroupModCounter () const
 
uint64_t GetMeterModCounter () const
 
uint64_t GetPacketInCounter () const
 
uint64_t GetPacketOutCounter () const
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
 ~Object () override
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose ()
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one. More...
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object. More...
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object. More...
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object. More...
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized () const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o[[maybe_unused]])
 Copy constructor. More...
 
uint32_t GetReferenceCount () const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o[[maybe_unused]])
 Assignment operator. More...
 
void Ref () const
 Increment the reference count. More...
 
void Unref () const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId ()
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID. More...
 

Datapath internal accessors.

Parameters
tableIdThe pipeline flow table ID.
Returns
The requested value.
typedef void(* MeterDropTracedCallback) (Ptr< const Packet > packet, uint32_t meterId)
 TracedCallback signature for packets dropped by meter bands. More...
 
typedef void(* TableDropTracedCallback) (Ptr< const Packet > packet, uint8_t tableId)
 TracedCallback signature for unmatched packets dropped by flow tables without table-miss entries. More...
 
typedef void(* DeviceTracedCallback) (Ptr< const OFSwitch13Device > dev)
 TracedCallback signature for OpenFlow switch device. More...
 
uint32_t GetBufferEntries () const
 TracedCallback signature for packets dropped by meter bands. More...
 
uint32_t GetBufferSize () const
 TracedCallback signature for packets dropped by meter bands. More...
 
double GetBufferUsage () const
 TracedCallback signature for packets dropped by meter bands. More...
 
DataRate GetCpuCapacity () const
 TracedCallback signature for packets dropped by meter bands. More...
 
DataRate GetCpuLoad () const
 TracedCallback signature for packets dropped by meter bands. More...
 
double GetCpuUsage () const
 TracedCallback signature for packets dropped by meter bands. More...
 
Time GetDatapathTimeout () const
 TracedCallback signature for packets dropped by meter bands. More...
 
uint32_t GetDftFlowTableSize () const
 TracedCallback signature for packets dropped by meter bands. More...
 
uint32_t GetFlowTableEntries (uint8_t tableId) const
 TracedCallback signature for packets dropped by meter bands. More...
 
uint32_t GetFlowTableSize (uint8_t tableId) const
 TracedCallback signature for packets dropped by meter bands. More...
 
double GetFlowTableUsage (uint8_t tableId) const
 TracedCallback signature for packets dropped by meter bands. More...
 
uint32_t GetGroupTableEntries () const
 TracedCallback signature for packets dropped by meter bands. More...
 
uint32_t GetGroupTableSize () const
 TracedCallback signature for packets dropped by meter bands. More...
 
double GetGroupTableUsage () const
 TracedCallback signature for packets dropped by meter bands. More...
 
uint32_t GetMeterTableEntries () const
 TracedCallback signature for packets dropped by meter bands. More...
 
uint32_t GetMeterTableSize () const
 TracedCallback signature for packets dropped by meter bands. More...
 
double GetMeterTableUsage () const
 TracedCallback signature for packets dropped by meter bands. More...
 
uint32_t GetNControllers () const
 TracedCallback signature for packets dropped by meter bands. More...
 
uint32_t GetNPipelineTables () const
 TracedCallback signature for packets dropped by meter bands. More...
 
uint32_t GetNSwitchPorts () const
 TracedCallback signature for packets dropped by meter bands. More...
 
Time GetPipelineDelay () const
 TracedCallback signature for packets dropped by meter bands. More...
 
uint32_t GetSumFlowEntries () const
 TracedCallback signature for packets dropped by meter bands. More...
 
struct datapath * GetDatapathStruct ()
 Get a pointer to the internal BOFUSS datapath structure. More...
 
Ptr< OFSwitch13PortAddSwitchPort (Ptr< NetDevice > portDevice)
 Add a 'port' to the switch device. More...
 
Ptr< OFSwitch13PortGetSwitchPort (uint32_t no) const
 Get the OFSwitch13Port pointer from its number. More...
 
void ReceiveFromSwitchPort (Ptr< Packet > packet, uint32_t portNo, uint64_t tunnelId=0)
 Called when a packet is received on one of the switch's ports. More...
 
void StartControllerConnection (Address ctrlAddr)
 Starts the TCP connection between this switch and the target controller indicated by the address parameter. More...
 
static void SendPacketToController (struct pipeline *pl, struct packet *pkt, uint8_t tableId, uint8_t reason)
 Overriding BOFUSS send_packet_to_controller weak function from udatapath/pipeline.c. More...
 
static int SendOpenflowBufferToRemote (struct ofpbuf *buffer, struct remote *remote)
 Overriding BOFUSS send_openflow_buffer_to_remote weak function from udatapath/datapath.c. More...
 
static void DpActionsOutputPort (struct packet *pkt, uint32_t outPort, uint32_t outQueue, uint16_t maxLength, uint64_t cookie)
 Overriding BOFUSS dp_actions_output_port weak function from udatapath/dp_actions.c. More...
 
static void MeterCreatedCallback (struct meter_entry *entry)
 Callback fired when a new meter entry is created at meter table. More...
 
static void MeterDropCallback (struct packet *pkt, struct meter_entry *entry)
 Callback fired when a packet is dropped by meter band. More...
 
static void TableDropCallback (struct packet *pkt, struct flow_table *table)
 Callback fired when an unmatched packet is dropped by a flow table without a table-miss entry. More...
 
static void PacketCloneCallback (struct packet *pkt, struct packet *clone)
 Callback fired when a packet is cloned. More...
 
static void PacketDestroyCallback (struct packet *pkt)
 Callback fired when a packet is destroyed. More...
 
static void BufferSaveCallback (struct packet *pkt, time_t timeout)
 Callback fired when a packet is saved into buffer. More...
 
static void BufferRetrieveCallback (struct packet *pkt)
 Callback fired when a packet is retrieved from buffer. More...
 
static Ptr< OFSwitch13DeviceGetDevice (uint64_t id)
 Retrieve and existing OpenFlow device object by its datapath ID. More...
 
void DoDispose () override
 TracedCallback signature for packets dropped by meter bands. More...
 
void NotifyConstructionCompleted () override
 TracedCallback signature for packets dropped by meter bands. More...
 
struct datapath * DatapathNew ()
 Creates a new datapath. More...
 

Adjust OpenFlow switch table sizes.

Parameters
tableIdThe pipeline flow table ID.
valueThe value to set.
typedef std::vector< Ptr< OFSwitch13Port > > PortList_t
 Structure to save the list of ports in this datapath. More...
 
typedef std::vector< Ptr< OFSwitch13Device::RemoteController > > CtrlList_t
 Structure to save the list of active controllers. More...
 
typedef std::map< uint64_t, Ptr< OFSwitch13Device > > DpIdDevMap_t
 Structure to map datapath id to OpenFlow device. More...
 
typedef std::map< uint64_t, Ptr< Packet > > IdPacketMap_t
 Structure to save packets, indexed by its id. More...
 
TracedCallback< Ptr< const Packet > > m_bufferExpireTrace
 Trace source fired when a packet in buffer expires. More...
 
TracedCallback< Ptr< const Packet > > m_bufferRetrieveTrace
 Trace source fired when a packet is retrieved from buffer. More...
 
TracedCallback< Ptr< const Packet > > m_bufferSaveTrace
 Trace source fired when a packet is saved into buffer. More...
 
TracedCallback< Ptr< const OFSwitch13Device > > m_datapathTimeoutTrace
 Trace source fired when the datapath timeout operation is completed. More...
 
TracedCallback< Ptr< const Packet > > m_loadDropTrace
 Trace source fired when a packet is dropped due to overloaded switch. More...
 
TracedCallback< Ptr< const Packet >, uint32_t > m_meterDropTrace
 Trace source fired when a packet is dropped by a meter band. More...
 
TracedCallback< Ptr< const Packet >, uint8_t > m_tableDropTrace
 Trace source fired when an unmatched packet is dropped by flow table. More...
 
TracedCallback< Ptr< const Packet > > m_pipePacketTrace
 Trace source fired when a packet is sent to pipeline. More...
 
TracedValue< uint32_t > m_groupEntries
 Number of entries in group table. More...
 
TracedValue< uint32_t > m_meterEntries
 Number of entries in meter table. More...
 
TracedValue< uint32_t > m_sumFlowEntries
 Sum of entries in all flow tables. More...
 
TracedValue< Timem_pipeDelay
 Average delay for pipeline packet processing. More...
 
TracedValue< DataRatem_cpuLoad
 Average CPU processing load. More...
 
uint64_t m_dpId
 This datapath id. More...
 
Time m_timeout
 Datapath timeout interval. More...
 
Time m_lastTimeout
 Datapath last timeout. More...
 
Time m_tcamDelay
 Flow Table TCAM lookup delay. More...
 
std::string m_libLog
 The BOFUSS library log level. More...
 
struct datapath * m_datapath
 BOFUSS datapath structure. More...
 
PortList_t m_ports
 List of switch ports. More...
 
CtrlList_t m_controllers
 Collection of active controllers. More...
 
uint32_t m_flowTabSize
 Flow table maximum entries. More...
 
uint32_t m_groupTabSize
 Group table maximum entries. More...
 
uint32_t m_meterTabSize
 Meter table maximum entries. More...
 
uint32_t m_numPipeTabs
 Number of pipeline flow tables. More...
 
IdPacketMap_t m_bufferPkts
 Packets saved in switch buffer. More...
 
uint32_t m_bufferSize
 Buffer size in terms of packets. More...
 
PipelinePacket m_pipePkt
 Packet under switch pipeline. More...
 
DataRate m_cpuCapacity
 CPU processing capacity. More...
 
uint64_t m_cpuConsumed
 CPU processing tokens consumed. More...
 
uint64_t m_cpuTokens
 CPU processing tokens available. More...
 
uint64_t m_cFlowMod
 Pipeline flow mod counter. More...
 
uint64_t m_cGroupMod
 Pipeline group mod counter. More...
 
uint64_t m_cMeterMod
 Pipeline meter mod counter. More...
 
uint64_t m_cPacketIn
 Pipeline packet in counter. More...
 
uint64_t m_cPacketOut
 Pipeline packet out counter. More...
 
static uint64_t m_globalDpId = 0
 Global counter for datapath IDs. More...
 
static uint64_t m_globalPktId = 0
 Global counter for packets IDs. More...
 
static DpIdDevMap_t m_globalSwitchMap
 As the integration of BOFUSS and ns-3 involve overriding some C functions, we are using a global map to store a pointer to all OFSwitch13Device objects in simulation, and allow faster object retrieve by datapath id. More...
 
void SetFlowTableSize (uint8_t tableId, uint32_t value)
 Structure to save the list of ports in this datapath. More...
 
void SetDftFlowTableSize (uint32_t value)
 Structure to save the list of ports in this datapath. More...
 
void SetGroupTableSize (uint32_t value)
 Structure to save the list of ports in this datapath. More...
 
void SetMeterTableSize (uint32_t value)
 Structure to save the list of ports in this datapath. More...
 
void DatapathTimeout (struct datapath *dp)
 Check if any flow in any table is timed out and update port status. More...
 
int SendPacketInMessage (struct packet *pkt, uint8_t tableId, uint8_t reason, uint16_t maxLength, uint64_t cookie=0)
 Create an OpenFlow packet in message and send the packet to all controllers with open connections. More...
 
bool SendToSwitchPort (struct packet *pkt, uint32_t portNo, uint32_t queueNo=0)
 Send a message over a specific switch port. More...
 
void SendToPipeline (Ptr< Packet > packet, uint32_t portNo, uint64_t tunnelId=0)
 Send the packet to the OpenFlow BOFUSS pipeline. More...
 
int SendToController (Ptr< Packet > packet, Ptr< OFSwitch13Device::RemoteController > remoteCtrl)
 Send a packet to the controller node. More...
 
void ReceiveFromController (Ptr< Packet > packet, Address from)
 Receive an OpenFlow packet from controller. More...
 
int ReplyWithErrorMessage (ofl_err error, struct ofpbuf *buffer, struct sender *senderCtrl)
 Create an OpenFlow error message and send it back to the sender controller. More...
 
void SocketCtrlSucceeded (Ptr< Socket > socket)
 Socket callback fired when a TCP connection to controller succeed. More...
 
void SocketCtrlFailed (Ptr< Socket > socket)
 Socket callback fired when a TCP connection to controller fail. More...
 
void NotifyMeterEntryCreated (struct meter_entry *entry)
 Notify this device of a new meter entry created at meter table. More...
 
void NotifyPacketCloned (struct packet *pkt, struct packet *clone)
 Notify this device of a packet cloned by the OpenFlow pipeline. More...
 
void NotifyPacketDestroyed (struct packet *pkt)
 Notify this device of a packet destroyed by the OpenFlow pipeline. More...
 
void NotifyPacketDroppedByMeter (struct packet *pkt, struct meter_entry *entry)
 Notify this device of a packet dropped by OpenFlow meter band. More...
 
void NotifyPacketDroppedByTable (struct packet *pkt, struct flow_table *table)
 Notify this device of an unmatched packet dropped by OpenFlow flow table without a table-miss entry. More...
 
void BufferPacketSave (uint64_t packetId, time_t timeout)
 Notify this device of a packet saved into buffer. More...
 
void BufferPacketRetrieve (uint64_t packetId)
 Notify this device of a packet retrieved from buffer. More...
 
void BufferPacketDelete (uint64_t packetId)
 Delete the ns-3 packet from buffer map. More...
 
Ptr< OFSwitch13Device::RemoteControllerGetRemoteController (Ptr< Socket > socket)
 Get the remote controller for this socket. More...
 
Ptr< OFSwitch13Device::RemoteControllerGetRemoteController (Address address)
 Get the remote controller for this address. More...
 
Ptr< OFSwitch13Device::RemoteControllerGetRemoteController (struct remote *remote)
 Get the remote controller for this BOFUSS remote pointer. More...
 
static uint64_t GetNewPacketId ()
 Increase the global packet ID counter and return a new packet ID. More...
 
static bool CopyTags (Ptr< const Packet > srcPkt, Ptr< const Packet > dstPkt)
 Copy all tags (packet and byte) from srcPkt packet to dstPkt packet. More...
 
static void RegisterDatapath (uint64_t id, Ptr< OFSwitch13Device > dev)
 Insert a new OpenFlow device in global map. More...
 
static void UnregisterDatapath (uint64_t id)
 Remove an existing OpenFlow device from global map. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoInitialize ()
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 

Detailed Description

An OpenFlow 1.3 device that switches multiple CSMA segments via OpenFlow protocol.

Introspection did not find any typical Config paths.

It takes a collection of ports, each one associated with a ns-3 underlying CsmaNetDevice. The device acts as the intermediary between the ports, receiving a packet from one port and forwarding it to another.

The OpenFlow switch datapath implementation (flow tables, group table, and meter table) is provided by the BOFUSS library. For this reason, packets entering the switch are sent to the library for OpenFlow pipeline processing before being forwarded to the correct output port(s). OpenFlow messages received from the controller are also sent to the library for datapath configuration.


Attributes

  • CpuCapacity: CPU processing capacity (in terms of throughput).
  • DatapathId: The unique identification of this OpenFlow switch.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint64_t 0:18446744073709551615
    • Flags: read
  • FlowTableSize: The maximum number of entries allowed on each flow table.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:65535
    • Initial value: 65535
    • Flags: constructwriteread
  • GroupTableSize: The maximum number of entries allowed on group table.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:65535
    • Initial value: 65535
    • Flags: constructwriteread
  • MeterTableSize: The maximum number of entries allowed on meter table.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:65535
    • Initial value: 65535
    • Flags: constructwriteread
  • PipelineTables: The number of pipeline flow tables.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 1:255
    • Initial value: 64
    • Flags: constructread
  • PortList: The list of ports associated to this switch.
  • TcamDelay: Average time to perform a TCAM operation in pipeline.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +0ns:+9.22337e+18ns
    • Initial value: +20000ns
    • Flags: constructwriteread
  • TimeoutInterval: The interval between timeout operations on datapath.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +1e+06ns:+1e+09ns
    • Initial value: +1e+08ns
    • Flags: constructwriteread

TraceSources

Size of this type is 680 bytes (on a 64-bit architecture).

Definition at line 53 of file ofswitch13-device.h.

Member Typedef Documentation

◆ CtrlList_t

Structure to save the list of active controllers.

Definition at line 611 of file ofswitch13-device.h.

◆ DeviceTracedCallback

typedef void(* ns3::OFSwitch13Device::DeviceTracedCallback) (Ptr< const OFSwitch13Device > dev)

TracedCallback signature for OpenFlow switch device.

Parameters
deveThe OpenFlow switch device pointer.

Definition at line 369 of file ofswitch13-device.h.

◆ DpIdDevMap_t

typedef std::map<uint64_t, Ptr<OFSwitch13Device> > ns3::OFSwitch13Device::DpIdDevMap_t
private

Structure to map datapath id to OpenFlow device.

Definition at line 614 of file ofswitch13-device.h.

◆ IdPacketMap_t

typedef std::map<uint64_t, Ptr<Packet> > ns3::OFSwitch13Device::IdPacketMap_t
private

Structure to save packets, indexed by its id.

Definition at line 617 of file ofswitch13-device.h.

◆ MeterDropTracedCallback

typedef void(* ns3::OFSwitch13Device::MeterDropTracedCallback) (Ptr< const Packet > packet, uint32_t meterId)

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 353 of file ofswitch13-device.h.

◆ PortList_t

typedef std::vector<Ptr<OFSwitch13Port> > ns3::OFSwitch13Device::PortList_t
private

Structure to save the list of ports in this datapath.

Definition at line 608 of file ofswitch13-device.h.

◆ TableDropTracedCallback

typedef void(* ns3::OFSwitch13Device::TableDropTracedCallback) (Ptr< const Packet > packet, uint8_t tableId)

TracedCallback signature for unmatched packets dropped by flow tables without table-miss entries.

Parameters
packetThe dropped packet.
tableIdThe flow table ID that dropped the packet.

Definition at line 362 of file ofswitch13-device.h.

Constructor & Destructor Documentation

◆ OFSwitch13Device()

ns3::OFSwitch13Device::OFSwitch13Device ( )

Default constructor.

Definition at line 45 of file ofswitch13-device.cc.

References m_dpId, m_globalDpId, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_INFO, and RegisterDatapath().

+ Here is the call graph for this function:

◆ ~OFSwitch13Device()

ns3::OFSwitch13Device::~OFSwitch13Device ( )
override

Dummy destructor, see DoDispose.

Definition at line 64 of file ofswitch13-device.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ AddSwitchPort()

Ptr< OFSwitch13Port > ns3::OFSwitch13Device::AddSwitchPort ( Ptr< NetDevice portDevice)

Add a 'port' to the switch device.

This method adds a new switch port to a OFSwitch13Device, so that the new switch port NetDevice becomes part of the switch and L2 frames start being forwarded to/from this OpenFlow device. The current implementation only supports CsmaNetDevice (for physical ports) or VirtualNetDevice (for logical ports). Keep in mind that an OpenFlow switch expects to receive packets with Ethernet header from port devices).

Parameters
portDeviceThe NetDevice port to add.
Returns
The OFSwitch13Port created.

Definition at line 430 of file ofswitch13-device.cc.

References GetNSwitchPorts(), ns3::OFSwitch13Port::GetPortNo(), m_datapath, m_ports, NS_ABORT_MSG_IF, NS_ASSERT, NS_LOG_FUNCTION, and NS_LOG_INFO.

+ Here is the call graph for this function:

◆ BufferPacketDelete()

void ns3::OFSwitch13Device::BufferPacketDelete ( uint64_t  packetId)
private

Delete the ns-3 packet from buffer map.

Parameters
packetIdThe ns-3 packet id.

Definition at line 1364 of file ofswitch13-device.cc.

References m_bufferExpireTrace, m_bufferPkts, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

Referenced by BufferPacketSave(), and NotifyPacketDestroyed().

+ Here is the caller graph for this function:

◆ BufferPacketRetrieve()

void ns3::OFSwitch13Device::BufferPacketRetrieve ( uint64_t  packetId)
private

Notify this device of a packet retrieved from buffer.

This method will get the ns-3 packet from buffer map and put it back into pipeline.

Parameters
packetIdThe ns-3 packet id.

Definition at line 1344 of file ofswitch13-device.cc.

References ns3::OFSwitch13Device::PipelinePacket::GetPacket(), ns3::OFSwitch13Device::PipelinePacket::IsValid(), m_bufferPkts, m_bufferRetrieveTrace, m_pipePkt, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::OFSwitch13Device::PipelinePacket::SetPacket().

+ Here is the call graph for this function:

◆ BufferPacketSave()

void ns3::OFSwitch13Device::BufferPacketSave ( uint64_t  packetId,
time_t  timeout 
)
private

Notify this device of a packet saved into buffer.

This method will get the ns-3 packet in pipeline and save into buffer map.

Parameters
packetIdThe ns-3 packet id.
timeoutThe buffer timeout.

Definition at line 1313 of file ofswitch13-device.cc.

References BufferPacketDelete(), ns3::OFSwitch13Device::PipelinePacket::DelCopy(), ns3::Time::FromInteger(), ns3::OFSwitch13Device::PipelinePacket::GetPacket(), ns3::OFSwitch13Device::PipelinePacket::HasId(), ns3::OFSwitch13Device::PipelinePacket::IsValid(), m_bufferPkts, m_bufferSaveTrace, m_pipePkt, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_WARN, ns3::Time::S, ns3::Simulator::Schedule(), and timeout.

+ Here is the call graph for this function:

◆ BufferRetrieveCallback()

void ns3::OFSwitch13Device::BufferRetrieveCallback ( struct packet *  pkt)
static

Callback fired when a packet is retrieved from buffer.

Parameters
pktThe internal packet retrieved from buffer.

Definition at line 663 of file ofswitch13-device.cc.

References GetDevice().

Referenced by DatapathNew().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BufferSaveCallback()

void ns3::OFSwitch13Device::BufferSaveCallback ( struct packet *  pkt,
time_t  timeout 
)
static

Callback fired when a packet is saved into buffer.

Parameters
pktThe internal packet saved into buffer.
timeoutThe timeout for this packet into buffer.

Definition at line 656 of file ofswitch13-device.cc.

References GetDevice(), and timeout.

Referenced by DatapathNew().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CopyTags()

bool ns3::OFSwitch13Device::CopyTags ( Ptr< const Packet srcPkt,
Ptr< const Packet dstPkt 
)
staticprivate

Copy all tags (packet and byte) from srcPkt packet to dstPkt packet.

Attention
In the case of byte tags, the tags in dstPkt will cover the entire packet, regardless of the byte range in srcPkt.
Parameters
srcPktThe source packet.
dstPktThe destination packet.
Returns
true if everything's ok, false otherwise.

Definition at line 1430 of file ofswitch13-device.cc.

References ns3::Packet::AddByteTag(), ns3::Packet::AddPacketTag(), ns3::Packet::GetByteTagIterator(), ns3::TypeId::GetConstructor(), ns3::Packet::GetPacketTagIterator(), ns3::ByteTagIterator::Item::GetTag(), ns3::PacketTagIterator::Item::GetTag(), ns3::ByteTagIterator::Item::GetTypeId(), ns3::PacketTagIterator::Item::GetTypeId(), ns3::ByteTagIterator::HasNext(), ns3::PacketTagIterator::HasNext(), ns3::ByteTagIterator::Next(), and ns3::PacketTagIterator::Next().

Referenced by SendToSwitchPort().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DatapathNew()

struct datapath * ns3::OFSwitch13Device::DatapathNew ( )
private

Creates a new datapath.

Returns
The created datapath.
See also
ofsoftswitch dp_new () at udatapath/datapath.c

Definition at line 739 of file ofswitch13-device.cc.

References BufferRetrieveCallback(), BufferSaveCallback(), GetNPipelineTables(), m_bufferSize, m_dpId, m_lastTimeout, MeterCreatedCallback(), MeterDropCallback(), ns3::Simulator::Now(), NS_LOG_FUNCTION, PacketCloneCallback(), PacketDestroyCallback(), TableDropCallback(), and time_now().

Referenced by NotifyConstructionCompleted().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DatapathTimeout()

void ns3::OFSwitch13Device::DatapathTimeout ( struct datapath *  dp)
private

Check if any flow in any table is timed out and update port status.

This method reschedules itself at every m_timout interval, to constantly check the pipeline for timed out flow entries and update port status.

See also
BOFUSS function pipeline_timeout () at udatapath/pipeline.c
Parameters
dpThe datapath.

Definition at line 856 of file ofswitch13-device.cc.

References ns3::DataRate::GetBitRate(), GetGroupTableEntries(), GetMeterTableEntries(), ns3::Time::GetSeconds(), GetSumFlowEntries(), m_cpuCapacity, m_cpuConsumed, m_cpuLoad, m_cpuTokens, m_datapath, m_datapathTimeoutTrace, m_groupEntries, m_lastTimeout, m_meterEntries, m_pipeDelay, m_ports, m_sumFlowEntries, m_tcamDelay, m_timeout, min, ns3::Simulator::Now(), port, ns3::Simulator::Schedule(), and time_now().

Referenced by NotifyConstructionCompleted().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::OFSwitch13Device::DoDispose ( )
overrideprotectedvirtual

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Reimplemented from ns3::Object.

Definition at line 682 of file ofswitch13-device.cc.

References ns3::Object::DoDispose(), m_bufferPkts, m_controllers, m_datapath, m_dpId, m_ports, NS_LOG_FUNCTION, port, and UnregisterDatapath().

+ Here is the call graph for this function:

◆ DpActionsOutputPort()

void ns3::OFSwitch13Device::DpActionsOutputPort ( struct packet *  pkt,
uint32_t  outPort,
uint32_t  outQueue,
uint16_t  maxLength,
uint64_t  cookie 
)
static

Overriding BOFUSS dp_actions_output_port weak function from udatapath/dp_actions.c.

Outputs a datapath packet on switch port. This code is nearly the same on ofsoftswitch, but it gets the openflow device from datapath id and uses member functions to send the packet over ns3 structures.

Internal:
This function relies on the global map that stores OpenFlow devices to call the method on the correct object.
Parameters
pktThe internal packet to send.
outPortThe output switch port number.
outQueueThe output queue number.
maxLengthMax length of packet to send to controller.
cookiePacket cookie to send to controller.

Definition at line 559 of file ofswitch13-device.cc.

References GetDevice().

Referenced by dp_actions_output_port().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetBufferEntries()

uint32_t ns3::OFSwitch13Device::GetBufferEntries ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 256 of file ofswitch13-device.cc.

References m_bufferPkts.

Referenced by GetBufferUsage().

+ Here is the caller graph for this function:

◆ GetBufferSize()

uint32_t ns3::OFSwitch13Device::GetBufferSize ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 262 of file ofswitch13-device.cc.

References m_bufferSize.

Referenced by GetBufferUsage().

+ Here is the caller graph for this function:

◆ GetBufferUsage()

double ns3::OFSwitch13Device::GetBufferUsage ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 268 of file ofswitch13-device.cc.

References GetBufferEntries(), and GetBufferSize().

+ Here is the call graph for this function:

◆ GetCpuCapacity()

DataRate ns3::OFSwitch13Device::GetCpuCapacity ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 279 of file ofswitch13-device.cc.

References m_cpuCapacity.

Referenced by GetCpuUsage().

+ Here is the caller graph for this function:

◆ GetCpuLoad()

DataRate ns3::OFSwitch13Device::GetCpuLoad ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 285 of file ofswitch13-device.cc.

References m_cpuLoad.

Referenced by GetCpuUsage().

+ Here is the caller graph for this function:

◆ GetCpuUsage()

double ns3::OFSwitch13Device::GetCpuUsage ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 291 of file ofswitch13-device.cc.

References ns3::DataRate::GetBitRate(), GetCpuCapacity(), and GetCpuLoad().

+ Here is the call graph for this function:

◆ GetDatapathId()

uint64_t ns3::OFSwitch13Device::GetDatapathId ( ) const

Get the OpenFlow datapath ID.

Returns
The datapath ID.

Definition at line 214 of file ofswitch13-device.cc.

References m_dpId.

◆ GetDatapathStruct()

struct datapath * ns3::OFSwitch13Device::GetDatapathStruct ( )

Get a pointer to the internal BOFUSS datapath structure.

Returns
The requested pointer.

Definition at line 424 of file ofswitch13-device.cc.

References m_datapath.

◆ GetDatapathTimeout()

Time ns3::OFSwitch13Device::GetDatapathTimeout ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 302 of file ofswitch13-device.cc.

References m_timeout.

◆ GetDevice()

Ptr< OFSwitch13Device > ns3::OFSwitch13Device::GetDevice ( uint64_t  id)
static

Retrieve and existing OpenFlow device object by its datapath ID.

Parameters
idThe datapath ID.
Returns
The OpenFlow OFSwitch13Device pointer.

Definition at line 670 of file ofswitch13-device.cc.

References m_globalSwitchMap, and NS_ABORT_MSG.

Referenced by BufferRetrieveCallback(), BufferSaveCallback(), DpActionsOutputPort(), MeterCreatedCallback(), MeterDropCallback(), PacketCloneCallback(), PacketDestroyCallback(), SendOpenflowBufferToRemote(), SendPacketToController(), and TableDropCallback().

+ Here is the caller graph for this function:

◆ GetDftFlowTableSize()

uint32_t ns3::OFSwitch13Device::GetDftFlowTableSize ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 308 of file ofswitch13-device.cc.

References m_flowTabSize.

Referenced by GetTypeId(), and NotifyConstructionCompleted().

+ Here is the caller graph for this function:

◆ GetDpId()

uint64_t ns3::OFSwitch13Device::GetDpId ( ) const

Alias for the GetDatapathId () method.

Returns
The datapath ID.

Definition at line 220 of file ofswitch13-device.cc.

References m_dpId.

◆ GetFlowModCounter()

uint64_t ns3::OFSwitch13Device::GetFlowModCounter ( ) const

Definition at line 226 of file ofswitch13-device.cc.

References m_cFlowMod.

◆ GetFlowTableEntries()

uint32_t ns3::OFSwitch13Device::GetFlowTableEntries ( uint8_t  tableId) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 314 of file ofswitch13-device.cc.

References GetNPipelineTables(), m_datapath, and NS_ASSERT_MSG.

Referenced by GetFlowTableUsage(), GetSumFlowEntries(), and SetFlowTableSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetFlowTableSize()

uint32_t ns3::OFSwitch13Device::GetFlowTableSize ( uint8_t  tableId) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 322 of file ofswitch13-device.cc.

References GetNPipelineTables(), m_datapath, and NS_ASSERT_MSG.

Referenced by GetFlowTableUsage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetFlowTableUsage()

double ns3::OFSwitch13Device::GetFlowTableUsage ( uint8_t  tableId) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 330 of file ofswitch13-device.cc.

References GetFlowTableEntries(), and GetFlowTableSize().

+ Here is the call graph for this function:

◆ GetGroupModCounter()

uint64_t ns3::OFSwitch13Device::GetGroupModCounter ( ) const

Definition at line 232 of file ofswitch13-device.cc.

References m_cGroupMod.

◆ GetGroupTableEntries()

uint32_t ns3::OFSwitch13Device::GetGroupTableEntries ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 341 of file ofswitch13-device.cc.

References m_datapath, and NS_ASSERT_MSG.

Referenced by DatapathTimeout(), GetGroupTableUsage(), and SetGroupTableSize().

+ Here is the caller graph for this function:

◆ GetGroupTableSize()

uint32_t ns3::OFSwitch13Device::GetGroupTableSize ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 348 of file ofswitch13-device.cc.

References m_groupTabSize.

Referenced by GetGroupTableUsage(), GetTypeId(), and NotifyConstructionCompleted().

+ Here is the caller graph for this function:

◆ GetGroupTableUsage()

double ns3::OFSwitch13Device::GetGroupTableUsage ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 354 of file ofswitch13-device.cc.

References GetGroupTableEntries(), and GetGroupTableSize().

+ Here is the call graph for this function:

◆ GetMeterModCounter()

uint64_t ns3::OFSwitch13Device::GetMeterModCounter ( ) const

Definition at line 238 of file ofswitch13-device.cc.

References m_cMeterMod.

◆ GetMeterTableEntries()

uint32_t ns3::OFSwitch13Device::GetMeterTableEntries ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 365 of file ofswitch13-device.cc.

References m_datapath, and NS_ASSERT_MSG.

Referenced by DatapathTimeout(), GetMeterTableUsage(), and SetMeterTableSize().

+ Here is the caller graph for this function:

◆ GetMeterTableSize()

uint32_t ns3::OFSwitch13Device::GetMeterTableSize ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 372 of file ofswitch13-device.cc.

References m_meterTabSize.

Referenced by GetMeterTableUsage(), GetTypeId(), and NotifyConstructionCompleted().

+ Here is the caller graph for this function:

◆ GetMeterTableUsage()

double ns3::OFSwitch13Device::GetMeterTableUsage ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 378 of file ofswitch13-device.cc.

References GetMeterTableEntries(), and GetMeterTableSize().

+ Here is the call graph for this function:

◆ GetNControllers()

uint32_t ns3::OFSwitch13Device::GetNControllers ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 389 of file ofswitch13-device.cc.

References m_controllers.

◆ GetNewPacketId()

uint64_t ns3::OFSwitch13Device::GetNewPacketId ( )
staticprivate

Increase the global packet ID counter and return a new packet ID.

This ID is different from the internal ns3::Packet::GetUid (), as we need an unique value even for fragmented or brodcast packets. Its usage is restricted to this device.

Returns
New unique ID for this packet.

Definition at line 1424 of file ofswitch13-device.cc.

References m_globalPktId.

Referenced by NotifyPacketCloned(), and SendToPipeline().

+ Here is the caller graph for this function:

◆ GetNPipelineTables()

uint32_t ns3::OFSwitch13Device::GetNPipelineTables ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 395 of file ofswitch13-device.cc.

References m_numPipeTabs.

Referenced by DatapathNew(), GetFlowTableEntries(), GetFlowTableSize(), GetSumFlowEntries(), and SetDftFlowTableSize().

+ Here is the caller graph for this function:

◆ GetNSwitchPorts()

uint32_t ns3::OFSwitch13Device::GetNSwitchPorts ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 401 of file ofswitch13-device.cc.

References m_ports.

Referenced by AddSwitchPort().

+ Here is the caller graph for this function:

◆ GetPacketInCounter()

uint64_t ns3::OFSwitch13Device::GetPacketInCounter ( ) const

Definition at line 244 of file ofswitch13-device.cc.

References m_cPacketIn.

◆ GetPacketOutCounter()

uint64_t ns3::OFSwitch13Device::GetPacketOutCounter ( ) const

Definition at line 250 of file ofswitch13-device.cc.

References m_cPacketOut.

◆ GetPipelineDelay()

Time ns3::OFSwitch13Device::GetPipelineDelay ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 407 of file ofswitch13-device.cc.

References m_pipeDelay.

◆ GetRemoteController() [1/3]

Ptr< OFSwitch13Device::RemoteController > ns3::OFSwitch13Device::GetRemoteController ( Address  address)
private

Get the remote controller for this address.

Parameters
addressThe socket address.
Returns
The remote controller.

Definition at line 1394 of file ofswitch13-device.cc.

References first::address, m_controllers, and NS_LOG_FUNCTION.

◆ GetRemoteController() [2/3]

Ptr< OFSwitch13Device::RemoteController > ns3::OFSwitch13Device::GetRemoteController ( Ptr< Socket socket)
private

Get the remote controller for this socket.

Parameters
socketThe connection socket.
Returns
The remote controller.

Definition at line 1379 of file ofswitch13-device.cc.

References m_controllers, NS_ABORT_MSG, and NS_LOG_FUNCTION.

Referenced by ReceiveFromController(), SocketCtrlSucceeded(), and StartControllerConnection().

+ Here is the caller graph for this function:

◆ GetRemoteController() [3/3]

Ptr< OFSwitch13Device::RemoteController > ns3::OFSwitch13Device::GetRemoteController ( struct remote *  remote)
private

Get the remote controller for this BOFUSS remote pointer.

Parameters
remoteThe BOFUSS remote pointer.
Returns
The remote controller.

Definition at line 1409 of file ofswitch13-device.cc.

References m_controllers, NS_ABORT_MSG, and NS_LOG_FUNCTION.

◆ GetSumFlowEntries()

uint32_t ns3::OFSwitch13Device::GetSumFlowEntries ( ) const

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Definition at line 413 of file ofswitch13-device.cc.

References GetFlowTableEntries(), and GetNPipelineTables().

Referenced by DatapathTimeout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSwitchPort()

Ptr< OFSwitch13Port > ns3::OFSwitch13Device::GetSwitchPort ( uint32_t  no) const

Get the OFSwitch13Port pointer from its number.

Parameters
noThe port number (starting at 1).
Returns
A pointer to the corresponding OFSwitch13Port.

Definition at line 451 of file ofswitch13-device.cc.

References m_ports, NS_ASSERT_MSG, and NS_LOG_FUNCTION.

Referenced by SendToSwitchPort().

+ Here is the caller graph for this function:

◆ GetTypeId()

◆ MeterCreatedCallback()

void ns3::OFSwitch13Device::MeterCreatedCallback ( struct meter_entry *  entry)
static

Callback fired when a new meter entry is created at meter table.

Parameters
entryThe new created meter entry.

Definition at line 619 of file ofswitch13-device.cc.

References GetDevice().

Referenced by DatapathNew().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MeterDropCallback()

void ns3::OFSwitch13Device::MeterDropCallback ( struct packet *  pkt,
struct meter_entry *  entry 
)
static

Callback fired when a packet is dropped by meter band.

Parameters
pktThe original internal packet.
entryThe meter entry that dropped the packet.

Definition at line 626 of file ofswitch13-device.cc.

References GetDevice().

Referenced by DatapathNew().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NotifyConstructionCompleted()

void ns3::OFSwitch13Device::NotifyConstructionCompleted ( )
overrideprotectedvirtual

TracedCallback signature for packets dropped by meter bands.

Parameters
packetThe dropped packet.
meterIdThe meter entry ID that dropped the packet.

Reimplemented from ns3::ObjectBase.

Definition at line 718 of file ofswitch13-device.cc.

References DatapathNew(), DatapathTimeout(), GetDftFlowTableSize(), GetGroupTableSize(), GetMeterTableSize(), m_datapath, ns3::ObjectBase::NotifyConstructionCompleted(), NS_LOG_FUNCTION, SetDftFlowTableSize(), SetGroupTableSize(), and SetMeterTableSize().

+ Here is the call graph for this function:

◆ NotifyMeterEntryCreated()

void ns3::OFSwitch13Device::NotifyMeterEntryCreated ( struct meter_entry *  entry)
private

Notify this device of a new meter entry created at meter table.

This is used to update the initial number of tokens for this meter. Doing this, we avoid the problem of discarding the initial packets before the next datapath timeout.

Parameters
entryThe new created meter entry.

Definition at line 1220 of file ofswitch13-device.cc.

References ns3::Time::GetMilliSeconds(), m_lastTimeout, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ NotifyPacketCloned()

void ns3::OFSwitch13Device::NotifyPacketCloned ( struct packet *  pkt,
struct packet *  clone 
)
private

Notify this device of a packet cloned by the OpenFlow pipeline.

Parameters
pktThe original BOFUSS packet.
cloneThe cloned BOFUSS packet.

Definition at line 1235 of file ofswitch13-device.cc.

References GetNewPacketId(), m_pipePkt, ns3::OFSwitch13Device::PipelinePacket::NewCopy(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ NotifyPacketDestroyed()

void ns3::OFSwitch13Device::NotifyPacketDestroyed ( struct packet *  pkt)
private

Notify this device of a packet destroyed by the OpenFlow pipeline.

Parameters
pktThe BOFUSS packet.

Definition at line 1245 of file ofswitch13-device.cc.

References BufferPacketDelete(), ns3::OFSwitch13Device::PipelinePacket::DelCopy(), ns3::OFSwitch13Device::PipelinePacket::HasId(), ns3::OFSwitch13Device::PipelinePacket::IsValid(), m_pipePkt, NS_ASSERT_MSG, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ NotifyPacketDroppedByMeter()

void ns3::OFSwitch13Device::NotifyPacketDroppedByMeter ( struct packet *  pkt,
struct meter_entry *  entry 
)
private

Notify this device of a packet dropped by OpenFlow meter band.

Parameters
pktThe BOFUSS packet.
entryThe meter entry that dropped the packet.

Definition at line 1283 of file ofswitch13-device.cc.

References ns3::OFSwitch13Device::PipelinePacket::GetPacket(), ns3::OFSwitch13Device::PipelinePacket::HasId(), m_meterDropTrace, m_pipePkt, NS_ASSERT_MSG, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ NotifyPacketDroppedByTable()

void ns3::OFSwitch13Device::NotifyPacketDroppedByTable ( struct packet *  pkt,
struct flow_table *  table 
)
private

Notify this device of an unmatched packet dropped by OpenFlow flow table without a table-miss entry.

Parameters
pktThe BOFUSS packet.
tableThe flow table that dropped the packet.

Definition at line 1298 of file ofswitch13-device.cc.

References ns3::OFSwitch13Device::PipelinePacket::GetPacket(), ns3::OFSwitch13Device::PipelinePacket::HasId(), m_pipePkt, m_tableDropTrace, NS_ASSERT_MSG, NS_LOG_DEBUG, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ PacketCloneCallback()

void ns3::OFSwitch13Device::PacketCloneCallback ( struct packet *  pkt,
struct packet *  clone 
)
static

Callback fired when a packet is cloned.

Parameters
pktThe internal original packet.
cloneThe internal cloned packet.

Definition at line 642 of file ofswitch13-device.cc.

References GetDevice().

Referenced by DatapathNew().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PacketDestroyCallback()

void ns3::OFSwitch13Device::PacketDestroyCallback ( struct packet *  pkt)
static

Callback fired when a packet is destroyed.

Parameters
pktThe internal packet destroyed.

Definition at line 649 of file ofswitch13-device.cc.

References GetDevice().

Referenced by DatapathNew().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReceiveFromController()

void ns3::OFSwitch13Device::ReceiveFromController ( Ptr< Packet packet,
Address  from 
)
private

Receive an OpenFlow packet from controller.

See also
remote_rconn_run () at udatapath/datapath.c.
Parameters
packetThe packet with the OpenFlow message.
fromThe packet sender address.

Definition at line 1035 of file ofswitch13-device.cc.

References ns3::BufferFromPacket(), ns3::InetSocketAddress::ConvertFrom(), ns3::InetSocketAddress::GetIpv4(), GetRemoteController(), ns3::Packet::GetSize(), m_cFlowMod, m_cGroupMod, m_cMeterMod, m_cPacketOut, m_datapath, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ReplyWithErrorMessage().

Referenced by SocketCtrlSucceeded().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReceiveFromSwitchPort()

void ns3::OFSwitch13Device::ReceiveFromSwitchPort ( Ptr< Packet packet,
uint32_t  portNo,
uint64_t  tunnelId = 0 
)

Called when a packet is received on one of the switch's ports.

This method will schedule the packet for OpenFlow pipeline.

Parameters
packetThe packet.
portNoThe switch input port number.
tunnelIdThe metadata associated with a logical port.

Definition at line 461 of file ofswitch13-device.cc.

References ns3::Packet::GetSize(), m_cpuConsumed, m_cpuTokens, m_loadDropTrace, m_pipeDelay, m_pipePacketTrace, NS_LOG_DEBUG, NS_LOG_FUNCTION, ns3::Simulator::Schedule(), and SendToPipeline().

+ Here is the call graph for this function:

◆ RegisterDatapath()

void ns3::OFSwitch13Device::RegisterDatapath ( uint64_t  id,
Ptr< OFSwitch13Device dev 
)
staticprivate

Insert a new OpenFlow device in global map.

Called by device constructor.

Parameters
idThe datapath id.
devThe Ptr<OFSwitch13Device> pointer.

Definition at line 1460 of file ofswitch13-device.cc.

References m_globalSwitchMap, and NS_ABORT_MSG_IF.

Referenced by OFSwitch13Device().

+ Here is the caller graph for this function:

◆ ReplyWithErrorMessage()

int ns3::OFSwitch13Device::ReplyWithErrorMessage ( ofl_err  error,
struct ofpbuf *  buffer,
struct sender *  senderCtrl 
)
private

Create an OpenFlow error message and send it back to the sender controller.

This function is used only when an error occurred while processing an OpenFlow message received from the controller.

Parameters
errorThe error code.
bufferThe message buffer that originated the error.
senderCtrlThe origin of a received OpenFlow message.
Returns
0 if everything's ok, otherwise an error number.

Definition at line 1149 of file ofswitch13-device.cc.

References m_datapath, NS_LOG_ERROR, and NS_LOG_FUNCTION.

Referenced by ReceiveFromController().

+ Here is the caller graph for this function:

◆ SendOpenflowBufferToRemote()

int ns3::OFSwitch13Device::SendOpenflowBufferToRemote ( struct ofpbuf *  buffer,
struct remote *  remote 
)
static

Overriding BOFUSS send_openflow_buffer_to_remote weak function from udatapath/datapath.c.

Sends the given OFLib buffer message to the controller associated with remote connection structure.

Internal:
This function relies on the global map that stores OpenFlow devices to call the method on the correct object.
Parameters
bufferThe message buffer to send.
remoteThe remote controller connection information.
Returns
0 if everything's ok, otherwise an error number.

Definition at line 547 of file ofswitch13-device.cc.

References GetDevice(), and ns3::PacketFromBuffer().

Referenced by send_openflow_buffer_to_remote().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendPacketInMessage()

int ns3::OFSwitch13Device::SendPacketInMessage ( struct packet *  pkt,
uint8_t  tableId,
uint8_t  reason,
uint16_t  maxLength,
uint64_t  cookie = 0 
)
private

Create an OpenFlow packet in message and send the packet to all controllers with open connections.

Parameters
pktThe internal packet to send.
tableIdID of the table that was looked up.
reasonReason packet is being sent (on of OFPR_*).
maxLengthMax length of packet to send to controller.
cookiePacket cookie to send to controller.
Returns
0 if everything's ok, otherwise an error number.

Definition at line 903 of file ofswitch13-device.cc.

References m_cPacketIn, and NS_LOG_FUNCTION.

◆ SendPacketToController()

void ns3::OFSwitch13Device::SendPacketToController ( struct pipeline *  pl,
struct packet *  pkt,
uint8_t  tableId,
uint8_t  reason 
)
static

Overriding BOFUSS send_packet_to_controller weak function from udatapath/pipeline.c.

Sends the given packet to controller(s) in a packet_in message.

Internal:
This function relies on the global map that stores OpenFlow devices to call the method on the correct object.
Parameters
plThe pipeline structure.
pktThe internal packet to send.
tableIdID of the table that was looked up.
reasonReason packet is being sent (on of OFPR_*).

Definition at line 534 of file ofswitch13-device.cc.

References GetDevice().

Referenced by send_packet_to_controller().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendToController()

int ns3::OFSwitch13Device::SendToController ( Ptr< Packet packet,
Ptr< OFSwitch13Device::RemoteController remoteCtrl 
)
private

Send a packet to the controller node.

See also
SendOpenflowBufferToRemote ().
Attention
Don't use this method to directly send messages to controller. Use dp_send_message () instead, as it deals with multiple connections and check async config.
Parameters
packetThe ns-3 packet to send.
remoteCtrlThe remote controller object to send the packet.
Returns
0 if everything's ok, otherwise an error number.

Definition at line 1021 of file ofswitch13-device.cc.

References NS_LOG_ERROR.

◆ SendToPipeline()

void ns3::OFSwitch13Device::SendToPipeline ( Ptr< Packet packet,
uint32_t  portNo,
uint64_t  tunnelId = 0 
)
private

Send the packet to the OpenFlow BOFUSS pipeline.

Parameters
packetThe packet.
portNoThe switch input port number.
tunnelIdThe metadata associated with a logical port.

Definition at line 995 of file ofswitch13-device.cc.

References ns3::BufferFromPacket(), GetNewPacketId(), ns3::Packet::GetSize(), ns3::OFSwitch13Device::PipelinePacket::IsValid(), m_datapath, m_pipePkt, NS_ASSERT_MSG, NS_LOG_FUNCTION, and ns3::OFSwitch13Device::PipelinePacket::SetPacket().

Referenced by ReceiveFromSwitchPort().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendToSwitchPort()

bool ns3::OFSwitch13Device::SendToSwitchPort ( struct packet *  pkt,
uint32_t  portNo,
uint32_t  queueNo = 0 
)
private

Send a message over a specific switch port.

Check port configuration, get the ns-3 packet and send the packet over the proper OpenFlow port.

See also
DpActionsOutputPort ().
Parameters
pktThe internal packet to send.
portNoThe port number.
queueNoThe queue number.
Returns
True if success, false otherwise.

Definition at line 941 of file ofswitch13-device.cc.

References CopyTags(), ns3::OFSwitch13Device::PipelinePacket::GetPacket(), GetSwitchPort(), ns3::OFSwitch13Device::PipelinePacket::HasId(), ns3::OFSwitch13Device::PipelinePacket::IsValid(), m_pipePkt, NS_ASSERT_MSG, NS_LOG_DEBUG, NS_LOG_ERROR, NS_LOG_FUNCTION, ns3::PacketFromBuffer(), and port.

+ Here is the call graph for this function:

◆ SetDftFlowTableSize()

void ns3::OFSwitch13Device::SetDftFlowTableSize ( uint32_t  value)
private

Structure to save the list of ports in this datapath.

Definition at line 810 of file ofswitch13-device.cc.

References GetNPipelineTables(), m_datapath, m_flowTabSize, NS_LOG_FUNCTION, SetFlowTableSize(), and second::value.

Referenced by GetTypeId(), and NotifyConstructionCompleted().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetFlowTableSize()

void ns3::OFSwitch13Device::SetFlowTableSize ( uint8_t  tableId,
uint32_t  value 
)
private

Structure to save the list of ports in this datapath.

Definition at line 799 of file ofswitch13-device.cc.

References GetFlowTableEntries(), m_datapath, NS_ABORT_MSG_IF, NS_ASSERT_MSG, NS_LOG_FUNCTION, and second::value.

Referenced by SetDftFlowTableSize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetGroupTableSize()

void ns3::OFSwitch13Device::SetGroupTableSize ( uint32_t  value)
private

Structure to save the list of ports in this datapath.

Definition at line 825 of file ofswitch13-device.cc.

References GetGroupTableEntries(), m_datapath, m_groupTabSize, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, and second::value.

Referenced by GetTypeId(), and NotifyConstructionCompleted().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetMeterTableSize()

void ns3::OFSwitch13Device::SetMeterTableSize ( uint32_t  value)
private

Structure to save the list of ports in this datapath.

Definition at line 842 of file ofswitch13-device.cc.

References GetMeterTableEntries(), m_datapath, m_meterTabSize, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, and second::value.

Referenced by GetTypeId(), and NotifyConstructionCompleted().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SocketCtrlFailed()

void ns3::OFSwitch13Device::SocketCtrlFailed ( Ptr< Socket socket)
private

Socket callback fired when a TCP connection to controller fail.

Parameters
socketThe TCP socket.

Definition at line 1200 of file ofswitch13-device.cc.

References m_controllers, NS_LOG_ERROR, and NS_LOG_FUNCTION.

Referenced by StartControllerConnection().

+ Here is the caller graph for this function:

◆ SocketCtrlSucceeded()

void ns3::OFSwitch13Device::SocketCtrlSucceeded ( Ptr< Socket socket)
private

Socket callback fired when a TCP connection to controller succeed.

Parameters
socketThe TCP socket.

Definition at line 1172 of file ofswitch13-device.cc.

References GetRemoteController(), m_datapath, ns3::MakeCallback(), NS_LOG_FUNCTION, NS_LOG_INFO, and ReceiveFromController().

Referenced by StartControllerConnection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StartControllerConnection()

void ns3::OFSwitch13Device::StartControllerConnection ( Address  ctrlAddr)

Starts the TCP connection between this switch and the target controller indicated by the address parameter.

Parameters
ctrlAddrThe controller address used to open the connection.

Definition at line 491 of file ofswitch13-device.cc.

References ns3::Socket::Bind(), ns3::Socket::Connect(), ns3::InetSocketAddress::ConvertFrom(), ns3::Socket::CreateSocket(), GetRemoteController(), ns3::Address::IsInvalid(), ns3::InetSocketAddress::IsMatchingType(), ns3::TypeId::LookupByName(), m_controllers, ns3::MakeCallback(), NS_ASSERT, NS_ASSERT_MSG, NS_LOG_ERROR, NS_LOG_FUNCTION, ns3::ObjectBase::SetAttribute(), ns3::Socket::SetConnectCallback(), SocketCtrlFailed(), and SocketCtrlSucceeded().

+ Here is the call graph for this function:

◆ TableDropCallback()

void ns3::OFSwitch13Device::TableDropCallback ( struct packet *  pkt,
struct flow_table *  table 
)
static

Callback fired when an unmatched packet is dropped by a flow table without a table-miss entry.

Parameters
pktThe original internal packet.
tableThe flow table that dropped the packet.

Definition at line 634 of file ofswitch13-device.cc.

References GetDevice().

Referenced by DatapathNew().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UnregisterDatapath()

void ns3::OFSwitch13Device::UnregisterDatapath ( uint64_t  id)
staticprivate

Remove an existing OpenFlow device from global map.

Called by DoDispose.

Parameters
idThe datapath id.

Definition at line 1468 of file ofswitch13-device.cc.

References m_globalSwitchMap, and NS_ABORT_MSG.

Referenced by DoDispose().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_bufferExpireTrace

TracedCallback<Ptr<const Packet> > ns3::OFSwitch13Device::m_bufferExpireTrace
private

Trace source fired when a packet in buffer expires.

Definition at line 620 of file ofswitch13-device.h.

Referenced by BufferPacketDelete(), and GetTypeId().

◆ m_bufferPkts

IdPacketMap_t ns3::OFSwitch13Device::m_bufferPkts
private

Packets saved in switch buffer.

Definition at line 670 of file ofswitch13-device.h.

Referenced by BufferPacketDelete(), BufferPacketRetrieve(), BufferPacketSave(), DoDispose(), and GetBufferEntries().

◆ m_bufferRetrieveTrace

TracedCallback<Ptr<const Packet> > ns3::OFSwitch13Device::m_bufferRetrieveTrace
private

Trace source fired when a packet is retrieved from buffer.

Definition at line 623 of file ofswitch13-device.h.

Referenced by BufferPacketRetrieve(), and GetTypeId().

◆ m_bufferSaveTrace

TracedCallback<Ptr<const Packet> > ns3::OFSwitch13Device::m_bufferSaveTrace
private

Trace source fired when a packet is saved into buffer.

Definition at line 626 of file ofswitch13-device.h.

Referenced by BufferPacketSave(), and GetTypeId().

◆ m_bufferSize

uint32_t ns3::OFSwitch13Device::m_bufferSize
private

Buffer size in terms of packets.

Definition at line 671 of file ofswitch13-device.h.

Referenced by DatapathNew(), and GetBufferSize().

◆ m_cFlowMod

uint64_t ns3::OFSwitch13Device::m_cFlowMod
private

Pipeline flow mod counter.

Definition at line 676 of file ofswitch13-device.h.

Referenced by GetFlowModCounter(), and ReceiveFromController().

◆ m_cGroupMod

uint64_t ns3::OFSwitch13Device::m_cGroupMod
private

Pipeline group mod counter.

Definition at line 677 of file ofswitch13-device.h.

Referenced by GetGroupModCounter(), and ReceiveFromController().

◆ m_cMeterMod

uint64_t ns3::OFSwitch13Device::m_cMeterMod
private

Pipeline meter mod counter.

Definition at line 678 of file ofswitch13-device.h.

Referenced by GetMeterModCounter(), and ReceiveFromController().

◆ m_controllers

CtrlList_t ns3::OFSwitch13Device::m_controllers
private

Collection of active controllers.

Definition at line 665 of file ofswitch13-device.h.

Referenced by DoDispose(), GetNControllers(), GetRemoteController(), SocketCtrlFailed(), and StartControllerConnection().

◆ m_cPacketIn

uint64_t ns3::OFSwitch13Device::m_cPacketIn
private

Pipeline packet in counter.

Definition at line 679 of file ofswitch13-device.h.

Referenced by GetPacketInCounter(), and SendPacketInMessage().

◆ m_cPacketOut

uint64_t ns3::OFSwitch13Device::m_cPacketOut
private

Pipeline packet out counter.

Definition at line 680 of file ofswitch13-device.h.

Referenced by GetPacketOutCounter(), and ReceiveFromController().

◆ m_cpuCapacity

DataRate ns3::OFSwitch13Device::m_cpuCapacity
private

CPU processing capacity.

Definition at line 673 of file ofswitch13-device.h.

Referenced by DatapathTimeout(), GetCpuCapacity(), and GetTypeId().

◆ m_cpuConsumed

uint64_t ns3::OFSwitch13Device::m_cpuConsumed
private

CPU processing tokens consumed.

Definition at line 674 of file ofswitch13-device.h.

Referenced by DatapathTimeout(), and ReceiveFromSwitchPort().

◆ m_cpuLoad

TracedValue<DataRate> ns3::OFSwitch13Device::m_cpuLoad
private

Average CPU processing load.

Definition at line 656 of file ofswitch13-device.h.

Referenced by DatapathTimeout(), GetCpuLoad(), and GetTypeId().

◆ m_cpuTokens

uint64_t ns3::OFSwitch13Device::m_cpuTokens
private

CPU processing tokens available.

Definition at line 675 of file ofswitch13-device.h.

Referenced by DatapathTimeout(), and ReceiveFromSwitchPort().

◆ m_datapath

◆ m_datapathTimeoutTrace

TracedCallback<Ptr<const OFSwitch13Device> > ns3::OFSwitch13Device::m_datapathTimeoutTrace
private

Trace source fired when the datapath timeout operation is completed.

Definition at line 629 of file ofswitch13-device.h.

Referenced by DatapathTimeout(), and GetTypeId().

◆ m_dpId

uint64_t ns3::OFSwitch13Device::m_dpId
private

This datapath id.

Definition at line 658 of file ofswitch13-device.h.

Referenced by OFSwitch13Device(), DatapathNew(), DoDispose(), GetDatapathId(), GetDpId(), and GetTypeId().

◆ m_flowTabSize

uint32_t ns3::OFSwitch13Device::m_flowTabSize
private

Flow table maximum entries.

Definition at line 666 of file ofswitch13-device.h.

Referenced by GetDftFlowTableSize(), and SetDftFlowTableSize().

◆ m_globalDpId

uint64_t ns3::OFSwitch13Device::m_globalDpId = 0
staticprivate

Global counter for datapath IDs.

Definition at line 682 of file ofswitch13-device.h.

Referenced by OFSwitch13Device().

◆ m_globalPktId

uint64_t ns3::OFSwitch13Device::m_globalPktId = 0
staticprivate

Global counter for packets IDs.

Definition at line 683 of file ofswitch13-device.h.

Referenced by GetNewPacketId().

◆ m_globalSwitchMap

OFSwitch13Device::DpIdDevMap_t ns3::OFSwitch13Device::m_globalSwitchMap
staticprivate

As the integration of BOFUSS and ns-3 involve overriding some C functions, we are using a global map to store a pointer to all OFSwitch13Device objects in simulation, and allow faster object retrieve by datapath id.

In this way, static functions like SendOpenflowBufferToRemote, DpActionsOutputPort, and other callbacks can get the object pointer and call member functions.

Definition at line 693 of file ofswitch13-device.h.

Referenced by GetDevice(), RegisterDatapath(), and UnregisterDatapath().

◆ m_groupEntries

TracedValue<uint32_t> ns3::OFSwitch13Device::m_groupEntries
private

Number of entries in group table.

Definition at line 644 of file ofswitch13-device.h.

Referenced by DatapathTimeout(), and GetTypeId().

◆ m_groupTabSize

uint32_t ns3::OFSwitch13Device::m_groupTabSize
private

Group table maximum entries.

Definition at line 667 of file ofswitch13-device.h.

Referenced by GetGroupTableSize(), and SetGroupTableSize().

◆ m_lastTimeout

Time ns3::OFSwitch13Device::m_lastTimeout
private

Datapath last timeout.

Definition at line 660 of file ofswitch13-device.h.

Referenced by DatapathNew(), DatapathTimeout(), and NotifyMeterEntryCreated().

◆ m_libLog

std::string ns3::OFSwitch13Device::m_libLog
private

The BOFUSS library log level.

Definition at line 662 of file ofswitch13-device.h.

◆ m_loadDropTrace

TracedCallback<Ptr<const Packet> > ns3::OFSwitch13Device::m_loadDropTrace
private

Trace source fired when a packet is dropped due to overloaded switch.

Definition at line 632 of file ofswitch13-device.h.

Referenced by GetTypeId(), and ReceiveFromSwitchPort().

◆ m_meterDropTrace

TracedCallback<Ptr<const Packet>, uint32_t> ns3::OFSwitch13Device::m_meterDropTrace
private

Trace source fired when a packet is dropped by a meter band.

Definition at line 635 of file ofswitch13-device.h.

Referenced by GetTypeId(), and NotifyPacketDroppedByMeter().

◆ m_meterEntries

TracedValue<uint32_t> ns3::OFSwitch13Device::m_meterEntries
private

Number of entries in meter table.

Definition at line 647 of file ofswitch13-device.h.

Referenced by DatapathTimeout(), and GetTypeId().

◆ m_meterTabSize

uint32_t ns3::OFSwitch13Device::m_meterTabSize
private

Meter table maximum entries.

Definition at line 668 of file ofswitch13-device.h.

Referenced by GetMeterTableSize(), and SetMeterTableSize().

◆ m_numPipeTabs

uint32_t ns3::OFSwitch13Device::m_numPipeTabs
private

Number of pipeline flow tables.

Definition at line 669 of file ofswitch13-device.h.

Referenced by GetNPipelineTables(), and GetTypeId().

◆ m_pipeDelay

TracedValue<Time> ns3::OFSwitch13Device::m_pipeDelay
private

Average delay for pipeline packet processing.

Definition at line 653 of file ofswitch13-device.h.

Referenced by DatapathTimeout(), GetPipelineDelay(), GetTypeId(), and ReceiveFromSwitchPort().

◆ m_pipePacketTrace

TracedCallback<Ptr<const Packet> > ns3::OFSwitch13Device::m_pipePacketTrace
private

Trace source fired when a packet is sent to pipeline.

Definition at line 641 of file ofswitch13-device.h.

Referenced by GetTypeId(), and ReceiveFromSwitchPort().

◆ m_pipePkt

◆ m_ports

PortList_t ns3::OFSwitch13Device::m_ports
private

List of switch ports.

Definition at line 664 of file ofswitch13-device.h.

Referenced by AddSwitchPort(), DatapathTimeout(), DoDispose(), GetNSwitchPorts(), GetSwitchPort(), and GetTypeId().

◆ m_sumFlowEntries

TracedValue<uint32_t> ns3::OFSwitch13Device::m_sumFlowEntries
private

Sum of entries in all flow tables.

Definition at line 650 of file ofswitch13-device.h.

Referenced by DatapathTimeout(), and GetTypeId().

◆ m_tableDropTrace

TracedCallback<Ptr<const Packet>, uint8_t> ns3::OFSwitch13Device::m_tableDropTrace
private

Trace source fired when an unmatched packet is dropped by flow table.

Definition at line 638 of file ofswitch13-device.h.

Referenced by GetTypeId(), and NotifyPacketDroppedByTable().

◆ m_tcamDelay

Time ns3::OFSwitch13Device::m_tcamDelay
private

Flow Table TCAM lookup delay.

Definition at line 661 of file ofswitch13-device.h.

Referenced by DatapathTimeout(), and GetTypeId().

◆ m_timeout

Time ns3::OFSwitch13Device::m_timeout
private

Datapath timeout interval.

Definition at line 659 of file ofswitch13-device.h.

Referenced by DatapathTimeout(), GetDatapathTimeout(), and GetTypeId().


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