A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
openflow-interface.h File Reference
#include <assert.h>
#include <errno.h>
#include "ns3/address.h"
#include "ns3/log.h"
#include "ns3/mac48-address.h"
#include "ns3/net-device.h"
#include "ns3/nstime.h"
#include "ns3/packet.h"
#include "ns3/simulator.h"
#include <limits>
#include <map>
#include <set>
#include "openflow/ericsson-ext.h"
#include "openflow/nicira-ext.h"
#include "openflow/openflow.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/datapath.h"
#include "openflow/private/table.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

namespace  ns3
 Every class exported by the ns3 library is enclosed in the ns3 namespace.
 
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    (OFPC_FLOW_STATS | OFPC_TABLE_STATS | OFPC_PORT_STATS | OFPC_MULTI_PHY_TX | OFPC_VPORT_TABLE)
 
#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.
 
void ns3::ofi::ExecuteVendor (ofpbuf *buffer, const sw_flow_key *key, const ofp_action_header *ah)
 Executes a vendor-defined 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.
 
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.
 
uint16_t ns3::ofi::ValidateVendor (const sw_flow_key *key, const ofp_action_header *ah, uint16_t len)
 Validates a vendor-defined action.
 
uint16_t ns3::ofi::ValidateVPortActions (const ofp_action_header *actions, size_t actions_len)
 Validates a list of virtual port table entry actions.
 

Macro Definition Documentation

◆ delete

#define delete   _delete

◆ list

◆ N_PKT_BUFFERS

#define N_PKT_BUFFERS   (1 << PKT_BUFFER_BITS)

◆ 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 76 of file openflow-interface.h.

Referenced by ns3::OpenFlowSwitchNetDevice::SendFeaturesReply().

◆ OFP_SUPPORTED_CAPABILITIES

#define OFP_SUPPORTED_CAPABILITIES    (OFPC_FLOW_STATS | OFPC_TABLE_STATS | OFPC_PORT_STATS | OFPC_MULTI_PHY_TX | OFPC_VPORT_TABLE)

◆ 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 84 of file openflow-interface.h.

Referenced by ns3::OpenFlowSwitchNetDevice::SendVPortTableFeatures().

◆ PKT_BUFFER_BITS

#define PKT_BUFFER_BITS   8

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

◆ PKT_BUFFER_MASK

#define PKT_BUFFER_MASK   (N_PKT_BUFFERS - 1)

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

◆ PKT_COOKIE_BITS

#define PKT_COOKIE_BITS   (32 - PKT_BUFFER_BITS)

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

◆ private

#define private   _private

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

Function Documentation

◆ discard_buffer()

void discard_buffer ( uint32_t id)

Referenced by ns3::OpenFlowSwitchNetDevice::AddFlow(), ns3::OpenFlowSwitchNetDevice::FlowTableLookup(), and ns3::OpenFlowSwitchNetDevice::ModFlow().

+ Here is the caller graph for this function:

◆ retrieve_buffer()

ofpbuf * retrieve_buffer ( uint32_t id)

Referenced by ns3::OpenFlowSwitchNetDevice::AddFlow(), ns3::OpenFlowSwitchNetDevice::ModFlow(), and ns3::OpenFlowSwitchNetDevice::ReceivePacketOut().

+ Here is the caller graph for this function:

◆ save_buffer()

uint32_t save_buffer ( ofpbuf * )

Referenced by ns3::OpenFlowSwitchNetDevice::ReceiveFromDevice(), and ns3::OpenFlowSwitchNetDevice::SendFrom().

+ Here is the caller graph for this function:

◆ set_dl_addr()

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

Referenced by ns3::ofi::Action::Execute().

+ Here is the caller graph for this function:

◆ set_mpls_exp()

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

Referenced by ns3::ofi::Action::Execute().

+ Here is the caller graph for this function:

◆ set_mpls_label()

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

Referenced by ns3::ofi::Action::Execute().

+ Here is the caller graph for this function:

◆ set_nw_addr()

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

Referenced by ns3::ofi::Action::Execute().

+ Here is the caller graph for this function:

◆ set_tp_port()

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

Referenced by ns3::ofi::Action::Execute().

+ Here is the caller graph for this function:

◆ set_vlan_pcp()

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

Referenced by ns3::ofi::Action::Execute().

+ Here is the caller graph for this function:

◆ set_vlan_vid()

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

Referenced by ns3::ofi::Action::Execute().

+ Here is the caller graph for this function:

◆ strip_vlan()

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

Referenced by ns3::ofi::Action::Execute().

+ Here is the caller graph for this function: