A Discrete-Event Network Simulator
API
ns3::ofi Namespace Reference

Classes

struct  Action
 Class for handling flow table actions. More...
 
class  Controller
 An interface for a Controller of OpenFlowSwitchNetDevices. More...
 
class  DropController
 Demonstration of a Drop controller. More...
 
struct  EricssonAction
 Class for handling Ericsson Vendor-defined actions. More...
 
class  LearningController
 Demonstration of a Learning controller. More...
 
struct  Port
 Port and its metadata. More...
 
class  Stats
 
struct  StatsDumpCallback
 Callback for a stats dump request. More...
 
struct  SwitchPacketMetadata
 Packet Metadata, allows us to track the packet's metadata as it passes through the switch. More...
 
struct  VPortAction
 Class for handling virtual port table actions. More...
 

Functions

void ExecuteActions (Ptr< OpenFlowSwitchNetDevice > swtch, uint64_t packet_uid, ofpbuf *buffer, sw_flow_key *key, const ofp_action_header *actions, size_t actions_len, int ignore_no_fwd)
 Executes a list of flow table actions. More...
 
void ExecuteVendor (ofpbuf *buffer, const sw_flow_key *key, const ofp_action_header *ah)
 Executes a vendor-defined action. More...
 
void ExecuteVPortActions (Ptr< OpenFlowSwitchNetDevice > swtch, uint64_t packet_uid, ofpbuf *buffer, sw_flow_key *key, const ofp_action_header *actions, size_t actions_len)
 Executes a list of virtual port table entry actions. More...
 
uint16_t ValidateActions (const sw_flow_key *key, const ofp_action_header *actions, size_t actions_len)
 Validates a list of flow table actions. More...
 
uint16_t ValidateVendor (const sw_flow_key *key, const ofp_action_header *ah, uint16_t len)
 Validates a vendor-defined action. More...
 
uint16_t ValidateVPortActions (const ofp_action_header *actions, size_t actions_len)
 Validates a list of virtual port table entry actions. More...
 

Function Documentation

void ns3::ofi::ExecuteActions ( Ptr< OpenFlowSwitchNetDevice swtch,
uint64_t  packet_uid,
ofpbuf *  buffer,
sw_flow_key *  key,
const ofp_action_header *  actions,
size_t  actions_len,
int  ignore_no_fwd 
)

Executes a list of flow table actions.

Parameters
swtchOpenFlowSwitchNetDevice these actions are being executed on.
packet_uidPacket UID; used to fetch the packet and its metadata.
bufferThe Packet OpenFlow buffer.
keyThe matching key for the flow tied to this list of actions.
actionsA buffer of actions.
actions_lenLength of actions buffer.
ignore_no_fwdIf true, during port forwarding actions, ports that are set to not forward are forced to forward.
void ns3::ofi::ExecuteVendor ( ofpbuf *  buffer,
const sw_flow_key *  key,
const ofp_action_header *  ah 
)

Executes a vendor-defined action.

Parameters
bufferThe Packet OpenFlow buffer.
keyThe matching key for the flow tied to this list of actions.
ahHeader of the action.
void ns3::ofi::ExecuteVPortActions ( Ptr< OpenFlowSwitchNetDevice swtch,
uint64_t  packet_uid,
ofpbuf *  buffer,
sw_flow_key *  key,
const ofp_action_header *  actions,
size_t  actions_len 
)

Executes a list of virtual port table entry actions.

Parameters
swtchOpenFlowSwitchNetDevice these actions are being executed on.
packet_uidPacket UID; used to fetch the packet and its metadata.
bufferThe Packet OpenFlow buffer.
keyThe matching key for the flow tied to this list of actions.
actionsA buffer of actions.
actions_lenLength of actions buffer.
uint16_t ns3::ofi::ValidateActions ( const sw_flow_key *  key,
const ofp_action_header *  actions,
size_t  actions_len 
)

Validates a list of flow table actions.

Parameters
keyThe matching key for the flow tied to this list of actions.
actionsA buffer of actions.
actions_lenLength of actions buffer.
Returns
If the action list validates, ACT_VALIDATION_OK is returned. Otherwise, a code for the OFPET_BAD_ACTION error type is returned.
uint16_t ns3::ofi::ValidateVendor ( const sw_flow_key *  key,
const ofp_action_header *  ah,
uint16_t  len 
)

Validates a vendor-defined action.

Parameters
keyThe matching key for the flow tied to this list of actions.
ahHeader of the action.
lenLength of the action.
Returns
If the action list validates, ACT_VALIDATION_OK is returned. Otherwise, a code for the OFPET_BAD_ACTION error type is returned.
uint16_t ns3::ofi::ValidateVPortActions ( const ofp_action_header *  actions,
size_t  actions_len 
)

Validates a list of virtual port table entry actions.

Parameters
actionsA buffer of actions.
actions_lenLength of actions buffer.
Returns
If the action list validates, ACT_VALIDATION_OK is returned. Otherwise, a code for the OFPET_BAD_ACTION error type is returned.