A Discrete-Event Network Simulator
API
openflow-interface.h File Reference
#include <assert.h>
#include <errno.h>
#include "ns3/simulator.h"
#include "ns3/log.h"
#include "ns3/net-device.h"
#include "ns3/packet.h"
#include "ns3/address.h"
#include "ns3/nstime.h"
#include "ns3/mac48-address.h"
#include <set>
#include <map>
#include <limits>
#include "openflow/openflow.h"
#include "openflow/nicira-ext.h"
#include "openflow/ericsson-ext.h"
#include "openflow/private/csum.h"
#include "openflow/private/poll-loop.h"
#include "openflow/private/rconn.h"
#include "openflow/private/stp.h"
#include "openflow/private/vconn.h"
#include "openflow/private/xtoxll.h"
#include "openflow/private/chain.h"
#include "openflow/private/table.h"
#include "openflow/private/datapath.h"
#include "openflow/private/dp_act.h"
#include "openflow/private/pt_act.h"
+ Include dependency graph for openflow-interface.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ns3::ofi::Action
 Class for handling flow table actions. More...
 
class  ns3::ofi::Controller
 An interface for a Controller of OpenFlowSwitchNetDevices. More...
 
class  ns3::ofi::DropController
 Demonstration of a Drop controller. More...
 
struct  ns3::ofi::EricssonAction
 Class for handling Ericsson Vendor-defined actions. More...
 
struct  ns3::ofi::Stats::FlowStatsState
 State of the FlowStats request/reply. More...
 
struct  ns3::ofi::LearningController::LearnedState
 Learned state. More...
 
class  ns3::ofi::LearningController
 Demonstration of a Learning controller. More...
 
struct  ns3::ofi::Port
 Port and its metadata. More...
 
struct  ns3::ofi::Stats::PortStatsState
 State of the PortStats request/reply. More...
 
class  ns3::ofi::Stats
 OpenFlow statistics. More...
 
struct  ns3::ofi::StatsDumpCallback
 Callback for a stats dump request. More...
 
struct  ns3::ofi::SwitchPacketMetadata
 Packet Metadata, allows us to track the packet's metadata as it passes through the switch. More...
 
struct  ns3::ofi::VPortAction
 Class for handling virtual port table actions. More...
 

Namespaces

 ns3
 Every class exported by the ns3 library is enclosed in the ns3 namespace.
 
 ns3::ofi
 

Macros

#define delete   _delete
 
#define list   List
 
#define N_PKT_BUFFERS   (1 << PKT_BUFFER_BITS)
 
#define OFP_SUPPORTED_ACTIONS
 
#define OFP_SUPPORTED_CAPABILITIES
 
#define OFP_SUPPORTED_VPORT_TABLE_ACTIONS
 
#define PKT_BUFFER_BITS   8
 
#define PKT_BUFFER_MASK   (N_PKT_BUFFERS - 1)
 
#define PKT_COOKIE_BITS   (32 - PKT_BUFFER_BITS)
 
#define private   _private
 

Functions

void discard_buffer (uint32_t id)
 
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. More...
 
void ns3::ofi::ExecuteVendor (ofpbuf *buffer, const sw_flow_key *key, const ofp_action_header *ah)
 Executes a vendor-defined action. More...
 
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. More...
 
ofpbuf * retrieve_buffer (uint32_t id)
 
uint32_t save_buffer (ofpbuf *)
 
void set_dl_addr (ofpbuf *buffer, sw_flow_key *key, const ofp_action_header *ah)
 
void set_mpls_exp (ofpbuf *buffer, sw_flow_key *key, const ofp_action_header *ah)
 
void set_mpls_label (ofpbuf *buffer, sw_flow_key *key, const ofp_action_header *ah)
 
void set_nw_addr (ofpbuf *buffer, sw_flow_key *key, const ofp_action_header *ah)
 
void set_tp_port (ofpbuf *buffer, sw_flow_key *key, const ofp_action_header *ah)
 
void set_vlan_pcp (ofpbuf *buffer, sw_flow_key *key, const ofp_action_header *ah)
 
void set_vlan_vid (ofpbuf *buffer, sw_flow_key *key, const ofp_action_header *ah)
 
void strip_vlan (ofpbuf *buffer, sw_flow_key *key, const ofp_action_header *ah)
 
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. More...
 
uint16_t ns3::ofi::ValidateVendor (const sw_flow_key *key, const ofp_action_header *ah, uint16_t len)
 Validates a vendor-defined action. More...
 
