Documentation
¶
Overview ¶
Package openflow/v10 implements openflow version 1.0.0
Index ¶
- Constants
- func NewActionHeader() openflow.Action
- func NewBarrierReply(xid uint32) openflow.BarrierReply
- func NewBarrierRequest(xid uint32) openflow.BarrierRequest
- func NewEchoReply(xid uint32) openflow.Echo
- func NewEchoRequest(xid uint32) openflow.Echo
- func NewEmptyPort() openflow.Port
- func NewError(xid uint32) openflow.Error
- func NewFeatureReply(xid uint32) openflow.FeatureReply
- func NewFeatureRequest(xid uint32) openflow.FeatureRequest
- func NewFlowMod(xid uint32) openflow.FlowMod
- func NewFlowRemoved(xid uint32) openflow.FlowRemoved
- func NewGetConfigReply(xid uint32) openflow.GetConfigReply
- func NewGetConfigRequest(xid uint32) openflow.GetConfigRequest
- func NewHello(xid uint32) openflow.Echo
- func NewMatch() openflow.Match
- func NewPacketIn(xid uint32) openflow.PacketIn
- func NewPacketOut(xid uint32) openflow.PacketOut
- func NewPort(pid openflow.PortID, hwAddr net.HardwareAddr, name string) (openflow.Port, error)
- func NewPortMod(xid uint32) openflow.PortMod
- func NewPortStatus(xid uint32) openflow.PortStatus
- func NewQueue() openflow.Queue
- func NewQueueGetConfigReply(xid uint32) openflow.QueueGetConfigReply
- func NewQueueGetConfigRequest(xid uint32) openflow.QueueGetConfigRequest
- func NewSetConfig(xid uint32) openflow.SetConfig
- func NewStatsReplyHeader(xid uint32) openflow.StatsRequest
- func NewStatsRequestHeader(xid uint32) openflow.StatsRequest
- func NewVendor(xid uint32) openflow.Vendor
- type ActionEnqueue
- type ActionOutput
- type ActionSetDLDst
- type ActionSetDLSrc
- type ActionSetNWDst
- type ActionSetNWSrc
- type ActionSetNWTos
- type ActionSetTPDst
- type ActionSetTPSrc
- type ActionSetVLANPCP
- type ActionSetVLANVID
- type ActionStripVLAN
- type ActionVendor
- type StatsReplyDescription
- type StatsRequestAggregate
- type StatsRequestDescription
- type StatsRequestFlow
- type StatsRequestPort
- type StatsRequestQueue
- type StatsRequestTable
- type StatsRequestVendor
Constants ¶
View Source
const ( /* Immutable messages. */ OFPT_HELLO = iota /* Symmetric message */ OFPT_ERROR /* Symmetric message */ OFPT_ECHO_REQUEST /* Symmetric message */ OFPT_ECHO_REPLY /* Symmetric message */ OFPT_VENDOR /* Symmetric message */ /* Switch configuration messages. */ OFPT_FEATURES_REQUEST /* Controller/switch message */ OFPT_FEATURES_REPLY /* Controller/switch message */ OFPT_GET_CONFIG_REQUEST /* Controller/switch message */ OFPT_GET_CONFIG_REPLY /* Controller/switch message */ OFPT_SET_CONFIG /* Controller/switch message */ /* Asynchronous messages. */ OFPT_PACKET_IN /* Async message */ OFPT_FLOW_REMOVED /* Async message */ OFPT_PORT_STATUS /* Async message */ /* Controller command messages. */ OFPT_PACKET_OUT /* Controller/switch message */ OFPT_FLOW_MOD /* Controller/switch message */ OFPT_PORT_MOD /* Controller/switch message */ /* Statistics messages. */ OFPT_STATS_REQUEST /* Controller/switch message */ OFPT_STATS_REPLY /* Controller/switch message */ /* Barrier messages. */ OFPT_BARRIER_REQUEST /* Controller/switch message */ OFPT_BARRIER_REPLY /* Controller/switch message */ /* Queue Configuration messages. */ OFPT_QUEUE_GET_CONFIG_REQUEST /* Controller/switch message */ OFPT_QUEUE_GET_CONFIG_REPLY /* Controller/switch message */ )
Openflow message types
View Source
const ( OFPAT_OUTPUT = iota /* Output to switch port. */ OFPAT_SET_VLAN_VID /* Set the 802.1q VLAN id. */ OFPAT_SET_VLAN_PCP /* Set the 802.1q priority. */ OFPAT_STRIP_VLAN /* Strip the 802.1q header. */ OFPAT_SET_DL_SRC /* Ethernet source address. */ OFPAT_SET_DL_DST /* Ethernet destination address. */ OFPAT_SET_NW_SRC /* IP source address. */ OFPAT_SET_NW_DST /* IP destination address. */ OFPAT_SET_NW_TOS /* IP ToS (DSCP field, 6 bits). */ OFPAT_SET_TP_SRC /* TCP/UDP source port. */ OFPAT_SET_TP_DST /* TCP/UDP destination port. */ OFPAT_ENQUEUE /* Output to queue. */ OFPAT_VENDOR = 0xffff )
Openflow action types
View Source
const ( OFPFW_IN_PORT = 1 << 0 /* Switch input port. */ OFPFW_DL_VLAN = 1 << 1 /* VLAN id. */ OFPFW_DL_SRC = 1 << 2 /* Ethernet source address. */ OFPFW_DL_DST = 1 << 3 /* Ethernet destination address. */ OFPFW_DL_TYPE = 1 << 4 /* Ethernet frame type. */ OFPFW_NW_PROTO = 1 << 5 /* IP protocol. */ OFPFW_TP_SRC = 1 << 6 /* TCP/UDP source port. */ OFPFW_TP_DST = 1 << 7 /* TCP/UDP destination port. */ OFPFW_DL_VLAN_PCP = 1 << 20 /* VLAN priority. */ OFPFW_NW_TOS = 1 << 21 /* IP ToS (DSCP field, 6 bits). */ )
View Source
const ( OFPPC_PORT_DOWN = 1 << 0 OFPPC_NO_STP = 1 << 1 OFPPC_NO_RECV = 1 << 2 OFPPC_NO_RECV_STP = 1 << 3 OFPPC_NO_FLOOD = 1 << 4 OFPPC_NO_FWD = 1 << 5 OFPPC_NO_PACKET_IN = 1 << 6 )
View Source
const ( OFPPS_LINK_DOWN = 1 << 0 OFPPS_STP_LISTEN = 0 << 8 /* Not learning or relaying frames. */ OFPPS_STP_LEARN = 1 << 8 /* Learning but not relaying frames. */ OFPPS_STP_FORWARD = 2 << 8 /* Learning and relaying frames. */ OFPPS_STP_BLOCK = 3 << 8 /* Not part of spanning tree. */ OFPPS_STP_MASK = 3 << 8 /* Bit mask for OFPPS_STP_* values. */ )
View Source
const ( OFPFF_SEND_FLOW_REM = 1 << 0 /* Send flow removed message when flow expires or is deleted. */ OFPFF_CHECK_OVERLAP = 1 << 1 /* Check for overlapping entries first. */ OFPFF_EMERG = 1 << 2 /* Remark this is for emergency. */ )
View Source
const ( OFPFC_ADD = 0 /* New flow. */ OFPFC_MODIFY = 1 /* Modify all matching flows. */ OFPFC_MODIFY_STRICT = 2 /* Modify entry strictly matching wildcards and priority. */ OFPFC_DELETE = 3 /* Delete all matching flows. */ OFPFC_DELETE_STRICT = 4 /* Delete entry strictly matching wildcards and priority. */ )
View Source
const ( /* Description of this OpenFlow switch. * The request body is empty. * The reply body is struct ofp_desc_stats. */ OFPST_DESC = iota /* Individual flow statistics. * The request body is struct ofp_flow_stats_request. * The reply body is an array of struct ofp_flow_stats. */ OFPST_FLOW /* Aggregate flow statistics. * The request body is struct ofp_aggregate_stats_request. * The reply body is struct ofp_aggregate_stats_reply. */ OFPST_AGGREGATE /* Flow table statistics. * The request body is empty. * The reply body is an array of struct ofp_table_stats. */ OFPST_TABLE /* Physical port statistics. * The request body is struct ofp_port_stats_request. * The reply body is an array of struct ofp_port_stats. */ OFPST_PORT /* Queue statistics for a port * The request body defines the port * The reply body is an array of struct ofp_queue_stats */ OFPST_QUEUE /* Vendor extension. * The request and reply bodies begin with a 32-bit vendor ID, which takes * the same form as in "struct ofp_vendor_header". The request and reply * bodies are otherwise vendor-defined. */ OFPST_VENDOR = 0xffff )
View Source
const ( OFPC_FRAG_NORMAL = iota /* No special handling for fragments. */ OFPC_FRAG_DROP /* Drop fragments. */ OFPC_FRAG_REASM /* Reassemble (only if OFPC_IP_REASM set). */ OFPC_FRAG_MASK )
Config Flags
View Source
const ( OFPPR_ADD = 0 OFPPR_DELETE = 1 OFPPR_MODIFY = 2 )
View Source
const (
OFP_NO_BUFFER = 0xffffffff
)
Variables ¶
This section is empty.
Functions ¶
func NewActionHeader ¶
func NewBarrierReply ¶
func NewBarrierReply(xid uint32) openflow.BarrierReply
func NewBarrierRequest ¶
func NewBarrierRequest(xid uint32) openflow.BarrierRequest
func NewEchoReply ¶
func NewEchoRequest ¶
func NewEmptyPort ¶
func NewFeatureReply ¶
func NewFeatureReply(xid uint32) openflow.FeatureReply
func NewFeatureRequest ¶
func NewFeatureRequest(xid uint32) openflow.FeatureRequest
func NewFlowMod ¶
func NewFlowRemoved ¶
func NewFlowRemoved(xid uint32) openflow.FlowRemoved
func NewGetConfigReply ¶
func NewGetConfigReply(xid uint32) openflow.GetConfigReply
func NewGetConfigRequest ¶
func NewGetConfigRequest(xid uint32) openflow.GetConfigRequest
func NewPacketIn ¶
func NewPacketOut ¶
func NewPortMod ¶
func NewPortStatus ¶
func NewPortStatus(xid uint32) openflow.PortStatus
func NewQueueGetConfigReply ¶
func NewQueueGetConfigReply(xid uint32) openflow.QueueGetConfigReply
func NewQueueGetConfigRequest ¶
func NewQueueGetConfigRequest(xid uint32) openflow.QueueGetConfigRequest
func NewSetConfig ¶
func NewStatsReplyHeader ¶
func NewStatsReplyHeader(xid uint32) openflow.StatsRequest
func NewStatsRequestHeader ¶
func NewStatsRequestHeader(xid uint32) openflow.StatsRequest
Types ¶
type ActionEnqueue ¶
type ActionEnqueue interface { openflow.Action Port() uint16 SetPort(uint16) error QueueID() uint32 SetQueueID(uint32) }
func NewActionEnqueue ¶
func NewActionEnqueue() ActionEnqueue
type ActionOutput ¶
type ActionOutput interface { openflow.Action Port() uint16 SetPort(uint16) error MaxLen() uint16 SetMaxLen(uint16) }
action output interface
func NewActionOutput ¶
func NewActionOutput() ActionOutput
type ActionSetDLDst ¶
type ActionSetDLDst interface { openflow.Action DLDst() net.HardwareAddr // destination mac address SetDLDst(net.HardwareAddr) }
func NewActionSetDLDst ¶
func NewActionSetDLDst() ActionSetDLDst
type ActionSetDLSrc ¶
type ActionSetDLSrc interface { openflow.Action DLSrc() net.HardwareAddr // source mac address SetDLSrc(net.HardwareAddr) }
func NewActionSetDLSrc ¶
func NewActionSetDLSrc() ActionSetDLSrc
type ActionSetNWDst ¶
type ActionSetNWDst interface { openflow.Action NWDst() net.IP // destination ip address SetNWDst(net.IP) }
func NewActionSetNWDst ¶
func NewActionSetNWDst() ActionSetNWDst
type ActionSetNWSrc ¶
type ActionSetNWSrc interface { openflow.Action NWSrc() net.IP // source ip address SetNWSrc(net.IP) }
func NewActionSetNWSrc ¶
func NewActionSetNWSrc() ActionSetNWSrc
type ActionSetNWTos ¶
func NewActionSetNWTos ¶
func NewActionSetNWTos() ActionSetNWTos
type ActionSetTPDst ¶
func NewActionSetTPDst ¶
func NewActionSetTPDst() ActionSetTPDst
type ActionSetTPSrc ¶
func NewActionSetTPSrc ¶
func NewActionSetTPSrc() ActionSetTPSrc
type ActionSetVLANPCP ¶
Set Priority Code Point (PCP)
func NewActionSetVLANPCP ¶
func NewActionSetVLANPCP() ActionSetVLANPCP
type ActionSetVLANVID ¶
func NewActionSetVLANVID ¶
func NewActionSetVLANVID() ActionSetVLANVID
type ActionStripVLAN ¶
func NewActionStripVLAN ¶
func NewActionStripVLAN() ActionStripVLAN
type ActionVendor ¶
func NewActionVendor ¶
func NewActionVendor() ActionVendor
type StatsReplyDescription ¶
type StatsReplyDescription interface { openflow.StatsReply MfrDesc() *[256]byte SetMfrDesc(*[256]byte) HwDesc() *[256]byte SetHwDesc(*[256]byte) SwDesc() *[256]byte SetSwDesc(*[256]byte) SerialNum() *[32]byte SetSerialNum(*[32]byte) DpDesc() *[256]byte SetDpDesc(*[256]byte) }
func NewStatsReplyDescription ¶
func NewStatsReplyDescription(xid uint32) StatsReplyDescription
type StatsRequestAggregate ¶
type StatsRequestAggregate interface { StatsRequestFlow }
func NewStatsReuqestAggregate ¶
func NewStatsReuqestAggregate(xid uint32) StatsRequestAggregate
type StatsRequestDescription ¶
type StatsRequestDescription interface { openflow.StatsRequest }
func NewStatsRequestDescription ¶
func NewStatsRequestDescription(xid uint32) StatsRequestDescription
type StatsRequestFlow ¶
type StatsRequestFlow interface { openflow.StatsRequest Match() openflow.Match SetMatch(openflow.Match) TableID() uint8 SetTableID(uint8) OutPort() uint16 SetOutPort(uint16) }
func NewStatsReuqestFlow ¶
func NewStatsReuqestFlow(xid uint32) StatsRequestFlow
type StatsRequestPort ¶
type StatsRequestPort interface { openflow.StatsRequest PortNumber() uint16 SetPortNumber(uint16) error }
func NewStatsReuqestPort ¶
func NewStatsReuqestPort(xid uint32) StatsRequestPort
type StatsRequestQueue ¶
type StatsRequestQueue interface { openflow.StatsRequest PortNumber() uint16 SetPortNumber(uint16) error QueueID() uint32 SetQueueID(uint32) }
func NewStatsReuqestQueue ¶
func NewStatsReuqestQueue(xid uint32) StatsRequestQueue
type StatsRequestTable ¶
type StatsRequestTable interface { StatsRequestDescription }
func NewStatsReuqestTable ¶
func NewStatsReuqestTable(xid uint32) StatsRequestTable
type StatsRequestVendor ¶
type StatsRequestVendor interface { openflow.StatsRequest VendorID() uint32 SetVendorID(uint32) }
func NewStatsReuqestVendor ¶
func NewStatsReuqestVendor(xid uint32) StatsRequestVendor
Click to show internal directories.
Click to hide internal directories.