Documentation
¶
Index ¶
- Constants
- Variables
- func NewXidGenerator() func() uint32
- type Action
- type ActionHeader
- type ActionType
- type AggregateStatsReply
- type AggregateStatsRequest
- type BarrierReply
- type BarrierRequest
- type BufferId
- type Capability
- type ConfigFlag
- type Cookie
- type DatapathId
- type Decoder
- type DescriptionStats
- type Dscp
- type EchoReply
- type EchoRequest
- type Enqueue
- type ErrorCode
- type ErrorMessage
- type ErrorType
- type EtherType
- type FeaturesReply
- type FeaturesRequest
- type FlowMod
- type FlowModCommand
- type FlowModFlag
- type FlowRemoved
- type FlowRemovedReason
- type FlowStatsReply
- type FlowStatsRequest
- type GenericMessage
- type GetConfigReply
- type GetConfigRequest
- type Header
- type Hello
- type Match
- type Message
- type MessageType
- type PacketIn
- type PacketInReason
- type PacketOut
- type PacketQueue
- type Packetizable
- type PhysicalPort
- type PortConfig
- type PortFeature
- type PortMod
- type PortNumber
- type PortState
- type PortStatsReply
- type PortStatsRequest
- type PortStatus
- type PortStatusReason
- type ProtocolNumber
- type QueueGetConfigReply
- type QueueGetConfigRequest
- type QueueProperty
- type QueuePropertyHeader
- type QueuePropertyMinRate
- type QueuePropertyType
- type QueueStatsReply
- type QueueStatsRequest
- type SendOutPort
- type SetConfig
- type SetEtherDst
- type SetEtherSrc
- type SetIpDst
- type SetIpSrc
- type SetIpTos
- type SetTransportDst
- type SetTransportSrc
- type SetVlanPcp
- type SetVlanVid
- type StatsReply
- type StatsRequest
- type StatsType
- type StripVlan
- type SwitchConfig
- type TableStatsReply
- type TransportPort
- type VendorActionHeader
- type VendorId
- type VendorMessage
- type VlanId
- type VlanPriority
- type Wildcard
Constants ¶
View Source
const ( // Immutable messages OFPT_HELLO = iota OFPT_ERROR OFPT_ECHO_REQUEST OFPT_ECHO_REPLY OFPT_VENDOR // Switch configuration messages OFPT_FEATURES_REQUEST OFPT_FEATURES_REPLY OFPT_GET_CONFIG_REQUEST OFPT_GET_CONFIG_REPLY OFPT_SET_CONFIG // Asynchronous messages OFPT_PACKET_IN OFPT_FLOW_REMOVED OFPT_PORT_STATUS // Controller command messages OFPT_PACKET_OUT OFPT_FLOW_MOD OFPT_PORT_MOD // Statistics messages OFPT_STATS_REQUEST OFPT_STATS_REPLY // Barrier messages OFPT_BARRIER_REQUEST OFPT_BARRIER_REPLY // Queue configuration messages OFPT_QUEUE_GET_CONFIG_REQUEST OFPT_QUEUE_GET_CONFIG_REPLY )
View Source
const EthernetAddressLength = 6
View Source
const HeaderLength = 8
View Source
const MaxPortNameLength = 16
View Source
const WireProtocolVersion = 0x01
Variables ¶
View Source
var ActionTypes = struct { Output ActionType SetVlanId ActionType SetVlanPcp ActionType StripVlan ActionType SetEtherSrc ActionType SetEtherDst ActionType SetIpSrc ActionType SetIpDst ActionType SetIpTos ActionType SetNetworkSrc ActionType SetNetworkDst ActionType Enqueue ActionType Vendor ActionType }{ OFPAT_OUTPUT, OFPAT_SET_VLAN_VID, OFPAT_SET_VLAN_PCP, OFPAT_SET_STRIP_VLAN, OFPAT_SET_DL_SRC, OFPAT_SET_DL_DST, OFPAT_SET_NW_SRC, OFPAT_SET_NW_DST, OFPAT_SET_NW_TOS, OFPAT_SET_TP_SRC, OFPAT_SET_TP_DST, OFPAT_ENQUEUE, OFPAT_VENDOR, }
View Source
var BadActionCodes = struct { BadType ErrorCode BadLength ErrorCode BadVendorId ErrorCode BadVendorType ErrorCode BadOutPort ErrorCode BadArgument ErrorCode PermissionError ErrorCode TooManyActions ErrorCode BadQeueu ErrorCode }{ OFPBAC_BAD_TYPE, OFPBAC_BAD_LEN, OFPBAC_BAD_VENDOR, OFPBAC_BAD_VENDOR_TYPE, OFPBAC_BAD_OUT_PORT, OFPBAC_BAD_ARGUMENT, OFPBAC_EPERM, OFPBAC_TOO_MANY, OFPBAC_BAD_QUEUE, }
View Source
var BadRequestCodes = struct { BadVersion ErrorCode BadType ErrorCode BadStatRequest ErrorCode BadVendorType ErrorCode BadVendorSubType ErrorCode PermissionError ErrorCode BadLength ErrorCode BufferEmpty ErrorCode BufferUnknown ErrorCode }{ OFPBRC_BAD_VERSION, OFPBRC_BAD_TYPE, OFPBRC_BAD_STAT, OFPBRC_BAD_VENDOR, OFPBRC_BAD_SUBTYPE, OFPBRC_EPERM, OFPBRC_BAD_LEN, OFPBRC_BUFFER_EMPTY, OFPBRC_BUFFER_UNKNOWN, }
View Source
var Capabilities = struct { FlowStats Capability TableStats Capability PortStats Capability Stp Capability Reserved Capability IpReassemble Capability QueueStats Capability ArpMatchIp Capability }{ OFPC_FLOW_STATS, OFPC_TABLE_STATS, OFPC_PORT_STATS, OFPC_STP, OFPC_RESERVED, OFPC_IP_REASM, OFPC_QUEUE_STATS, OFPC_ARP_MATCH_IP, }
View Source
var ConfigFlags = struct { FragmentNormal ConfigFlag FragmentDrop ConfigFlag FragmentReassemble ConfigFlag FragmentMask ConfigFlag }{ OFPC_FRAG_NORMAL, OFPC_FRAG_DROP, OFPC_FRAG_REASM, OFPC_FRAG_MASK, }
View Source
var FlowModCommands = struct { Add FlowModCommand Modify FlowModCommand ModifyStrict FlowModCommand Delete FlowModCommand DeleteStrict FlowModCommand }{ OFPFC_ADD, OFPFC_MODIFY, OFPFC_MODIFY_STRICT, OFPFC_DELETE, OFPFC_DELETE_STRICT, }
View Source
var FlowModFailedCodes = struct { AllTablesFull ErrorCode Overlap ErrorCode PermissionError ErrorCode BadEmergencyTimeout ErrorCode BadCommand ErrorCode Unsupported ErrorCode }{ OFPFMFC_ALL_TABLES_FULL, OFPFMFC_OVERLAP, OFPFMFC_EPERM, OFPFMFC_BAD_EMERG_TIMEOUT, OFPFMFC_BAD_COMMAND, OFPFMFC_UNSUPPORTED, }
View Source
var FlowModFlags = struct { SendFlowRemoved FlowModFlag CheckOverlap FlowModFlag Emergency FlowModFlag }{ OFPFF_SEND_FLOW_REM, OFPFF_CHECK_OVERLAP, OFPFF_EMERG, }
View Source
var FlowRemovedReasons = struct { IdleTimeout FlowRemovedReason HardTimeout FlowRemovedReason Delete FlowRemovedReason }{ OFPRR_IDLE_TIMEOUT, OFPRR_HARD_TIMEOUT, OFPRR_DELETE, }
View Source
var HelloFailedCodes = struct { Incompatible ErrorCode PermissionError ErrorCode }{ OFPHFC_INCOMPATIBLE, OFPHFC_EPERM, }
View Source
var MessageTypes = struct { Hello MessageType Error MessageType EchoRequest MessageType EchoReply MessageType Vendor MessageType FeaturesRequest MessageType FeaturesReply MessageType GetConfigRequest MessageType GetConfigReply MessageType SetConfig MessageType PacketIn MessageType FlowRemoved MessageType PortStatus MessageType PacketOut MessageType FlowMod MessageType PortMod MessageType StatsRequest MessageType StatsReply MessageType BarrierRequest MessageType BarrierReply MessageType QueueGetConfigRequest MessageType QueueGetConfigReply MessageType }{ OFPT_HELLO, OFPT_ERROR, OFPT_ECHO_REQUEST, OFPT_ECHO_REPLY, OFPT_VENDOR, OFPT_FEATURES_REQUEST, OFPT_FEATURES_REPLY, OFPT_GET_CONFIG_REQUEST, OFPT_GET_CONFIG_REPLY, OFPT_SET_CONFIG, OFPT_PACKET_IN, OFPT_FLOW_REMOVED, OFPT_PORT_STATUS, OFPT_PACKET_OUT, OFPT_FLOW_MOD, OFPT_PORT_MOD, OFPT_STATS_REQUEST, OFPT_STATS_REPLY, OFPT_BARRIER_REQUEST, OFPT_BARRIER_REPLY, OFPT_QUEUE_GET_CONFIG_REQUEST, OFPT_QUEUE_GET_CONFIG_REPLY, }
View Source
var PacketInReasons = struct { NoMatch PacketInReason Action PacketInReason }{ OFPR_NO_MATCH, OFPR_ACTION, }
View Source
var PortConfigs = struct { PortDown PortConfig NoStp PortConfig NoReceive PortConfig NoReceiveStp PortConfig NoFlood PortConfig NoForward PortConfig NoPacketIn PortConfig }{ OFPPC_PORT_DOWN, OFPPC_NO_STP, OFPPC_NO_RECV, OFPPC_NO_RECV_STP, OFPPC_NO_FLOOD, OFPPC_NO_FWD, OFPPC_NO_PACKET_IN, }
View Source
var PortFeatures = struct { HalfDuplex10M PortFeature FullDuplex10M PortFeature HalfDuplex100M PortFeature FullDuplex100M PortFeature HalfDuplex1G PortFeature FullDuplex1G PortFeature FullDuplex10G PortFeature Copper PortFeature Fiber PortFeature AutoNegotiation PortFeature Pause PortFeature AsymmetricPause PortFeature }{ OFPPF_10MB_HD, OFPPF_10MB_FD, OFPPF_100MB_HD, OFPPF_100MB_FD, OFPPF_1GB_HD, OFPPF_1GB_FD, OFPPF_10GB_FD, OFPPF_COPPER, OFPPF_FIBER, OFPPF_AUTONEG, OFPPF_PAUSE, OFPPF_PAUSE_ASYM, }
View Source
var PortModFailedCode = struct { BadPort ErrorCode BadHardwareAddress ErrorCode }{ OFPPMFC_BAD_PORT, OFPPMFC_BAD_HW_ADDR, }
View Source
var PortNumbers = struct { Max PortNumber InPort PortNumber Table PortNumber Normal PortNumber Flood PortNumber All PortNumber Controller PortNumber Local PortNumber None PortNumber }{ OFPP_MAX, OFPP_IN_PORT, OFPP_TABLE, OFPP_NORMAL, OFPP_FLOOD, OFPP_ALL, OFPP_CONTROLLER, OFPP_LOCAL, OFPP_NONE, }
View Source
var PortStates = struct { LinkDown PortState StpListen PortState StpLearn PortState StpForward PortState StpBlock PortState StpMask PortState }{ OFPPS_LINK_DOWN, OFPPS_STP_LISTEN, OFPPS_STP_LEARN, OFPPS_STP_FORWARD, OFPPS_STP_BLOCK, OFPPS_STP_MASK, }
View Source
var PortStatusReasons = struct { Add PortStatusReason Delete PortStatusReason Modify PortStatusReason }{ OFPPR_ADD, OFPPR_DELETE, OFPPR_MODIFY, }
View Source
var QueueOperationFailedCodes = struct { BadPort ErrorCode BadQueue ErrorCode PermissionError ErrorCode }{ OFPQOFC_BAD_Port, OFPQOFC_BAD_QUEUE, OFPQOFC_EPERM, }
View Source
var QueuePropertyTypes = struct { None QueuePropertyType MinRate QueuePropertyType }{ OFPQT_NONE, OFPQT_MIN_RATE, }
View Source
var StatsTypes = struct { Description StatsType Flow StatsType Aggregate StatsType Table StatsType Port StatsType Queue StatsType Vendor StatsType }{ OFPST_DESC, OFPST_FLOW, OFPST_AGGREGATE, OFPST_TABLE, OFPST_PORT, OFPST_QUEUE, OFPST_VENDOR, }
Functions ¶
func NewXidGenerator ¶
func NewXidGenerator() func() uint32
Types ¶
type Action ¶
type Action interface {
GetType() ActionType
encoding.BinaryUnmarshaler
}
type ActionHeader ¶
type ActionHeader struct {
Type ActionType
Length uint16
}
func (*ActionHeader) GetType ¶
func (header *ActionHeader) GetType() ActionType
type ActionType ¶
type ActionType uint16
const ( OFPAT_OUTPUT ActionType = iota OFPAT_SET_VLAN_VID OFPAT_SET_VLAN_PCP OFPAT_SET_STRIP_VLAN OFPAT_SET_DL_SRC OFPAT_SET_DL_DST OFPAT_SET_NW_SRC OFPAT_SET_NW_DST OFPAT_SET_NW_TOS OFPAT_SET_TP_SRC OFPAT_SET_TP_DST OFPAT_ENQUEUE OFPAT_VENDOR ActionType = 0xffff )
type AggregateStatsReply ¶
type AggregateStatsRequest ¶
type AggregateStatsRequest struct {
Match Match
TableId uint8
OutPort PortNumber
// contains filtered or unexported fields
}
type BarrierReply ¶
type BarrierReply struct {
Header
}
func (*BarrierReply) UnmarshalBinary ¶
func (m *BarrierReply) UnmarshalBinary(data []byte) error
type BarrierRequest ¶
type BarrierRequest struct {
Header
}
func (*BarrierRequest) UnmarshalBinary ¶
func (m *BarrierRequest) UnmarshalBinary(data []byte) error
type Capability ¶
type Capability uint32
const ( OFPC_FLOW_STATS Capability = 1 << iota OFPC_TABLE_STATS OFPC_PORT_STATS OFPC_STP OFPC_RESERVED OFPC_IP_REASM OFPC_QUEUE_STATS OFPC_ARP_MATCH_IP )
type ConfigFlag ¶
type ConfigFlag uint16
const ( OFPC_FRAG_NORMAL ConfigFlag = iota OFPC_FRAG_DROP OFPC_FRAG_REASM OFPC_FRAG_MASK )
type DatapathId ¶
type DatapathId uint64
type DescriptionStats ¶
type EchoReply ¶
func (*EchoReply) UnmarshalBinary ¶
type EchoRequest ¶
func (*EchoRequest) UnmarshalBinary ¶
func (m *EchoRequest) UnmarshalBinary(data []byte) error
type Enqueue ¶
type Enqueue struct {
ActionHeader
Port PortNumber
QueueId uint32
// contains filtered or unexported fields
}
func (*Enqueue) UnmarshalBinary ¶
type ErrorCode ¶
type ErrorCode uint16
const ( OFPBRC_BAD_VERSION ErrorCode = iota OFPBRC_BAD_TYPE OFPBRC_BAD_STAT OFPBRC_BAD_VENDOR OFPBRC_BAD_SUBTYPE OFPBRC_EPERM OFPBRC_BAD_LEN OFPBRC_BUFFER_EMPTY OFPBRC_BUFFER_UNKNOWN )
ErrorCode for Bad Request
const ( OFPBAC_BAD_TYPE ErrorCode = iota OFPBAC_BAD_LEN OFPBAC_BAD_VENDOR OFPBAC_BAD_VENDOR_TYPE OFPBAC_BAD_OUT_PORT OFPBAC_BAD_ARGUMENT OFPBAC_EPERM OFPBAC_TOO_MANY OFPBAC_BAD_QUEUE )
ErrorCode for Bad Action
const ( OFPFMFC_ALL_TABLES_FULL ErrorCode = iota OFPFMFC_OVERLAP OFPFMFC_EPERM OFPFMFC_BAD_EMERG_TIMEOUT OFPFMFC_BAD_COMMAND OFPFMFC_UNSUPPORTED )
ErrorCode for Flow Mod Failed
ErrorCode for Queue Op Failed
type ErrorMessage ¶
func (*ErrorMessage) UnmarshalBinary ¶
func (m *ErrorMessage) UnmarshalBinary(data []byte) error
type FeaturesReply ¶
type FeaturesReply struct {
Header
DatapathId DatapathId
Buffers uint32
Tables uint8
Capabilities Capability
Actions ActionType
Ports []PhysicalPort
// contains filtered or unexported fields
}
func (*FeaturesReply) UnmarshalBinary ¶
func (m *FeaturesReply) UnmarshalBinary(data []byte) error
type FeaturesRequest ¶
type FeaturesRequest struct {
Header
}
func (*FeaturesRequest) UnmarshalBinary ¶
func (m *FeaturesRequest) UnmarshalBinary(data []byte) error
type FlowMod ¶
type FlowMod struct {
Header
Match Match
Cookie Cookie
Command FlowModCommand
IdleTimeout uint16
HardTimeout uint16
Priority uint16
BufferId BufferId
OutPort PortNumber
Flags FlowModFlag
Actions []Action
}
func (*FlowMod) UnmarshalBinary ¶
type FlowModCommand ¶
type FlowModCommand uint16
const ( OFPFC_ADD FlowModCommand = iota OFPFC_MODIFY OFPFC_MODIFY_STRICT OFPFC_DELETE OFPFC_DELETE_STRICT )
type FlowModFlag ¶
type FlowModFlag uint16
const ( OFPFF_SEND_FLOW_REM FlowModFlag = 1 << iota OFPFF_CHECK_OVERLAP OFPFF_EMERG )
type FlowRemoved ¶
type FlowRemoved struct {
Header
Match Match
Cookie Cookie
Priority uint16
Reason FlowRemovedReason
DurationSec uint32
DurationNanoSec uint32
IdleTimeout uint16
PacketCount uint64
ByteCount uint64
// contains filtered or unexported fields
}
func (*FlowRemoved) UnmarshalBinary ¶
func (m *FlowRemoved) UnmarshalBinary(data []byte) error
type FlowRemovedReason ¶
type FlowRemovedReason uint8
const ( OFPRR_IDLE_TIMEOUT FlowRemovedReason = iota OFPRR_HARD_TIMEOUT OFPRR_DELETE )
type FlowStatsReply ¶
type FlowStatsRequest ¶
type FlowStatsRequest struct {
Match Match
TalbeId uint8
OutPort PortNumber
// contains filtered or unexported fields
}
type GenericMessage ¶
type GetConfigReply ¶
type GetConfigReply struct {
Header
Flags ConfigFlag
MissSendLength uint16
}
func (*GetConfigReply) UnmarshalBinary ¶
func (m *GetConfigReply) UnmarshalBinary(data []byte) error
type GetConfigRequest ¶
type GetConfigRequest struct {
Header
}
func (*GetConfigRequest) UnmarshalBinary ¶
func (m *GetConfigRequest) UnmarshalBinary(data []byte) error
type Match ¶
type Match struct {
Wildcards Wildcard
InPort PortNumber
EthSrc [EthernetAddressLength]uint8
EthDst [EthernetAddressLength]uint8
VlanId VlanId
VlanPriority VlanPriority
EtherType EtherType
IpTos Dscp
IpProtocol ProtocolNumber
IpSrc [4]uint8
IpDst [4]uint8
TransportSrc TransportPort
TransportDst TransportPort
// contains filtered or unexported fields
}
type Message ¶
type Message interface {
encoding.BinaryUnmarshaler
GetHeader() *Header
}
type MessageType ¶
type MessageType uint8
type PacketIn ¶
type PacketIn struct {
Header
BufferId uint32
TotalLength uint16
InPort PortNumber
Reason PacketInReason
Data []uint8
// contains filtered or unexported fields
}
func (*PacketIn) UnmarshalBinary ¶
type PacketInReason ¶
type PacketInReason uint8
const ( OFPR_NO_MATCH PacketInReason = iota OFPR_ACTION )
type PacketOut ¶
type PacketOut struct {
Header
BufferId uint32
InPort PortNumber
ActionsLength uint16
Actions []Action
Data []uint8
}
func (*PacketOut) UnmarshalBinary ¶
type PacketQueue ¶
type PacketQueue struct {
QueueId uint32
Length uint16
Properties []QueueProperty
// contains filtered or unexported fields
}
TODO: Properties should be generalized
type Packetizable ¶
type Packetizable interface {
io.ReadWriter
Len() uint
}
type PhysicalPort ¶
type PhysicalPort struct {
PortNumber PortNumber
HardwareAddress [EthernetAddressLength]uint8
Name [MaxPortNameLength]uint8
Config PortConfig
State PortState
CurrentFeatures PortFeature
AdvertisedFeatures PortFeature
SupportedFeatures PortFeature
PeerFeatures PortFeature
}
type PortConfig ¶
type PortConfig uint16
const ( OFPPC_PORT_DOWN PortConfig = 1 << iota OFPPC_NO_STP OFPPC_NO_RECV OFPPC_NO_RECV_STP OFPPC_NO_FLOOD OFPPC_NO_FWD OFPPC_NO_PACKET_IN )
type PortFeature ¶
type PortFeature uint16
const ( OFPPF_10MB_HD PortFeature = 1 << iota OFPPF_10MB_FD OFPPF_100MB_HD OFPPF_100MB_FD OFPPF_1GB_HD OFPPF_1GB_FD OFPPF_10GB_FD OFPPF_COPPER OFPPF_FIBER OFPPF_AUTONEG OFPPF_PAUSE OFPPF_PAUSE_ASYM )
type PortMod ¶
type PortMod struct {
Header
PortNumber PortNumber
HardwareAddress [EthernetAddressLength]uint8
Config PortConfig
Mask PortConfig
Advertise PortFeature
// contains filtered or unexported fields
}
func (*PortMod) UnmarshalBinary ¶
type PortNumber ¶
type PortNumber uint16
const ( OFPP_MAX PortNumber = 0xff00 OFPP_IN_PORT PortNumber = 0xfff8 OFPP_TABLE PortNumber = 0xfff9 OFPP_NORMAL PortNumber = 0xfffa OFPP_FLOOD PortNumber = 0xfffb OFPP_ALL PortNumber = 0xfffc OFPP_CONTROLLER PortNumber = 0xfffd OFPP_LOCAL PortNumber = 0xfffe OFPP_NONE PortNumber = 0xffff )
type PortStatsReply ¶
type PortStatsReply struct {
PortNumber PortNumber
RxPackets uint64
TxPackets uint64
RxBytes uint64
TxBytes uint64
RxDropped uint64
TxDropped uint64
RxErrors uint64
TxErrors uint64
RxFrameErrors uint64
RxOverrunErrors uint64
RxCrcErrors uint64
Collisions uint64
// contains filtered or unexported fields
}
type PortStatsRequest ¶
type PortStatsRequest struct {
PortNumber PortNumber
// contains filtered or unexported fields
}
type PortStatus ¶
type PortStatus struct {
Header
Reason PortStatusReason
Description PhysicalPort
// contains filtered or unexported fields
}
func (*PortStatus) UnmarshalBinary ¶
func (m *PortStatus) UnmarshalBinary(data []byte) error
type PortStatusReason ¶
type PortStatusReason uint8
const ( OFPPR_ADD PortStatusReason = iota OFPPR_DELETE OFPPR_MODIFY )
type ProtocolNumber ¶
type ProtocolNumber uint8
type QueueGetConfigReply ¶
type QueueGetConfigReply struct {
Header
Port PortNumber
Queues []PacketQueue
// contains filtered or unexported fields
}
func (*QueueGetConfigReply) UnmarshalBinary ¶
func (m *QueueGetConfigReply) UnmarshalBinary(data []byte) error
type QueueGetConfigRequest ¶
type QueueGetConfigRequest struct {
Header
Port PortNumber
// contains filtered or unexported fields
}
func (*QueueGetConfigRequest) UnmarshalBinary ¶
func (m *QueueGetConfigRequest) UnmarshalBinary(data []byte) error
type QueueProperty ¶
type QueueProperty interface {
Header() *QueuePropertyHeader
FillBody(buf *bytes.Buffer) error
}
type QueuePropertyHeader ¶
type QueuePropertyHeader struct {
Property QueuePropertyType
Length uint16
// contains filtered or unexported fields
}
func (*QueuePropertyHeader) FillBody ¶
func (p *QueuePropertyHeader) FillBody(buf *bytes.Buffer) error
func (*QueuePropertyHeader) Header ¶
func (h *QueuePropertyHeader) Header() *QueuePropertyHeader
type QueuePropertyMinRate ¶
type QueuePropertyMinRate struct {
QueuePropertyHeader
Rate uint16
// contains filtered or unexported fields
}
type QueuePropertyType ¶
type QueuePropertyType uint16
const ( OFPQT_NONE QueuePropertyType = iota OFPQT_MIN_RATE )
type QueueStatsReply ¶
type QueueStatsReply struct {
PortNumber PortNumber
QueueId uint32
TxBytes uint64
TxPackets uint64
TxErrors uint64
// contains filtered or unexported fields
}
type QueueStatsRequest ¶
type QueueStatsRequest struct {
PortNumber PortNumber
QueueId uint32
// contains filtered or unexported fields
}
type SendOutPort ¶
type SendOutPort struct {
ActionHeader
Port PortNumber
MaxLength uint16
}
func (*SendOutPort) UnmarshalBinary ¶
func (m *SendOutPort) UnmarshalBinary(data []byte) error
type SetConfig ¶
type SetConfig struct {
Header
Flags ConfigFlag
MissSendLength uint16
}
func (*SetConfig) UnmarshalBinary ¶
type SetEtherDst ¶
type SetEtherDst struct {
ActionHeader
Address [EthernetAddressLength]uint8
// contains filtered or unexported fields
}
func (*SetEtherDst) UnmarshalBinary ¶
func (a *SetEtherDst) UnmarshalBinary(data []byte) error
type SetEtherSrc ¶
type SetEtherSrc struct {
ActionHeader
Address [EthernetAddressLength]uint8
// contains filtered or unexported fields
}
func (*SetEtherSrc) UnmarshalBinary ¶
func (a *SetEtherSrc) UnmarshalBinary(data []byte) error
type SetIpDst ¶
type SetIpDst struct {
ActionHeader
Address [4]uint8
}
func (*SetIpDst) UnmarshalBinary ¶
type SetIpSrc ¶
type SetIpSrc struct {
ActionHeader
Address [4]uint8
}
func (*SetIpSrc) UnmarshalBinary ¶
type SetIpTos ¶
type SetIpTos struct {
ActionHeader
Tos Dscp
// contains filtered or unexported fields
}
func (*SetIpTos) UnmarshalBinary ¶
type SetTransportDst ¶
type SetTransportDst struct {
ActionHeader
Port TransportPort
// contains filtered or unexported fields
}
func (*SetTransportDst) UnmarshalBinary ¶
func (a *SetTransportDst) UnmarshalBinary(data []byte) error
type SetTransportSrc ¶
type SetTransportSrc struct {
ActionHeader
Port TransportPort
// contains filtered or unexported fields
}
func (*SetTransportSrc) UnmarshalBinary ¶
func (a *SetTransportSrc) UnmarshalBinary(data []byte) error
type SetVlanPcp ¶
type SetVlanPcp struct {
ActionHeader
Priority VlanPriority
// contains filtered or unexported fields
}
func (*SetVlanPcp) UnmarshalBinary ¶
func (m *SetVlanPcp) UnmarshalBinary(data []byte) error
type SetVlanVid ¶
type SetVlanVid struct {
ActionHeader
Id VlanId
// contains filtered or unexported fields
}
func (*SetVlanVid) UnmarshalBinary ¶
func (m *SetVlanVid) UnmarshalBinary(data []byte) error
type StatsReply ¶
func (*StatsReply) UnmarshalBinary ¶
func (m *StatsReply) UnmarshalBinary(data []byte) error
type StatsRequest ¶
func (*StatsRequest) UnmarshalBinary ¶
func (m *StatsRequest) UnmarshalBinary(data []byte) error
type SwitchConfig ¶
type SwitchConfig struct {
Header
Flags ConfigFlag
MissSendLength uint16
}
type TableStatsReply ¶
type TransportPort ¶
type TransportPort uint16
type VendorActionHeader ¶
type VendorActionHeader struct {
ActionHeader
Vendor VendorId
}
func (*VendorActionHeader) UnmarshalBinary ¶
func (a *VendorActionHeader) UnmarshalBinary(data []byte) error
type VendorMessage ¶
func (*VendorMessage) UnmarshalBinary ¶
func (m *VendorMessage) UnmarshalBinary(data []byte) error
type VlanPriority ¶
type VlanPriority uint8
type Wildcard ¶
type Wildcard uint32
const ( OFPFW_IN_PORT Wildcard = 1 << iota OFPFW_DL_VLAN OFPFW_DL_SRC OFPFW_DL_DST OFPFW_DL_TYPE OFPFW_NW_PROTO OFPFW_TP_SRC OFPFW_TP_DST OFPFW_NW_SRC_SHIFT Wildcard = 8 OFPFW_NW_SRC_BITS Wildcard = 6 OFPFW_NW_SRC_MASK Wildcard = ((1 << OFPFW_NW_SRC_BITS) - 1) << OFPFW_NW_SRC_SHIFT OFPFW_NW_DST_SHIFT Wildcard = 16 OFPFW_NW_DST_BITS Wildcard = 6 OFPFW_NW_DST_MASK Wildcard = ((1 << OFPFW_NW_DST_BITS) - 1) << OFPFW_NW_DST_SHIFT OFPFW_NW_DST_ALL Wildcard = 32 << OFPFW_NW_DST_SHIFT OFPFW_DL_VLAN_PCP Wildcard = 1 << 20 OFPFW_NW_TOS Wildcard = 1 << 21 OFPFW_ALL Wildcard = ((1 << 22) - 1) )
Click to show internal directories.
Click to hide internal directories.