uint16_t ns3::ofi::ValidateVPortActions (const ofp_action_header *actions, size_t actions_len)
 Validates a list of virtual port table entry actions. More...
 

Macro Definition Documentation

◆ delete

#define delete   _delete

Definition at line 46 of file openflow-interface.h.

◆ list

#define list   List

Definition at line 47 of file openflow-interface.h.

◆ N_PKT_BUFFERS

#define N_PKT_BUFFERS   (1 << PKT_BUFFER_BITS)

Definition at line 601 of file openflow-interface.h.

◆ OFP_SUPPORTED_ACTIONS

#define OFP_SUPPORTED_ACTIONS
Value:
( (1 << OFPAT_OUTPUT) \
| (1 << OFPAT_SET_VLAN_VID) \
| (1 << OFPAT_SET_VLAN_PCP) \
| (1 << OFPAT_STRIP_VLAN) \
| (1 << OFPAT_SET_DL_SRC) \
| (1 << OFPAT_SET_DL_DST) \
| (1 << OFPAT_SET_NW_SRC) \
| (1 << OFPAT_SET_NW_DST) \
| (1 << OFPAT_SET_TP_SRC) \
| (1 << OFPAT_SET_TP_DST) \
| (1 << OFPAT_SET_MPLS_LABEL) \
| (1 << OFPAT_SET_MPLS_EXP) )

Definition at line 88 of file openflow-interface.h.

◆ OFP_SUPPORTED_CAPABILITIES

#define OFP_SUPPORTED_CAPABILITIES
Value:
( OFPC_FLOW_STATS \
| OFPC_TABLE_STATS \
| OFPC_PORT_STATS \
| OFPC_MULTI_PHY_TX \
| OFPC_VPORT_TABLE)

Definition at line 81 of file openflow-interface.h.

◆ OFP_SUPPORTED_VPORT_TABLE_ACTIONS

#define OFP_SUPPORTED_VPORT_TABLE_ACTIONS
Value:
( (1 << OFPPAT_OUTPUT) \
| (1 << OFPPAT_POP_MPLS) \
| (1 << OFPPAT_PUSH_MPLS) \
| (1 << OFPPAT_SET_MPLS_LABEL) \
| (1 << OFPPAT_SET_MPLS_EXP) ) \

Definition at line 101 of file openflow-interface.h.

◆ PKT_BUFFER_BITS

#define PKT_BUFFER_BITS   8

Definition at line 600 of file openflow-interface.h.

◆ PKT_BUFFER_MASK

#define PKT_BUFFER_MASK   (N_PKT_BUFFERS - 1)

Definition at line 602 of file openflow-interface.h.

◆ PKT_COOKIE_BITS

#define PKT_COOKIE_BITS   (32 - PKT_BUFFER_BITS)

Definition at line 603 of file openflow-interface.h.

◆ private

#define private   _private

Definition at line 45 of file openflow-interface.h.

Function Documentation

◆ discard_buffer()

void discard_buffer ( uint32_t  id)

◆ retrieve_buffer()

ofpbuf* retrieve_buffer ( uint32_t  id)

◆ save_buffer()

uint32_t save_buffer ( ofpbuf *  )

◆ set_dl_addr()

void set_dl_addr ( ofpbuf *  buffer,
sw_flow_key *  key,
const ofp_action_header *  ah 
)

◆ set_mpls_exp()

void set_mpls_exp ( ofpbuf *  buffer,
sw_flow_key *  key,
const ofp_action_header *  ah 
)

◆ set_mpls_label()

void set_mpls_label ( ofpbuf *  buffer,
sw_flow_key *  key,
const ofp_action_header *  ah 
)

◆ set_nw_addr()

void set_nw_addr ( ofpbuf *  buffer,
sw_flow_key *  key,
const ofp_action_header *  ah 
)

◆ set_tp_port()

void set_tp_port ( ofpbuf *  buffer,
sw_flow_key *  key,
const ofp_action_header *  ah 
)

◆ set_vlan_pcp()

void set_vlan_pcp ( ofpbuf *  buffer,
sw_flow_key *  key,
const ofp_action_header *  ah 
)

◆ set_vlan_vid()

void set_vlan_vid ( ofpbuf *  buffer,
sw_flow_key *  key,
const ofp_action_header *  ah 
)

◆ strip_vlan()

void strip_vlan ( ofpbuf *  buffer,
sw_flow_key *  key,
const ofp_action_header *  ah 
)