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
 
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
 
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

◆ list

#define list   List

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

Referenced by visualizer.ipython_view.IterableIPShell::__update_namespace(), ns3::ByteTagList::AddAtEnd(), ns3::ByteTagList::AddAtStart(), ns3::Packet::AddByteTag(), ns3::AodvHelper::AssignStreams(), ns3::RipNgHelper::AssignStreams(), ns3::RipHelper::AssignStreams(), ns3::OlsrHelper::AssignStreams(), LteIpv6RoutingTestCase::Checker(), ns3::UplinkSchedulerMBQoS::CheckMinimumBandwidth(), ns3::LteInterference::ConditionallyEvaluateChunk(), ns3::SimpleOfdmWimaxPhy::ConvertBurstToBits(), ns3::PacketBurst::Copy(), ns3::UplinkSchedulerMBQoS::CountSymbolsQueue(), ns3::Ipv4ListRoutingHelper::Create(), ns3::Ipv6ListRoutingHelper::Create(), ns3::BaseStationNetDevice::CreateDlMap(), ns3::MacLow::CtsTimeout(), ns3::TrafficControlHelper::DoAddChildQueueDiscs(), ns3::TrafficControlHelper::DoAddQueueDiscClasses(), ns3::FlowMonitor::DoDispose(), ns3::SimpleOfdmWimaxChannel::DoGetDevice(), ns3::BaseStationNetDevice::DoReceive(), ns3::SubscriberStationNetDevice::DoReceive(), ns3::LteUeMac::DoReceiveLteControlMessage(), Ns3WimaxFragmentationTestCase::DoRun(), ThreadedSimulatorEventsTestCase::DoRun(), ns3::LteEnbMac::DoSchedDlConfigInd(), ns3::dsr::DsrErrorBuffer::DropPacketForErrLink(), ThreadedSimulatorEventsTestCase::End(), ns3::LteInterference::EndRx(), ns3::LteSpectrumPhy::EndRxData(), ns3::LteHarqPhy::GetAccumulatedMiDl(), ns3::LteHarqPhy::GetAccumulatedMiUl(), ns3::Ipv6ExtensionFragment::GetFragments(), ns3::Ipv6ExtensionFragment::Fragments::GetPacket(), ns3::PyViz::GetPacketDropSamples(), ns3::TcpTxBuffer::GetPacketFromList(), ns3::Ipv6ExtensionFragment::Fragments::GetPartialPacket(), ns3::UplinkSchedulerMBQoS::GetPendingSize(), ns3::PacketBurst::GetSize(), ns3::PyViz::GetTransmissionSamples(), ns3::SixLowPanNetDevice::HandleFragmentsTimeout(), ns3::IpcsClassifierRecord::IpcsClassifierRecord(), ns3::Ipv6ExtensionFragment::Fragments::IsEntire(), ns3::SixLowPanNetDevice::Fragments::IsEntire(), ns3::Ipv4L3Protocol::Fragments::IsEntire(), visualizer.base::load_plugins(), ns3::AnimationInterface::LteSpectrumPhyRxStart(), ns3::AnimationInterface::LteSpectrumPhyTxStart(), ns3::ChannelAccessManager::MostRecent(), ns3::operator<<(), ns3::PcapSniffTxRxEvent(), ns3::SixLowPanNetDevice::ProcessFragment(), ns3::WimaxNetDevice::Receive(), ns3::Reservation::Reservation(), Experiment::Run(), RoutingExperiment::Run(), ns3::SimpleOfdmWimaxChannel::Send(), ns3::Radvd::Send(), ns3::FlowMonitor::SerializeToXmlStream(), ns3::RipNgHelper::SetDefaultRouter(), ns3::RipHelper::SetDefaultRouter(), RoutingHelper::SetupRoutingProtocol(), ns3::LteInterference::StartRx(), ns3::TcpTxBuffer::Update(), ns3::LteHarqPhy::UpdateUlHarqProcessStatus(), ns3::Ipv4ListRoutingHelper::~Ipv4ListRoutingHelper(), ns3::Ipv6ListRoutingHelper::~Ipv6ListRoutingHelper(), and ns3::PacketBurst::~PacketBurst().

◆ N_PKT_BUFFERS

#define N_PKT_BUFFERS   (1 << PKT_BUFFER_BITS)

Definition at line 553 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 552 of file openflow-interface.h.

◆ PKT_BUFFER_MASK

#define PKT_BUFFER_MASK   (N_PKT_BUFFERS - 1)

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

◆ PKT_COOKIE_BITS

#define PKT_COOKIE_BITS   (32 - PKT_BUFFER_BITS)

Definition at line 555 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 
)