Documentation
¶
Index ¶
- Constants
- Variables
- func DecodeMatchField(class uint16, field uint8, length uint8, hasMask bool, data []byte) (util.Message, error)
- func NewBarrierReply() *common.Header
- func NewBarrierRequest() *common.Header
- func NewConfigRequest() *common.Header
- func NewEchoReply() *common.Header
- func NewEchoRequest() *common.Header
- func NewFeaturesRequest() *common.Header
- func NewGetAsyncRequest() *common.Header
- func Parse(b []byte) (message util.Message, err error)
- func ParseBundleError(errCode uint16) error
- type Action
- type ActionCopyField
- type ActionDecNwTtl
- type ActionGroup
- type ActionHeader
- type ActionId
- type ActionMeter
- type ActionMplsTtl
- type ActionNwTtl
- type ActionOutput
- type ActionPopMpls
- type ActionPopVlan
- type ActionProperty
- type ActionPush
- type ActionSetField
- type ActionSetqueue
- type ActsetOutputField
- type AggregateStats
- type AggregateStatsReply
- type AggregateStatsRequest
- type ArpOperField
- type ArpXHaField
- type ArpXPaField
- type AsyncConfigPropExperimenter
- type AsyncConfigPropHeader
- type AsyncConfigPropReasons
- type Async_Config
- type BndleAdd
- type Bucket
- type BucketCounter
- type BundleAdd
- type BundleControl
- type BundleCtrl
- type BundleFeatures
- type BundleFeaturesPropTime
- type BundleFeaturesRequest
- type BundlePropTime
- type BundlePropertyExperimenter
- type ByteArrayField
- type ByteCountStatField
- type CTLabel
- type CTStates
- func (s *CTStates) SetDNAT()
- func (s *CTStates) SetEst()
- func (s *CTStates) SetInv()
- func (s *CTStates) SetNew()
- func (s *CTStates) SetRel()
- func (s *CTStates) SetRpl()
- func (s *CTStates) SetSNAT()
- func (s *CTStates) SetTrk()
- func (s *CTStates) UnsetDNAT()
- func (s *CTStates) UnsetEst()
- func (s *CTStates) UnsetInv()
- func (s *CTStates) UnsetNew()
- func (s *CTStates) UnsetRel()
- func (s *CTStates) UnsetRpl()
- func (s *CTStates) UnsetSNAT()
- func (s *CTStates) UnsetTrk()
- type ContinuationPropActionSet
- type ContinuationPropActions
- type ContinuationPropBridge
- type ContinuationPropConntracked
- type ContinuationPropCookie
- type ContinuationPropMirrors
- type ContinuationPropOdpPort
- type ContinuationPropStack
- type ContinuationPropTableID
- type ControllerID
- type ControllerStatus
- type ControllerStatusHeader
- type ControllerStatusPropUri
- type DescStats
- type DurationStatField
- type ErrorMsg
- type EthDstField
- type EthSrcField
- type EthTypeField
- type FlowCountStatField
- type FlowDesc
- type FlowMod
- type FlowMonitorRequest
- type FlowRemoved
- type FlowStats
- type FlowStatsRequest
- type FlowUpdateAbbrev
- type FlowUpdateFull
- type FlowUpdateHeader
- type FlowUpdatePaused
- type GetAsyncReply
- type GroupBucketPropWatch
- type GroupBucketPropWatchGroup
- type GroupBucketPropWatchPort
- type GroupBucketPropWeight
- type GroupDesc
- type GroupFeatures
- type GroupMod
- type GroupMultipartRequest
- type GroupStats
- type IcmpCodeField
- type IcmpTypeField
- type IdleTimeStatField
- type InPhyPortField
- type InPortField
- type InstrActions
- type InstrGotoTable
- type InstrHeader
- type InstrStatTrigger
- type InstrWriteMetadata
- type Instruction
- type InstructionId
- type InstructionProperty
- type IpDscpField
- type IpEcnField
- type IpProtoField
- type Ipv4DstField
- type Ipv4SrcField
- type Ipv6DstField
- type Ipv6ExtHdrField
- type Ipv6FLabelField
- type Ipv6SrcField
- type Match
- type MatchField
- func FindFieldHeaderByName(fieldName string, hasMask bool) (*MatchField, error)
- func NewActsetOutputField(actsetOutputPort uint32) *MatchField
- func NewArpOperField(arpOper uint16) *MatchField
- func NewArpShaField(arpSha net.HardwareAddr) *MatchField
- func NewArpSpaField(arpSpa net.IP) *MatchField
- func NewArpThaField(arpTha net.HardwareAddr) *MatchField
- func NewArpTpaField(arpTpa net.IP) *MatchField
- func NewCTLabelMatchField(label [16]byte, mask *[16]byte) *MatchField
- func NewCTMarkMatchField(mark uint32, mask *uint32) *MatchField
- func NewCTStateMatchField(states *CTStates) *MatchField
- func NewCTZoneMatchField(zone uint16) *MatchField
- func NewConjIDMatchField(conjID uint32) *MatchField
- func NewEthDstField(ethDst net.HardwareAddr, ethDstMask *net.HardwareAddr) *MatchField
- func NewEthSrcField(ethSrc net.HardwareAddr, ethSrcMask *net.HardwareAddr) *MatchField
- func NewEthTypeField(ethType uint16) *MatchField
- func NewIPTtlField(ttl uint8) *MatchField
- func NewInPhyPortField(inPhyPort uint32) *MatchField
- func NewInPortField(inPort uint32) *MatchField
- func NewIpDscpField(dscp uint8, ipDscpMask *uint8) *MatchField
- func NewIpEcnField(vlanPcp uint8) *MatchField
- func NewIpProtoField(protocol uint8) *MatchField
- func NewIpv4DstField(ipDst net.IP, ipDstMask *net.IP) *MatchField
- func NewIpv4SrcField(ipSrc net.IP, ipSrcMask *net.IP) *MatchField
- func NewIpv6DstField(ipDst net.IP, ipDstMask *net.IP) *MatchField
- func NewIpv6ExtHdrField(ipv6ExtHeader uint16, ipv6ExtHeaderMask *uint16) *MatchField
- func NewIpv6FLabelField(flabel uint32, flabelMask *uint32) *MatchField
- func NewIpv6SrcField(ipSrc net.IP, ipSrcMask *net.IP) *MatchField
- func NewMetadataField(metadata uint64, metadataMask *uint64) *MatchField
- func NewMplsBosField(mplsBos uint8) *MatchField
- func NewMplsLabelField(mplsLabel uint32) *MatchField
- func NewMplsTcField(mplsTc uint8) *MatchField
- func NewNxARPShaMatchField(addr net.HardwareAddr, mask net.HardwareAddr) *MatchField
- func NewNxARPSpaMatchField(addr net.IP, mask net.IP) *MatchField
- func NewNxARPThaMatchField(addr net.HardwareAddr, mask net.HardwareAddr) *MatchField
- func NewNxARPTpaMatchField(addr net.IP, mask net.IP) *MatchField
- func NewPacketTypeField(namespace uint16, nsType uint16) *MatchField
- func NewPbbIsidField(pbbIsid uint32, pbbIsidMask *uint32) *MatchField
- func NewRegMatchField(idx int, data uint32, dataRng *NXRange) *MatchField
- func NewRegMatchFieldWithMask(idx int, data uint32, mask uint32) *MatchField
- func NewSctpDstField(port uint16) *MatchField
- func NewSctpSrcField(port uint16) *MatchField
- func NewTcpDstField(port uint16) *MatchField
- func NewTcpFlagsField(tcpFlag uint16, tcpFlagMask *uint16) *MatchField
- func NewTcpSrcField(port uint16) *MatchField
- func NewTunMetadataField(idx int, data []byte, mask []byte) *MatchField
- func NewTunnelIdField(tunnelId uint64) *MatchField
- func NewTunnelIpv4DstField(tunnelIpDst net.IP, tunnelIpDstMask *net.IP) *MatchField
- func NewTunnelIpv4SrcField(tunnelIpSrc net.IP, tunnelIpSrcMask *net.IP) *MatchField
- func NewTunnelIpv6DstField(tunnelIpv6Dst net.IP, tunnelIpv6DstMask *net.IP) *MatchField
- func NewTunnelIpv6SrcField(tunnelIpv6Src net.IP, tunnelIpv6SrcMask *net.IP) *MatchField
- func NewUdpDstField(port uint16) *MatchField
- func NewUdpSrcField(port uint16) *MatchField
- func NewVlanIdField(vlanId uint16, vlanMask *uint16) *MatchField
- func NewVlanPcpField(vlanPcp uint8) *MatchField
- type MetadataField
- type MeterBandDSCP
- type MeterBandDrop
- type MeterBandExperimenter
- type MeterBandHeader
- type MeterBandStats
- type MeterDesc
- type MeterFeatures
- type MeterMod
- type MeterMultipartRequest
- type MeterStats
- type MplsBosField
- type MplsLabelField
- type MplsTcField
- type MultipartReply
- type MultipartRequest
- type NXActionCTNAT
- func (a *NXActionCTNAT) Len() (n uint16)
- func (a *NXActionCTNAT) MarshalBinary() (data []byte, err error)
- func (a *NXActionCTNAT) SetDNAT() error
- func (a *NXActionCTNAT) SetPersistent() error
- func (a *NXActionCTNAT) SetProtoHash() error
- func (a *NXActionCTNAT) SetRandom() error
- func (a *NXActionCTNAT) SetRangeIPv4Max(ipMax net.IP)
- func (a *NXActionCTNAT) SetRangeIPv4Min(ipMin net.IP)
- func (a *NXActionCTNAT) SetRangeIPv6Max(ipMax net.IP)
- func (a *NXActionCTNAT) SetRangeIPv6Min(ipMin net.IP)
- func (a *NXActionCTNAT) SetRangeProtoMax(protoMax *uint16)
- func (a *NXActionCTNAT) SetRangeProtoMin(protoMin *uint16)
- func (a *NXActionCTNAT) SetSNAT() error
- func (a *NXActionCTNAT) UnmarshalBinary(data []byte) error
- type NXActionConjunction
- type NXActionConnTrack
- func (a *NXActionConnTrack) AddAction(actions ...Action) *NXActionConnTrack
- func (a *NXActionConnTrack) Commit() *NXActionConnTrack
- func (a *NXActionConnTrack) Force() *NXActionConnTrack
- func (a *NXActionConnTrack) Len() (n uint16)
- func (a *NXActionConnTrack) MarshalBinary() (data []byte, err error)
- func (a *NXActionConnTrack) Table(tableID uint8) *NXActionConnTrack
- func (a *NXActionConnTrack) UnmarshalBinary(data []byte) error
- func (a *NXActionConnTrack) ZoneImm(zoneID uint16) *NXActionConnTrack
- func (a *NXActionConnTrack) ZoneRange(field *MatchField, rng *NXRange) *NXActionConnTrack
- type NXActionController
- type NXActionController2
- func (a *NXActionController2) AddControllerID(controllerID uint16)
- func (a *NXActionController2) AddMaxLen(maxLen uint16)
- func (a *NXActionController2) AddMeterID(meterID uint32)
- func (a *NXActionController2) AddPause(pause bool)
- func (a *NXActionController2) AddReason(reason uint8)
- func (a *NXActionController2) AddUserdata(userdata []byte)
- func (a *NXActionController2) Len() uint16
- func (a *NXActionController2) MarshalBinary() (data []byte, err error)
- func (a *NXActionController2) UnmarshalBinary(data []byte) error
- type NXActionController2PropControllerID
- type NXActionController2PropMaxLen
- type NXActionController2PropMeterId
- type NXActionController2PropPause
- type NXActionController2PropReason
- type NXActionController2PropUserdata
- type NXActionDecTTL
- type NXActionDecTTLCntIDs
- type NXActionHeader
- type NXActionLearn
- type NXActionNote
- type NXActionOutputReg
- type NXActionRegLoad
- type NXActionRegLoad2
- type NXActionRegMove
- type NXActionResubmit
- type NXActionResubmitTable
- type NXLearnSpec
- type NXLearnSpecField
- type NXLearnSpecHeader
- func NewLearnHeaderLoadFromField(nBits uint16) *NXLearnSpecHeader
- func NewLearnHeaderLoadFromValue(nBits uint16) *NXLearnSpecHeader
- func NewLearnHeaderMatchFromField(nBits uint16) *NXLearnSpecHeader
- func NewLearnHeaderMatchFromValue(nBits uint16) *NXLearnSpecHeader
- func NewLearnHeaderOutputFromField(nBits uint16) *NXLearnSpecHeader
- type NXRange
- type NextTableProperty
- type OFTablePropertyHeader
- type OXSStatHeader
- type OfpTime
- type OxmId
- type PBCountStatField
- type PacketCountStatField
- type PacketIn
- type PacketIn2
- type PacketIn2PropBufferID
- type PacketIn2PropContinuation
- type PacketIn2PropCookie
- type PacketIn2PropFullLen
- type PacketIn2PropMetadata
- type PacketIn2PropPacket
- type PacketIn2PropReason
- type PacketIn2PropTableID
- type PacketIn2PropUserdata
- type PacketInFormat
- type PacketOut
- type PacketTypeField
- type PbbIsidField
- type Port
- type PortDescPropEthernet
- type PortDescPropOptical
- type PortDescPropOxm
- type PortDescPropRecirculate
- type PortField
- type PortMod
- type PortModPropEthernet
- type PortModPropOptical
- type PortMultipartRequest
- type PortMultipartRequst
- type PortStats
- type PortStatsPropEthernet
- type PortStatsPropOptical
- type PortStatus
- type PropExperimenter
- type PropHeader
- type Property
- type QueueDesc
- type QueueDescPropMaxRate
- type QueueDescPropMinRate
- type QueueDescPropRate
- type QueueMultipartRequest
- type QueueStats
- type RequestForward
- type Resume
- type RoleReply
- type RoleRequest
- type RoleStatus
- type SetAsync
- type SetFieldPacketTypes
- type SetFieldProperty
- type Stats
- type SwitchConfig
- type SwitchFeatures
- type TLVTableMap
- type TLVTableMod
- type TLVTableReply
- type TableDesc
- type TableExperimenterProperty
- type TableFeatures
- type TableMod
- type TableModPropEviction
- type TableModPropVacancy
- type TableStats
- type TableStatus
- type TcpFlagsField
- type TimeStatField
- type TtlField
- type TunnelIdField
- type TunnelIpv4DstField
- type TunnelIpv4SrcField
- type Uint16Message
- type Uint32Message
- type VendorError
- type VendorHeader
- func NewBundleAdd(bundleAdd *BundleAdd) *VendorHeader
- func NewBundleControl(bundleControl *BundleControl) *VendorHeader
- func NewNXTVendorHeader(msgType uint32) *VendorHeader
- func NewPacketIn2(props []Property) *VendorHeader
- func NewResume(props []Property) *VendorHeader
- func NewSetControllerID(id uint16) *VendorHeader
- func NewSetPacketInFormet(format uint32) *VendorHeader
- func NewTLVTableModMessage(tlvMod *TLVTableMod) *VendorHeader
- func NewTLVTableRequest() *VendorHeader
- type VlanIdField
- type VlanPcpField
Constants ¶
const ( ActionType_Output = 0 ActionType_CopyTtlOut = 11 ActionType_CopyTtlIn = 12 ActionType_SetMplsTtl = 15 ActionType_DecMplsTtl = 16 ActionType_PushVlan = 17 ActionType_PopVlan = 18 ActionType_PushMpls = 19 ActionType_PopMpls = 20 ActionType_SetQueue = 21 ActionType_Group = 22 ActionType_SetNwTtl = 23 ActionType_DecNwTtl = 24 ActionType_SetField = 25 ActionType_PushPbb = 26 ActionType_PopPbb = 27 ActionType_Copy_Field = 28 ActionType_Meter = 29 ActionType_Experimenter = 0xffff )
ofp_action_type 1.5
const ( OFPCML_MAX = 0xffe5 /* maximum max_len value which can be used to request a specific byte length. */ OFPCML_NO_BUFFER = 0xffff /* indicates that no buffering should be applied and the whole packet is to be sent to the controller. */ )
ofp_controller_max_len
const ( OFPBCT_OPEN_REQUEST uint16 = iota OFPBCT_OPEN_REPLY OFPBCT_CLOSE_REQUEST OFPBCT_CLOSE_REPLY OFPBCT_COMMIT_REQUEST OFPBCT_COMMIT_REPLY OFPBCT_DISCARD_REQUEST OFPBCT_DISCARD_REPLY )
Bundle control types
const ( Type_BundleCtrl uint32 = 2300 Type_BundleAdd uint32 = 2301 )
Bundle message types
const ( OFPBCT_ATOMIC = uint16(1 << 0) OFPBCT_ORDERED = uint16(1 << 1) )
Bundle control flags
const ( BEC_UNKNOWN uint16 = 2300 /* Unspecified error. */ BEC_ERERM uint16 = 2301 /* Permissions error. */ BEC_BAD_ID uint16 = 2302 /* Bundle ID doesn't exist. */ BEC_BUNDLE_EXIST uint16 = 2303 /* Bundle ID already exist. */ BEC_BUNDLE_CLOSED uint16 = 2304 /* Bundle ID is closed. */ BEC_OUT_OF_BUNDLE uint16 = 2305 /* Too many bundle IDs. */ BEC_BAD_TYPE uint16 = 2306 /* Unsupported or unknown message control type. */ BEC_BAD_FLAGS uint16 = 2307 /* Unsupported, unknown or inconsistent flags. */ BEC_MSG_BAD_LEN uint16 = 2308 /* Length problem in included message. */ BEC_MSG_BAD_XID uint16 = 2309 /* Inconsistent or duplicate XID. */ BEC_MSG_UNSUP uint16 = 2310 /* Unsupported message in this bundle. */ BEC_MSG_CONFLICT uint16 = 2311 /* Unsupported message combination in this bundle. */ BEC_MSG_TOO_MANY uint16 = 2312 /* Can't handle this many messages in bundle. */ BEC_MSG_FAILD uint16 = 2313 /* One message in bundle failed. */ BEC_TIMEOUT uint16 = 2314 /* Bundle is taking too long. */ BEC_BUNDLE_IN_PROCESS uint16 = 2315 /* Bundle is locking the resource. */ )
Bundle error code.
const ( FC_ADD = iota // OFPFC_ADD = 0 FC_MODIFY FC_MODIFY_STRICT FC_DELETE FC_DELETE_STRICT )
ofp_flow_mod_command 1.5
const ( FF_SEND_FLOW_REM = 1 << 0 /* Send flow removed message when flow expires or is deleted. */ FF_CHECK_OVERLAP = 1 << 1 /* Check for overlapping entries first */ FF_RESET_COUNTS = 1 << 2 /* Reset flow packet and byte counts */ FF_NO_PKT_COUNTS = 1 << 3 /* Don’t keep track of packet count */ FF_NO_BYT_COUNTS = 1 << 4 /* Don’t keep track of byte count */ )
ofp_flow_mod_flags 1.5
const ( RR_IDLE_TIMEOUT = iota /* Flow idle time exceeded idle_timeout. */ RR_HARD_TIMEOUT /* Time exceeded hard_timeout. */ RR_DELETE /* Evicted by a DELETE flow mod. */ RR_GROUP_DELETE /* Group was removed. */ OFPRR_METER_DELETE /* Meter was removed. */ OFPRR_EVICTION /* Switch eviction to free resources. */ )
ofp_flow_removed_reason
const ( XSC_OPENFLOW_BASIC = 0x8002 XSC_EXPERIMENTER = 0xFFFF )
ofp_oxs_class
const ( XST_OFB_DURATION = 0 /* Time flow entry has been alive. */ XST_OFB_IDLE_TIME = 1 /* Time flow entry has been idle. */ XST_OFB_FLOW_COUNT = 3 /* Number of aggregated flow entries. */ XST_OFB_PACKET_COUNT = 4 /* Number of packets in flow entry. */ XST_OFB_BYTE_COUNT = 5 /* Number of bytes in flow entry. */ )
oxs_ofb_stat_fields
const ( OFPG_MAX = 0xffffff00 /* Last usable group number. */ /* Fake groups. */ OFPG_ALL = 0xfffffffc /* Represents all groups for group delete commands. */ OFPG_ANY = 0xffffffff /* Wildcard group used only for flow stats requests. Selects all flows regardless of group (including flows with no group). */ )
const ( OFPG_BUCKET_MAX = 0xffffff00 /* Last usable bucket ID. */ OFPG_BUCKET_FIRST = 0xfffffffd /* First bucket ID in the list of action buckets of a group. This is applicable for OFPGC_INSERT_BUCKET and OFPGC_REMOVE_BUCKET commands. */ OFPG_BUCKET_LAST = 0xfffffffe /* Last bucket ID in the list of action buckets of a group. This is applicable for OFPGC_INSERT_BUCKET and OFPGC_REMOVE_BUCKET commands. */ OFPG_BUCKET_ALL = 0xffffffff /* All action buckets in a group. This is applicable for only OFPGC_REMOVE_BUCKET command. */ )
const ( OFPGC_ADD = 0 /* New group. */ OFPGC_MODIFY = 1 /* Modify all matching groups. */ OFPGC_DELETE = 2 /* Delete all matching groups. */ OFPGC_INSERT_BUCKET = 3 /* Insert action buckets to the already available list of action buckets in a matching group */ /* OFPGC_??? = 4, */ /* Reserved for future use. */ OFPGC_REMOVE_BUCKET = 5 /* Remove all action buckets or any specific action bucket from matching group */ )
const ( GT_ALL = 0 /* All (multicast/broadcast) group. */ GT_SELECT = 1 /* Select group. */ GT_INDIRECT = 2 /* Indirect group. */ GT_FF = 3 /* Fast failover group. */ )
const ( GBPT_WEIGHT = 0 /* Select groups only. */ GBPT_WATCH_PORT = 1 /* Fast failover groups only. */ GBPT_WATCH_GROUP = 2 /* Fast failover groups only. */ GBPT_EXPERIMENTER = 0xFFFF /* Experimenter defined. */ )
ofp_group_bucket_prop_type
const ( InstrType_GOTO_TABLE = 1 /* Setup the next table in the lookup pipeline */ InstrType_WRITE_METADATA = 2 /* Setup the metadata field for use later in pipeline */ InstrType_WRITE_ACTIONS = 3 /* Write the action(s) onto the datapath action set */ InstrType_APPLY_ACTIONS = 4 /* Applies the action(s) immediately */ InstrType_CLEAR_ACTIONS = 5 /* Clears all actions from the datapath action set */ InstrType_DEPRECATED = 6 /* Was Apply meter (rate limiter) */ InstrType_STAT_TRIGGER = 7 /* Statistics triggers */ InstrType_EXPERIMENTER = 0xFFFF /* Experimenter instruction */ )
ofp_instruction_type 1.5
const ( STF_PERIODIC = 1 << 0 /* Trigger for all multiples of thresholds. */ STF_ONLY_FIRST = 1 << 1 /* Trigger on only first reach threshold. */ )
ofp_stat_trigger_flags
const ( MatchType_Standard = iota /* Deprecated. */ MatchType_OXM )
ofp_match_type 1.5
const ( OXM_CLASS_NXM_0 = 0x0000 /* Backward compatibility with NXM */ OXM_CLASS_NXM_1 = 0x0001 /* Backward compatibility with NXM */ OXM_CLASS_OPENFLOW_BASIC = 0x8000 /* Basic class for OpenFlow */ OXM_CLASS_PACKET_REGS = 0x8001 /* Packet registers (pipeline fields). */ OXM_CLASS_EXPERIMENTER = 0xFFFF /* Experimenter class */ ONF_EXPERIMENTER_ID = 0x4f4e4600 /* ONF Experimenter ID */ )
ofp_oxm_class 1.5
const ( OXM_FIELD_IN_PORT = 0 /* Switch input port. */ OXM_FIELD_IN_PHY_PORT = 1 /* Switch physical input port. */ OXM_FIELD_METADATA = 2 /* Metadata passed between tables. */ OXM_FIELD_ETH_DST = 3 /* Ethernet destination address. */ OXM_FIELD_ETH_SRC = 4 /* Ethernet source address. */ OXM_FIELD_ETH_TYPE = 5 /* Ethernet frame type. */ OXM_FIELD_VLAN_VID = 6 /* VLAN id. */ OXM_FIELD_VLAN_PCP = 7 /* VLAN priority. */ OXM_FIELD_IP_DSCP = 8 /* IP DSCP (6 bits in ToS field). */ OXM_FIELD_IP_ECN = 9 /* IP ECN (2 bits in ToS field). */ OXM_FIELD_IP_PROTO = 10 /* IP protocol. */ OXM_FIELD_IPV4_SRC = 11 /* IPv4 source address. */ OXM_FIELD_IPV4_DST = 12 /* IPv4 destination address. */ OXM_FIELD_TCP_SRC = 13 /* TCP source port. */ OXM_FIELD_TCP_DST = 14 /* TCP destination port. */ OXM_FIELD_UDP_SRC = 15 /* UDP source port. */ OXM_FIELD_UDP_DST = 16 /* UDP destination port. */ OXM_FIELD_SCTP_SRC = 17 /* SCTP source port. */ OXM_FIELD_SCTP_DST = 18 /* SCTP destination port. */ OXM_FIELD_ICMPV4_TYPE = 19 /* ICMP type. */ OXM_FIELD_ICMPV4_CODE = 20 /* ICMP code. */ OXM_FIELD_ARP_OP = 21 /* ARP opcode. */ OXM_FIELD_ARP_SPA = 22 /* ARP source IPv4 address. */ OXM_FIELD_ARP_TPA = 23 /* ARP target IPv4 address. */ OXM_FIELD_ARP_SHA = 24 /* ARP source hardware address. */ OXM_FIELD_ARP_THA = 25 /* ARP target hardware address. */ OXM_FIELD_IPV6_SRC = 26 /* IPv6 source address. */ OXM_FIELD_IPV6_DST = 27 /* IPv6 destination address. */ OXM_FIELD_IPV6_FLABEL = 28 /* IPv6 Flow Label */ OXM_FIELD_ICMPV6_TYPE = 29 /* ICMPv6 type. */ OXM_FIELD_ICMPV6_CODE = 30 /* ICMPv6 code. */ OXM_FIELD_IPV6_ND_TARGET = 31 /* Target address for ND. */ OXM_FIELD_IPV6_ND_SLL = 32 /* Source link-layer for ND. */ OXM_FIELD_IPV6_ND_TLL = 33 /* Target link-layer for ND. */ OXM_FIELD_MPLS_LABEL = 34 /* MPLS label. */ OXM_FIELD_MPLS_TC = 35 /* MPLS TC. */ OXM_FIELD_MPLS_BOS = 36 /* MPLS BoS bit. */ OXM_FIELD_PBB_ISID = 37 /* PBB I-SID. */ OXM_FIELD_TUNNEL_ID = 38 /* Logical Port Metadata. */ OXM_FIELD_IPV6_EXTHDR = 39 /* IPv6 Extension Header pseudo-field */ OXM_FIELD_PBB_UCA = 41 /* PBB UCA header field (from OpenFlow 1.4) */ OXM_FIELD_TCP_FLAGS = 42 /* TCP flags (from OpenFlow 1.5) */ OXM_FIELD_ACTSET_OUTPUT = 43 /* actset output port number (from OpenFlow 1.5) */ OXM_FIELD_PACKET_TYPE = 44 /* Packet type value. (from OpenFlow 1.XXX) */ )
const ( NXM_NX_REG0 = 0 /* nicira extension: reg0 */ NXM_NX_REG1 = 1 /* nicira extension: reg1 */ NXM_NX_REG2 = 2 /* nicira extension: reg2 */ NXM_NX_REG3 = 3 /* nicira extension: reg3 */ NXM_NX_REG4 = 4 /* nicira extension: reg4 */ NXM_NX_REG5 = 5 /* nicira extension: reg5 */ NXM_NX_REG6 = 6 /* nicira extension: reg6 */ NXM_NX_REG7 = 7 /* nicira extension: reg7 */ NXM_NX_REG8 = 8 /* nicira extension: reg8 */ NXM_NX_REG9 = 9 /* nicira extension: reg9 */ NXM_NX_REG10 = 10 /* nicira extension: reg10 */ NXM_NX_REG11 = 11 /* nicira extension: reg11 */ NXM_NX_REG12 = 12 /* nicira extension: reg12 */ NXM_NX_REG13 = 13 /* nicira extension: reg13 */ NXM_NX_REG14 = 14 /* nicira extension: reg14 */ NXM_NX_REG15 = 15 /* nicira extension: reg15 */ NXM_NX_TUN_ID = 16 /* nicira extension: tun_id, VNI */ NXM_NX_ARP_SHA = 17 /* nicira extension: arp_sha, ARP Source Ethernet Address */ NXM_NX_ARP_THA = 18 /* nicira extension: arp_tha, ARP Target Ethernet Address */ NXM_NX_IPV6_SRC = 19 /* nicira extension: tun_ipv6_src, IPv6 source address */ NXM_NX_IPV6_DST = 20 /* nicira extension: tun_ipv6_src, IPv6 destination address */ NXM_NX_ICMPV6_TYPE = 21 /* nicira extension: icmpv6_type, ICMPv6 type */ NXM_NX_ICMPV6_CODE = 22 /* nicira extension: icmpv6_code, ICMPv6 code */ NXM_NX_ND_TARGET = 23 /* nicira extension: nd_target, ICMPv6 neighbor discovery source ethernet address*/ NXM_NX_ND_SLL = 24 /* nicira extension: nd_sll, ICMPv6 neighbor discovery source ethernet address*/ NXM_NX_ND_TLL = 25 /* nicira extension: nd_tll, ICMPv6 neighbor discovery target ethernet address */ NXM_NX_IP_FRAG = 26 /* nicira extension: ip_frag, IP fragments */ NXM_NX_IPV6_LABEL = 27 /* nicira extension: ipv6_label, least 20 bits hold flow label from IPv6 header, others are zero*/ NXM_NX_IP_ECN = 28 /* nicira extension: nw_ecn, TOS byte with DSCP bits cleared to 0 */ NXM_NX_IP_TTL = 29 /* nicira extension: nw_ttl, time-to-live field */ NXM_NX_MPLS_TTL = 30 /* nicira extension: mpls_ttl, time-to-live field from MPLS label */ NXM_NX_TUN_IPV4_SRC = 31 /* nicira extension: tun_src, src IPv4 address of tunnel */ NXM_NX_TUN_IPV4_DST = 32 /* nicira extension: tun_dst, dst IPv4 address of tunnel */ NXM_NX_PKT_MARK = 33 /* nicira extension: pkg_mark, packet mark from Linux kernal */ NXM_NX_TCP_FLAGS = 34 /* nicira extension: tcp_flags */ NXM_NX_DP_HASH = 35 NXM_NX_RECIRC_ID = 36 /* nicira extension: recirc_id, used with ct */ NXM_NX_CONJ_ID = 37 /* nicira extension: conj_id, conjunction ID for conjunctive match */ NXM_NX_TUN_GBP_ID = 38 /* nicira extension: tun_gbp_id, GBP policy ID */ NXM_NX_TUN_GBP_FLAGS = 39 /* nicira extension: tun_gbp_flags, GBP policy Flags*/ NXM_NX_TUN_METADATA0 = 40 /* nicira extension: tun_metadata, for Geneve header variable data */ NXM_NX_TUN_METADATA1 = 41 /* nicira extension: tun_metadata, for Geneve header variable data */ NXM_NX_TUN_METADATA2 = 42 /* nicira extension: tun_metadata, for Geneve header variable data */ NXM_NX_TUN_METADATA3 = 43 /* nicira extension: tun_metadata, for Geneve header variable data */ NXM_NX_TUN_METADATA4 = 44 /* nicira extension: tun_metadata, for Geneve header variable data */ NXM_NX_TUN_METADATA5 = 45 /* nicira extension: tun_metadata, for Geneve header variable data */ NXM_NX_TUN_METADATA6 = 46 /* nicira extension: tun_metadata, for Geneve header variable data */ NXM_NX_TUN_METADATA7 = 47 /* nicira extension: tun_metadata, for Geneve header variable data */ NXM_NX_TUN_FLAGS = 104 /* nicira extension: tunnel Flags */ NXM_NX_CT_STATE = 105 /* nicira extension: ct_state for conn_track */ NXM_NX_CT_ZONE = 106 /* nicira extension: ct_zone for conn_track */ NXM_NX_CT_MARK = 107 /* nicira extension: ct_mark for conn_track */ NXM_NX_CT_LABEL = 108 /* nicira extension: ct_label for conn_track */ NXM_NX_TUN_IPV6_SRC = 109 /* nicira extension: tun_dst_ipv6, dst IPv6 address of tunnel */ NXM_NX_TUN_IPV6_DST = 110 /* nicira extension: tun_dst_ipv6, src IPv6 address of tunnel */ NXM_NX_XXREG0 = 111 /* nicira extension: xxreg0 */ NXM_NX_XXREG1 = 112 /* nicira extension: xxreg0 */ NXM_NX_XXREG2 = 113 /* nicira extension: xxreg0 */ NXM_NX_XXREG3 = 114 /* nicira extension: xxreg0 */ NXM_NX_CT_NW_PROTO = 119 /* nicira extension: ct_nw_proto, the protocol byte in the IPv4 or IPv6 header forthe original direction tuple of the conntrack entry */ NXM_NX_CT_NW_SRC = 120 /* nicira extension: ct_nw_src, source IPv4 address of the original direction tuple of the conntrack entry */ NXM_NX_CT_NW_DST = 121 /* nicira extension: ct_nw_dst, destination IPv4 address of the original direction tuple of the conntrack entry */ NXM_NX_CT_IPV6_SRC = 122 /* nicira extension: ct_ipv6_src, source IPv6 address of the original direction tuple of the conntrack entry */ NXM_NX_CT_IPV6_DST = 123 /* nicira extension: ct_ipv6_dst, destination IPv6 address of the original direction tuple of the conntrack entry */ NXM_NX_CT_TP_SRC = 124 /* nicira extension: ct_tp_src, transport layer source port of the original direction tuple of the conntrack entry */ NXM_NX_CT_TP_DST = 125 /* nicira extension: ct_tp_dst, transport layer destination port of the original direction tuple of the conntrack entry */ )
const ( OXM_PACKET_REG0 = 0 /* OpenFlow 1.5 Packet register 0 */ OXM_PACKET_REG1 = 1 /* OpenFlow 1.5 Packet register 1 */ OXM_PACKET_REG2 = 2 /* OpenFlow 1.5 Packet register 2 */ OXM_PACKET_REG3 = 3 /* OpenFlow 1.5 Packet register 3 */ OXM_PACKET_REG4 = 4 /* OpenFlow 1.5 Packet register 4 */ OXM_PACKET_REG5 = 5 /* OpenFlow 1.5 Packet register 5 */ OXM_PACKET_REG6 = 6 /* OpenFlow 1.5 Packet register 6 */ OXM_PACKET_REG7 = 7 /* OpenFlow 1.5 Packet register 7 */ )
const ( MBT_DROP = 1 /* Drop packet. */ MBT_DSCP_REMARK = 2 /* Remark DSCP in the IP header. */ MBT_EXPERIMENTER = 0xFFFF /* Experimenter meter band. */ )
ofp_meter_band_type
const ( MC_ADD = 0 /* New meter. */ MC_MODIFY = 1 /* Modify specified meter. */ MC_DELETE = 2 /* Delete specified meter. */ )
ofp_meter_mod_command
const ( MF_KBPS = 0b0001 /* Rate value in kb/s (kilo-bit per second). */ MF_PKTPS = 0b0010 /* Rate value in packet/sec. */ MF_BURST = 0b0100 /* Do burst size. */ MF_STATS = 0b1000 /* Collect statistics. */ )
ofp_meter_flags
const ( /* Meter numbering. Flow meters can use any number up to OFPM_MAX. */ M_MAX = 0xffff0000 /* Last usable meter. */ M_SLOWPATH = 0xfffffffd /* Meter for slow datapath. */ M_CONTROLLER = 0xfffffffe /* Meter for controller connection. */ M_ALL = 0xffffffff /* Represents all meters for stat requests commands. */ )
ofp_meter
const ( METER_BAND_HEADER_LEN = 12 METER_BAND_LEN = 16 )
const ( OFPMPF_REQ_MORE = 1 << 0 /* More requests to follow. */ OFPMPF_REPLY_MORE = 1 << 0 /* More replies to follow. */ )
ofp_multipart_request_flags & ofp_multipart_reply_flags
const ( /* Description of this OpenFlow switch. * The request body is empty. * The reply body is struct ofp_desc_stats. */ MultipartType_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. */ MultipartType_FlowDesc = 1 /* Aggregate flow statistics. * The request body is struct ofp_aggregate_stats_request. * The reply body is struct ofp_aggregate_stats_reply. */ MultipartType_AggregateStats = 2 /* Flow table statistics. * The request body is empty. * The reply body is an array of struct ofp_table_stats. */ MultipartType_TableStats = 3 /* Port statistics. * The request body is struct ofp_port_stats_request. * The reply body is an array of struct ofp_port_stats. */ MultipartType_Port = 4 /* Queue statistics for a port * The request body is struct _queue_stats_request. * The reply body is an array of struct ofp_queue_stats */ MultipartType_QueueStats = 5 /* Group counter statistics. * The request body is struct ofp_group_stats_request. * The reply is an array of struct ofp_group_stats. */ MultipartType_GroupStats = 6 /* Group description. * The request body is empty. * The reply body is an array of struct ofp_group_desc. */ MultipartType_GroupDesc = 7 /* Group features. * The request body is empty. * The reply body is struct ofp_group_features. */ MultipartType_GroupFeatures = 8 /* Meter statistics. * The request body is struct ofp_meter_multipart_requests. * The reply body is an array of struct ofp_meter_stats. */ MultipartType_MeterStats = 9 /* Meter configuration. * The request body is struct ofp_meter_multipart_request. * The reply body is an array of struct ofp_meter_desc. */ MultipartType_MeterDesc = 10 /* Meter features. * The request body is empty. * The reply body is struct ofp_meter_features. */ MultipartType_MeterFeatures = 11 /* Table features. * The request body is either empty or contains an array of * struct ofp_table_features containing the controller’s * desired view of the switch. If the switch is unable to * set the specified view an error is returned. * The reply body is an array of struct ofp_table_features. */ MultipartType_TableFeatures = 12 /* Port description. * The request body is struct ofp_port_multipart_request. * The reply body is an array of struct ofp_port. */ MultipartType_PortDesc = 13 /* Table description. * The request body is empty. * The reply body is an array of struct ofp_table_desc. */ MultipartType_TableDesc = 14 /* Queue description. * The request body is struct ofp_queue_multipart_request. * The reply body is an array of struct ofp_queue_desc. */ MultipartType_QueueDesc = 15 /* Flow monitors. Reply may be an asynchronous message. * The request body is an array of struct ofp_flow_monitor_request. * The reply body is an array of struct ofp_flow_update_header. */ MultipartType_FlowMonitor = 16 /* Individual flow statistics (without description). * The request body is struct ofp_flow_stats_request. * The reply body is an array of struct ofp_flow_stats. */ MultipartType_FlowStats = 17 /* Controller status. * The request body is empty. * The reply body is an array of struct ofp_controller_status. */ MultipartType_ControllerStatus = 18 /* Bundle features. * The request body is ofp_bundle_features_request. * The reply body is struct ofp_bundle_features. */ MultipartType_BundleFeatures = 19 /* Experimenter extension. * The request and reply bodies begin with * struct ofp_experimenter_multipart_header. * The request and reply bodies are otherwise experimenter-defined. */ MultipartType_Experimenter = 0xffff )
_stats_types
const ( DESC_STR_LEN = 256 SERIAL_NUM_LEN = 32 )
const ( OFPTT_MAX = 0xfe /* Fake tables. */ OFPTT_ALL = 0xff /* Wildcard table used for table config, flow stats and flow deletes. */ )
const ( FSR_STATS_REQUEST = 0 /* Reply to a OFPMP_FLOW_STATS request. */ FSR_STAT_TRIGGER = 1 /* Status generated by OFPIT_STAT_TRIGGER. */ )
ofp_flow_stats_reason
const ( PSPT_ETHERNET = 0 /* Ethernet property. */ PSPT_OPTICAL = 1 /* Optical property. */ PSPT_EXPERIMENTER = 0xFFFF /* Experimenter property. */ )
ofp_port_stats_prop_type
const ( OSF_RX_TUNE = 1 << 0 /* Receiver tune info valid */ OSF_TX_TUNE = 1 << 1 /* Transmit tune info valid */ OSF_TX_PWR = 1 << 2 /* TX Power is valid */ OSF_RX_PWR = 1 << 4 /* RX power is valid */ OSF_TX_BIAS = 1 << 5 /* Transmit bias is valid */ OSF_TX_TEMP = 1 << 6 /* TX Temp is valid */ )
ofp_port_stats_optical_flags
const ( TFPT_INSTRUCTIONS = 0 // Instructions property. TFPT_INSTRUCTIONS_MISS = 1 // Instructions for table-miss. TFPT_NEXT_TABLES = 2 // Next Table property. TFPT_NEXT_TABLES_MISS = 3 // Next Table for table-miss. TFPT_WRITE_ACTIONS = 4 // Write Actions property. TFPT_WRITE_ACTIONS_MISS = 5 // Write Actions for table-miss. TFPT_APPLY_ACTIONS = 6 // Apply Actions property. TFPT_APPLY_ACTIONS_MISS = 7 // Apply Actions for table-miss TFPT_MATCH = 8 // Match property. TFPT_WILDCARDS = 10 // Wildcards property. TFPT_WRITE_SETFIELD = 12 // Write Set-Field property. TFPT_WRITE_SETFIELD_MISS = 13 // Write Set-Field for table-miss. TFPT_APPLY_SETFIELD = 14 // Apply Set-Field property. TFPT_APPLY_SETFIELD_MISS = 15 // Apply Set-Field for table-miss. TFPT_TABLE_SYNC_FROM = 16 // Table synchronisation property. TFPT_WRITE_COPYFIELD = 18 // Write Copy-Field property. TFPT_WRITE_COPYFIELD_MISS = 19 // Write Copy-Field for table-miss. TFPT_APPLY_COPYFIELD = 20 // Apply Copy-Field property. TFPT_APPLY_COPYFIELD_MISS = 21 // Apply Copy-Field for table-miss. TFPT_PACKET_TYPES = 22 // Packet types property. TFPT_EXPERIMENTER = 0xfffe // EXPERIMENTER PROPERTY. TFPT_EXPERIMENTER_MISS = 0xffff // EXPERIMENTER FOR TABLE-MISS. )
const ( TFF_INGRESS_TABLE = 1 << 0 /* Can be configured as ingress table. */ TFF_EGRESS_TABLE = 1 << 1 /* Can be configured as egress table. */ TFF_FIRST_EGRESS = 1 << 4 /* Is the first egress table. */ )
ofp_table_feature_flag
const ( TFC_REPLACE = 0 /* Replace full pipeline. */ TFC_MODIFY = 1 /* Modify flow tables capabilities. */ TFC_ENABLE = 2 /* Enable flow tables in the pipeline. */ TFC_DISABLE = 3 /* Disable flow tables in pipeline. */ )
ofp_table_features_command
const ( GFC_SELECT_WEIGHT = 1 << 0 /* Support weight for select groups */ GFC_SELECT_LIVENESS = 1 << 1 /* Support liveness for select groups */ GFC_CHAINING = 1 << 2 /* Support chaining groups */ GFC_CHAINING_CHECKS = 1 << 3 /* Check chaining for loops and delete */ )
ofp_group_capabilities
const ( MFF_ACTION_SET = 1 << 0 /* Support meter action in action set. */ MFF_ANY_POSITION = 1 << 1 /* Support any position in action list. */ MFF_MULTI_LIST = 1 << 2 /* Support multiple actions in action list. */ )
ofp_meter_feature_flags
const ( QDPT_MIN_RATE = 1 /* Minimum datarate guaranteed. */ QDPT_MAX_RATE = 2 /* Maximum datarate. */ QDPT_EXPERIMENTER = 0xffff /* Experimenter defined property. */ )
ofp_queue_desc_prop_type
const ( FMC_ADD = 0 /* New flow monitor. */ FMC_MODIFY = 1 /* Modify existing flow monitor. */ FMC_DELETE = 2 /* Delete/cancel existing flow monitor. */ )
ofp_flow_monitor_command
const ( /* struct ofp_flow_update_full. */ FME_INITIAL = 0 /* Flow present when flow monitor created. */ FME_ADDED = 1 /* Flow was added. */ FME_REMOVED = 2 /* Flow was removed. */ FME_MODIFIED = 3 /* Flow instructions were changed. */ /* struct ofp_flow_update_abbrev. */ FME_ABBREV = 4 /* Abbreviated reply. */ /* struct ofp_flow_update_header. */ FME_PAUSED = 5 /* Monitoring paused (out of buffer space). */ FME_RESUMED = 6 /* Monitoring resumed. */ )
ofp_flow_update_event
const ( /* When to send updates. */ FMF_INITIAL = 1 << 0 /* Initially matching flows. */ FMF_ADD = 1 << 1 /* New matching flows as they are added. */ FMF_REMOVED = 1 << 2 /* Old matching flows as they are removed. */ FMF_MODIFY = 1 << 3 /* Matching flows as they are changed. */ /* What to include in updates. */ FMF_INSTRUCTIONS = 1 << 4 /* If set, instructions are included. */ FMF_NO_ABBREV = 1 << 5 /* If set, include own changes in full. */ FMF_ONLY_OWN = 1 << 6 /* If set, don’t include other controllers. */ )
ofp_flow_monitor_flags
const ( BF_TIMESTAMP = 1 << 0 /* Request includes a timestamp. */ BF_TIME_SET_SCHED = 1 << 1 /* Request includes the sched_max_future and * sched_max_past parameters. */ )
ofp_bundle_feature_flags
const ( TMPBF_TIME_CAPABILITY = 0x1 /* Time feature property. */ TMPBF_EXPERIMENTER = 0xFFFF /* Experimenter property. */ )
ofp_bundle_features_prop_type
const ( NxExperimenterID = 0x00002320 // Vendor ID for Nicira extension messages NxActionHeaderLength = 10 // Length of Nicira extension message header )
NX Action constants
const ( NXAST_RESUBMIT = 1 // Nicira extended action: resubmit(port) NXAST_SET_TUNNEL = 2 // Nicira extended action: set_tunnel NXAST_DROP_SPOOFED_ARP = 3 // Nicira extended action: drop spoofed arp packets NXAST_SET_QUEUE = 4 // Nicira extended action: set_queue NXAST_POP_QUEUE = 5 // Nicira extended action: pop_tunnel NXAST_REG_MOVE = 6 // Nicira extended action: move:srcField[m1..n1]->dstField[m2..n2] NXAST_REG_LOAD = 7 // Nicira extended action: load:data->dstField[m..n] NXAST_NOTE = 8 // Nicira extended action: note NXAST_SET_TUNNEL_V6 = 9 // Nicira extended action: set_tunnel64 NXAST_MULTIPATH = 10 // Nicira extended action: set_tunnel NXAST_AUTOPATH = 11 // Nicira extended action: multipath NXAST_BUNDLE = 12 // Nicira extended action: bundle NXAST_BUNDLE_LOAD = 13 // Nicira extended action: bundle_load NXAST_RESUBMIT_TABLE = 14 // Nicira extended action: resubmit(port, table) NXAST_OUTPUT_REG = 15 // Nicira extended action: output:field NXAST_LEARN = 16 // Nicira extended action: learn NXAST_EXIT = 17 // Nicira extended action: exit NXAST_DEC_TTL = 18 // Nicira extended action: dec_ttl NXAST_FIN_TIMEOUT = 19 // Nicira extended action: fin_timeout NXAST_CONTROLLER = 20 // Nicira extended action: controller(reason=xx,max_len=xx,id=xx) NXAST_DEC_TTL_CNT_IDS = 21 // Nicira extended action: dec_ttl(id1,[id2]...) NXAST_PUSH_MPLS = 23 // Nicira extended action: push_mpls NXAST_POP_MPLS = 24 // Nicira extended action: pop_mpls NXAST_SET_MPLS_TTL = 25 // Nicira extended action: set_mpls_ttl NXAST_DEC_MPLS_TTL = 26 // Nicira extended action: dec_mpls_ttl NXAST_STACK_PUSH = 27 // Nicira extended action: push:src NXAST_STACK_POP = 28 // Nicira extended action: pop:dst NXAST_SAMPLE = 29 // Nicira extended action: sample NXAST_SET_MPLS_LABEL = 30 // Nicira extended action: set_mpls_label NXAST_SET_MPLS_TC = 31 // Nicira extended action: set_mpls_tc NXAST_OUTPUT_REG2 = 32 // Nicira extended action: output(port=port,max_len) NXAST_REG_LOAD2 = 33 // Nicira extended action: load NXAST_CONJUNCTION = 34 // Nicira extended action: conjunction NXAST_CT = 35 // Nicira extended action: ct NXAST_NAT = 36 // Nicira extended action: nat, need to be along with ct action NXAST_CONTROLLER2 = 37 // Nicira extended action: controller(userdata=xxx,pause) NXAST_SAMPLE2 = 38 // Nicira extended action: sample, support for exporting egress tunnel NXAST_OUTPUT_TRUNC = 39 // Nicira extended action: truncate output action NXAST_CT_CLEAR = 43 // Nicira extended action: ct_clear NXAST_CT_RESUBMIT = 44 // Nicira extended action: resubmit to table in ct NXAST_RAW_ENCAP = 46 // Nicira extended action: encap NXAST_RAW_DECAP = 47 // Nicira extended action: decap NXAST_DEC_NSH_TTL = 48 // Nicira extended action: dec_nsh_ttl )
NX Action subtypes
const ( NXAC2PT_MAX_LEN = iota /* ovs_be16 max bytes to send (default all). */ NXAC2PT_CONTROLLER_ID /* ovs_be16 dest controller ID (default 0). */ NXAC2PT_REASON /* uint8_t reason (OFPR_*), default 0. */ NXAC2PT_USERDATA /* Data to copy into NXPINT_USERDATA. */ NXAC2PT_PAUSE /* Flag to pause pipeline to resume later. */ NXAC2PT_METER_ID /* ovs_b32 meter (default NX_CTLR_NO_METER). */ NX_CTLR_NO_METER = 0 )
const ( NX_CT_STATE_NEW_OFS = 0 NX_CT_STATE_EST_OFS = 1 NX_CT_STATE_REL_OFS = 2 NX_CT_STATE_RPL_OFS = 3 NX_CT_STATE_INV_OFS = 4 NX_CT_STATE_TRK_OFS = 5 NX_CT_STATE_SNAT_OFS = 6 NX_CT_STATE_DNAT_OFS = 7 )
NX_CT_STATES
const ( NX_CT_F_COMMIT = 1 << 0 NX_CT_F_FORCE = 1 << 1 NX_CT_RECIRC_NONE = 0xff )
NX_CT Flags
const ( NX_NAT_RANGE_IPV4_MIN = 1 << 0 NX_NAT_RANGE_IPV4_MAX = 1 << 1 NX_NAT_RANGE_IPV6_MIN = 1 << 2 NX_NAT_RANGE_IPV6_MAX = 1 << 3 NX_NAT_RANGE_PROTO_MIN = 1 << 4 NX_NAT_RANGE_PROTO_MAX = 1 << 5 )
NX_NAT_RANGE flags
const ( NX_NAT_F_SRC = 1 << 0 NX_NAT_F_DST = 1 << 1 NX_NAT_F_PERSISTENT = 1 << 2 NX_NAT_F_PROTO_HASH = 1 << 3 NX_NAT_F_PROTO_RANDOM = 1 << 4 NX_NAT_F_MASK = (NX_NAT_F_SRC | NX_NAT_F_DST | NX_NAT_F_PERSISTENT | NX_NAT_F_PROTO_HASH | NX_NAT_F_PROTO_RANDOM) )
NX_NAT flags
const ( NX_LEARN_F_SEND_FLOW_REM = 1 << 0 NX_LEARN_F_DELETE_LEARNED = 1 << 1 NX_LEARN_F_WRITE_RESULT = 1 << 2 )
NX_LEARN flags
const ( LEARN_SPEC_HEADER_LOAD = 11 LEARN_SPEC_HEADER_MATCH = 13 )
NX_LEARN field offset
const ( NXM_OF_IN_PORT uint8 = iota NXM_OF_ETH_DST NXM_OF_ETH_SRC NXM_OF_ETH_TYPE NXM_OF_VLAN_TCI NXM_OF_IP_TOS NXM_OF_IP_PROTO NXM_OF_IP_SRC NXM_OF_IP_DST NXM_OF_TCP_SRC NXM_OF_TCP_DST NXM_OF_UDP_SRC NXM_OF_UDP_DST NXM_OF_ICMP_TYPE NXM_OF_ICMP_CODE NXM_OF_ARP_OP NXM_OF_ARP_SPA NXM_OF_ARP_TPA )
NXM_OF fields. The class number of these fields are 0x0000.
const ( NXTTMC_ADD = iota NXTTMC_DELETE NXTTMC_CLEAR )
TLV_Table_Mod commands.
const ( Type_SetFlowFormat = 12 Type_FlowModTableId = 15 Type_SetPacketInFormat = 16 Type_SetControllerId = 20 Type_TlvTableMod = 24 Type_TlvTableRequest = 25 Type_TlvTableReply = 26 Type_Resume = 28 Type_CtFlushZone = 29 Type_PacketIn2 = 30 )
Nicira extension messages.
const ( OFPERR_NXTTMFC_BAD_COMMAND = 16 OFPERR_NXTTMFC_BAD_OPT_LEN = 17 ERR_NXTTMFC_BAD_FIELD_IDX = 18 OFPERR_NXTTMFC_TABLE_FULL = 19 OFPERR_NXTTMFC_ALREADY_MAPPED = 20 OFPERR_NXTTMFC_DUP_ENTRY = 21 OFPERR_NXTTMFC_INVALID_TLV_DEL = 38 )
ofpet_tlv_table_mod_failed_code 1.3
const ( OFPUTIL_PACKET_IN_STD = iota /* OFPT_PACKET_IN for this OpenFlow version. */ OFPUTIL_PACKET_IN_NXT /* NXT_PACKET_IN (since OVS v1.1). */ OFPUTIL_PACKET_IN_NXT2 /* NXT_PACKET_IN2 (since OVS v2.6). */ )
ofputil_packet_in_format
const ( NXCPT_BRIDGE = 0x8000 NXCPT_STACK = 0x8001 NXCPT_MIRRORS = 0x8002 NXCPT_CONNTRACKED = 0x8003 NXCPT_TABLE_ID = 0x8004 NXCPT_COOKIE = 0x8005 NXCPT_ACTIONS = 0x8006 NXCPT_ACTION_SET = 0x8007 NXCPT_ODP_PORT = 0x8008 )
nx_continuation_prop_type
const ( /* Packet. */ NXPINT_PACKET = iota /* Raw packet data. */ NXPINT_FULL_LEN /* ovs_be32: Full packet len, if truncated. */ NXPINT_BUFFER_ID /* ovs_be32: Buffer ID, if buffered. */ /* Information about the flow that triggered the packet-in. */ NXPINT_TABLE_ID /* uint8_t: Table ID. */ NXPINT_COOKIE /* ovs_be64: Flow cookie. */ /* Other. */ NXPINT_REASON /* uint8_t, one of OFPR_*. */ NXPINT_METADATA /* NXM or OXM for metadata fields. */ NXPINT_USERDATA /* From NXAST_CONTROLLER2 userdata. */ NXPINT_CONTINUATION /* Private data for continuing processing. */ )
nx_packet_in2_prop_type
const ( /* Immutable messages. */ Type_Hello = 0 Type_Error = 1 Type_EchoRequest = 2 Type_EchoReply = 3 Type_Experimenter = 4 /* Switch configuration messages. */ Type_FeaturesRequest = 5 Type_FeaturesReply = 6 Type_GetConfigRequest = 7 Type_GetConfigReply = 8 Type_SetConfig = 9 /* Asynchronous messages. */ Type_PacketIn = 10 Type_FlowRemoved = 11 Type_PortStatus = 12 /* Controller command messages. */ Type_PacketOut = 13 Type_FlowMod = 14 Type_GroupMod = 15 Type_PortMod = 16 Type_TableMod = 17 /* Multipart messages. */ Type_MultiPartRequest = 18 Type_MultiPartReply = 19 /* Barrier messages. */ Type_BarrierRequest = 20 Type_BarrierReply = 21 /* Controller role change request messages. */ Type_RoleRequest = 24 Type_RoleReply = 25 /* Asynchronous message configuration. */ Type_GetAsyncRequest = 26 Type_GetAsyncReply = 27 Type_SetAsync = 28 /* Meters and rate limiters configuration messages. */ Type_MeterMod = 29 /* Controller role change event messages. */ Type_RoleStatus = 30 /* Asynchronous messages. */ Type_TableStatus = 31 /* Request forwarding by the switch. */ Type_RequestForward = 32 /* Bundle operations (multiple messages as a single operation). */ Type_BundleControl = 33 Type_BundleAddMessage = 34 /* Controller Status async message. */ Type_ControllerStatus = 35 )
ofp_type 1.5
const ( R_TABLE_MISS = iota /* No matching flow (table-miss flow entry). */ R_APPLY_ACTION /* Output to controller in apply-actions. */ R_INVALID_TTL /* Packet has invalid TTL */ R_ACTION_SET /* Output to controller in action set. */ R_GROUP /* Output to controller in group bucket. */ R_PACKET_OUT /* Output to controller in packet-out. */ )
ofp_packet_in_reason 1.5
const ( C_FRAG_NORMAL = 0 C_FRAG_DROP = 1 C_FRAG_REASM = 2 C_FRAG_MASK = 3 )
ofp_config_flags 1.5
const ( ET_HELLO_FAILED = 0 /* Hello protocol failed. */ ET_BAD_REQUEST = 1 /* Request was not understood. */ ET_BAD_ACTION = 2 /* Error in action description. */ ET_BAD_INSTRUCTION = 3 /* Error in instruction list. */ PET_BAD_MATCH = 4 /* Error in match. */ ET_FLOW_MOD_FAILED = 5 /* Problem modifying flow entry. */ ET_GROUP_MOD_FAILED = 6 /* Problem modifying group entry. */ ET_PORT_MOD_FAILED = 7 /* Port mod request failed. */ ET_TABLE_MOD_FAILED = 8 /* Table mod request failed. */ ET_QUEUE_OP_FAILED = 9 /* Queue operation failed. */ ET_SWITCH_CONFIG_FAILED = 10 /* Switch config request failed. */ ET_ROLE_REQUEST_FAILED = 11 /* Controller Role request failed. */ ET_METER_MOD_FAILED = 12 /* Error in meter. */ ET_TABLE_FEATURES_FAILED = 13 /* Setting table features failed. */ ET_BAD_PROPERTY = 14 /* Some property is invalid. */ ET_ASYNC_CONFIG_FAILED = 15 /* Asynchronous config request failed. */ ET_FLOW_MONITOR_FAILED = 16 /* Setting flow monitor failed. */ ET_BUNDLE_FAILED = 17 /* Bundle operation failed. */ ET_EXPERIMENTER = 0xffff /* Experimenter error messages. */ )
ofp_error_type 1.5
const ( HFC_INCOMPATIBLE = iota HFC_EPERM )
ofp_hello_failed_code 1.5
const ( BRC_BAD_VERSION = iota BRC_BAD_TYPE BRC_BAD_MULTIPART BRC_BAD_EXPERIMENTER BRC_BAD_EXP_TYPE BRC_EPERM BRC_BAD_LEN BRC_BUFFER_EMPTY BRC_BUFFER_UNKNOWN BRC_BAD_TABLE_ID BRC_IS_SLAVE BRC_BAD_PORT BRC_BAD_PACKET BRC_MULTIPART_BUFFER_OVERFLOW BRC_MULTIPART_REQUEST_TIMEOUT BRC_MULTIPART_REPLY_TIMEOUT BRC_MULTIPART_BAD_SCHED BRC_PIPELINE_FIELDS_ONLY BRC_UNKNOWN )
ofp_bad_request_code 1.5
const ( BAC_BAD_TYPE = iota BAC_BAD_LEN BAC_BAD_EXPERIMENTER BAC_BAD_EXP_TYPE BAC_BAD_OUT_PORT BAC_BAD_ARGUMENT BAC_EPERM BAC_TOO_MANY BAC_BAD_QUEUE BAC_BAD_OUT_GROUP BAC_MATCH_INCONSISTENT BAC_UNSUPPORTED_ORDER BAC_BAD_TAG BAC_BAD_SET_TYPE BAC_BAD_SET_LEN BAC_BAD_SET_ARGUMENT BAC_BAD_SET_MASK BAC_BAD_METER )
ofp_bad_action_code 1.5
const ( BIC_UNKNOWN_INST = iota BIC_UNSUP_INST BIC_BAD_TABLE_ID BIC_UNSUP_METADATA BIC_UNSUP_METADATA_MASK BIC_BAD_EXPERIMENTER BIC_BAD_EXP_TYPE BIC_BAD_LEN BIC_EPERM BIC_DUP_INST )
ofp_bad_instruction_code 1.5
const ( BMC_BAD_TYPE = iota BMC_BAD_LEN BMC_BAD_TAG BMC_BAD_DL_ADDR_MASK BMC_BAD_NW_ADDR_MASK BMC_BAD_WILDCARDS BMC_BAD_FIELD BMC_BAD_VALUE BMC_BAD_MASK BMC_BAD_PREREQ BMC_DUP_FIELD BMC_EPERM )
ofp_bad_match_code 1.5
const ( FMFC_UNKNOWN = iota FMFC_TABLE_FULL FMFC_BAD_TABLE_ID FMFC_OVERLAP FMFC_EPERM FMFC_BAD_TIMEOUT FMFC_BAD_COMMAND FMFC_BAD_FLAGS OFPFMFC_CANT_SYNC FMFC_BAD_PRIORITY FMFC_IS_SYNC )
ofp_flow_mod_failed_code 1.5
const ( GMFC_GROUP_EXISTS = iota GMFC_INVALID_GROUP GMFC_WEIGHT_UNSUPPORTED GMFC_OUT_OF_GROUPS GMFC_OUT_OF_BUCKETS GMFC_CHAINING_UNSUPPORTED GMFC_WATCH_UNSUPPORTED GMFC_LOOP GMFC_UNKNOWN_GROUP GMFC_CHAINED_GROUP GMFC_BAD_TYPE GMFC_BAD_COMMAND GMFC_BAD_BUCKET GMFC_BAD_WATCH GMFC_EPERM GMFC_UNKNOWN_BUCKET GMFC_BUCKET_EXISTS )
ofp_group_mod_failed_code 1.5
const ( PMFC_BAD_PORT = iota PMFC_BAD_HW_ADDR PMFC_BAD_CONFIG PMFC_BAD_ADVERTISE PMFC_EPERM )
ofp_port_mod_failed_code 1.5
const ( TMFC_BAD_TABLE = iota TMFC_BAD_CONFIG TMFC_EPERM )
ofp_table_mod_failed_code 1.5
const ( QOFC_BAD_PORT = iota QOFC_BAD_QUEUE QOFC_EPERM )
ofp_queue_op_failed_code 1.0
const ( SCFC_BAD_FLAGS = iota SCFC_BAD_LEN SCFC_EPERM )
ofp_switch_config_failed_code 1.5
const ( RRFC_STALE = iota RRFC_UNSUP RRFC_BAD_ROLE RRFC_ID_UNSUP RRFC_ID_IN_USE )
ofp_role_request_failed_code
const ( MMFC_UNKNOWN = iota MMFC_METER_EXISTS MMFC_INVALID_METER MMFC_UNKNOWN_METER MMFC_BAD_COMMAND MMFC_BAD_FLAGS MMFC_BAD_RATE MMFC_BAD_BURST MMFC_BAD_BAND MMFC_BAD_BAND_VALUE MMFC_OUT_OF_METERS MMFC_OUT_OF_BANDS )
ofp_meter_mod_failed_code
const ( TFFC_BAD_TABLE = iota TFFC_BAD_METADATA TFFC_EPERM TFFC_BAD_CAPA TFFC_BAD_MAX_ENT TFFC_BAD_FEATURES TFFC_BAD_COMMAND TFFC_TOO_MANY )
ofp_table_features_failed_code
const ( BPC_BAD_TYPE = iota BPC_BAD_LEN BPC_BAD_VALUE BPC_TOO_MANY BPC_DUP_TYPE BPC_BAD_EXPERIMENTER BPC_BAD_EXP_TYPE BPC_BAD_EXP_VALUE BPC_EPERM )
ofp_bad_property_code
const ( ACFC_INVALID = iota ACFC_UNSUPPORTED ACFC_EPERM )
ofp_async_config_failed_cod
const ( MOFC_UNKNOWN = iota MOFC_MONITOR_EXISTS MOFC_INVALID_MONITOR MOFC_UNKNOWN_MONITOR MOFC_BAD_COMMAND MOFC_BAD_FLAGS MOFC_BAD_TABLE_ID MOFC_BAD_OUT )
ofp_flow_monitor_failed_code
const ( BFC_UNKNOWN = iota BFC_EPERM BFC_BAD_ID BFC_BUNDLE_EXIST BFC_BUNDLE_CLOSED BFC_OUT_OF_BUNDLES BFC_BAD_TYPE BFC_BAD_FLAGS BFC_MSG_BAD_LEN BFC_MSG_BAD_XID BFC_MSG_UNSUP BFC_MSG_CONFLICT BFC_MSG_TOO_MANY BFC_MSG_FAILED BFC_TIMEOUT BFC_BUNDLE_IN_PROGRESS BFC_SCHED_NOT_SUPPORTED BFC_SCHED_FUTURE BFC_SCHED_PAST )
ofp_bundle_failed_code
const ( C_FLOW_STATS = 1 << 0 C_TABLE_STATS = 1 << 1 C_PORT_STATS = 1 << 2 C_GROUP_STATS = 1 << 3 C_IP_REASM = 1 << 5 C_QUEUE_STATS = 1 << 6 C_PORT_BLOCKED = 1 << 8 C_BUNDLES = 1 << 9 C_FLOW_MONITORING = 1 << 10 )
ofp_capabilities 1.5
const ( CR_ROLE_NOCHANGE = iota /* Don’t change current role. */ CR_ROLE_EQUAL /* Default role, full access. */ CR_ROLE_MASTER /* Full access, at most one master. */ CR_ROLE_SLAVE /* Read-only access. */ )
ofp_controller_role
const ( ACPT_PACKET_IN_SLAVE = 0 /* Packet-in mask for slave. */ ACPT_PACKET_IN_MASTER = 1 /* Packet-in mask for master. */ ACPT_PORT_STATUS_SLAVE = 2 /* Port-status mask for slave. */ ACPT_PORT_STATUS_MASTER = 3 /* Port-status mask for master. */ ACPT_FLOW_REMOVED_SLAVE = 4 /* Flow removed mask for slave. */ ACPT_FLOW_REMOVED_MASTER = 5 /* Flow removed mask for master. */ ACPT_ROLE_STATUS_SLAVE = 6 /* Role status mask for slave. */ ACPT_ROLE_STATUS_MASTER = 7 /* Role status mask for master. */ ACPT_TABLE_STATUS_SLAVE = 8 /* Table status mask for slave. */ ACPT_TABLE_STATUS_MASTER = 9 /* Table status mask for master. */ ACPT_REQUESTFORWARD_SLAVE = 10 /* RequestForward mask for slave. */ ACPT_REQUESTFORWARD_MASTER = 11 /* RequestForward mask for master. */ ACPT_FLOW_STATS_SLAVE = 12 /* Flow stats mask for slave. */ ACPT_FLOW_STATS_MASTER = 13 /* Flow stats mask for master. */ ACPT_CONT_STATUS_SLAVE = 14 /* Controller status mask for slave. */ ACPT_CONT_STATUS_MASTER = 15 /* Controller status mask for master. */ ACPT_EXPERIMENTER_SLAVE = 0xFFFE /* Experimenter for slave. */ ACPT_EXPERIMENTER_MASTER = 0xFFFF /* Experimenter for master. */ )
ofp_async_config_prop_type
const ( CRR_MASTER_REQUEST = iota /* Another controller asked to be master. */ CRR_CONFIG /* Configuration changed on the switch. */ CRR_EXPERIMENTER /* Experimenter data changed. */ )
ofp_controller_role_reason
const ( TC_DEPRECATED_MASK = 3 /* Deprecated bits */ TC_EVICTION = 1 << 2 /* Authorise table to evict flows. */ TC_VACANCY_EVENTS = 1 << 3 /* Enable vacancy events. */ )
ofp_table_config
const ( OFPTMPT_EVICTION = 0x2 /* Eviction property. */ OFPTMPT_VACANCY = 0x3 /* Vacancy property. */ OFPTMPT_EXPERIMENTER = 0xFFFF /* Experimenter property. */ )
ofp_table_mod_prop_type
const ( TMPEF_OTHER = 1 << 0 /* Using other factors. */ TMPEF_IMPORTANCE = 1 << 1 /* Using flow entry importance. */ TMPEF_LIFETIME = 1 << 2 /* Using flow entry lifetime. */ )
ofp_table_mod_prop_eviction_flag
const ( TR_VACANCY_DOWN = 3 /* Vacancy down threshold event. */ TR_VACANCY_UP = 4 /* Vacancy up threshold event. */ )
ofp_table_reason
const ( BCT_OPEN_REQUEST = iota BCT_OPEN_REPLY BCT_CLOSE_REQUEST BCT_CLOSE_REPLY BCT_COMMIT_REQUEST BCT_COMMIT_REPLY BCT_DISCARD_REQUEST BCT_DISCARD_REPLY )
ofp_bundle_ctrl_type
const ( BF_ATOMIC = 1 << 0 /* Execute atomically. */ BF_ORDERED = 1 << 1 /* Execute in specified order. */ BF_TIME = 1 << 2 /* Execute in specified time. */ )
ofp_bundle_flags
const ( BPT_TIME = 1 /* Time property. */ BPT_EXPERIMENTER = 0xFFFF /* Experimenter property. */ )
ofp_bundle_prop_type
const ( CSR_REQUEST = iota /* Controller requested status. */ CSR_CHANNEL_STATUS /* Oper status of channel changed. */ CSR_ROLE /* Controller role changed. */ CSR_CONTROLLER_ADDED /* New controller added. */ CSR_CONTROLLER_REMOVED /* Controller removed from config. */ CSR_SHORT_ID /* Controller ID changed. */ CSR_EXPERIMENTER /* Experimenter data changed. */ )
ofp_controller_status_reason
const ( CT_STATUS_UP = iota /* Control channel is operational. */ CT_STATUS_DOWN /* Control channel is not operational. */ )
ofp_control_channel_status
const ( CSPT_URI = 0 /* Connection URI property. */ CSPT_EXPERIMENTER = 0xFFFF /* Experimenter property. */ )
ofp_controller_status_prop_type
const ( PDPT_ETHERNET = 0 /* Ethernet property. */ PDPT_OPTICAL = 1 /* Optical property. */ PDPT_PIPELINE_INPUT = 2 /* Ingress pipeline fields. */ PDPT_PIPELINE_OUTPUT = 3 /* Egress pipeline fields. */ PDPT_RECIRCULATE = 4 /* Recirculation property. */ PDPT_EXPERIMENTER = 0xFFFF /* Experimenter property. */ )
ofp_port_desc_prop_type
const ( OPF_RX_TUNE = 1 << 0 /* Receiver is tunable */ OPF_TX_TUNE = 1 << 1 /* Transmit is tunable */ OPF_TX_PWR = 1 << 2 /* Power is configurable */ OPF_USE_FREQ = 1 << 3 /* Use Frequency, not wavelength */ )
ofp_optical_port_features
const ( ETH_ALEN = 6 MAX_PORT_NAME_LEN = 16 )
const ( PC_PORT_DOWN = 1 << 0 PC_NO_RECV = 1 << 2 PC_NO_FWD = 1 << 5 PC_NO_PACKET_IN = 1 << 6 )
ofp_port_config 1.5
const ( PS_LINK_DOWN = 1 << 0 PS_BLOCKED = 1 << 1 PS_LIVE = 1 << 2 )
ofp_port_state 1.5
const ( P_MAX = 0xffffff00 P_UNSET = 0xfffffff7 P_IN_PORT = 0xfffffff8 P_TABLE = 0xfffffff9 P_NORMAL = 0xfffffffa P_FLOOD = 0xfffffffb P_ALL = 0xfffffffc P_CONTROLLER = 0xfffffffd P_LOCAL = 0xfffffffe P_ANY = 0xffffffff )
ofp_port_no 1.5
const ( PF_10MB_HD = 1 << 0 PF_10MB_FD = 1 << 1 PF_100MB_HD = 1 << 2 PF_100MB_FD = 1 << 3 PF_1GB_HD = 1 << 4 PF_1GB_FD = 1 << 5 PF_10GB_FD = 1 << 6 PF_40GB_FD = 1 << 7 PF_100GB_FD = 1 << 8 PF_1TB_FD = 1 << 9 PF_OTHER = 1 << 10 PF_COPPER = 1 << 11 PF_FIBER = 1 << 12 PF_AUTONEG = 1 << 13 PF_PAUSE = 1 << 14 PF_PAUSE_ASYM = 1 << 15 )
ofp_port_features
const ( PMPT_ETHERNET = 0 /* Ethernet property. */ PMPT_OPTICAL = 1 /* Optical property. */ PMPT_EXPERIMENTER = 0xFFFF /* Experimenter property. */ )
ofp_port_mod_prop_type
const ( PR_ADD = iota PR_DELETE PR_MODIFY )
ofp_port_reason
const (
GPT_EXPERIMENTER = 0xFFFF /* Experimenter defined. */
)
ofp_group_prop_type
const (
MAX_TABLE_NAME_LEN = 32
)
const (
OFPBPT_EXPERIMENTER = 0xFFFF
)
Bundle property types
const (
// OFPP_IN_PORT is the default number of in_port field in resubmit actions.
OFPP_IN_PORT = 0xfff8
)
const OFPVID_NONE = 0x0000 /* No VLAN id was set. */
const OFPVID_PRESENT = 0x1000 /* Bit that indicate that a VLAN id is set */
const (
QSPT_EXPERIMENTER = 0xffff /* Experimenter defined property. */
)
ofp_queue_stats_prop_type
const Q_MAX_RATE_UNCFG = 0xffff
const Q_MIN_RATE_UNCFG = 0xffff
const (
RPT_EXPERIMENTER = 0xFFFF /* Experimenter property. */
)
ofp_role_prop_type
const (
VERSION = 6
)
Variables ¶
var NewOfp15Header func() common.Header = common.NewHeaderGenerator(VERSION)
Returns a new OpenFlow header with version field set to v1.5.
Functions ¶
func DecodeMatchField ¶
func NewConfigRequest ¶
func NewEchoReply ¶
Echo request/reply messages can be sent from either the switch or the controller, and must return an echo reply. They can be used to indicate the latency, bandwidth, and/or liveness of a controller-switch connection.
func NewEchoRequest ¶
Echo request/reply messages can be sent from either the switch or the controller, and must return an echo reply. They can be used to indicate the latency, bandwidth, and/or liveness of a controller-switch connection.
func NewGetAsyncRequest ¶
func ParseBundleError ¶
ParseBundleError returns error according to bundle error code.
Types ¶
type ActionCopyField ¶
type ActionCopyField struct { ActionHeader NBits uint16 SrcOffset uint16 DstOffset uint16 Pad uint16 OxmIdSrc OxmId OxmIdDst OxmId }
ofp_action_copy_field
func NewActionCopyField ¶
func (*ActionCopyField) Len ¶
func (a *ActionCopyField) Len() (n uint16)
func (*ActionCopyField) MarshalBinary ¶
func (a *ActionCopyField) MarshalBinary() (data []byte, err error)
func (*ActionCopyField) UnmarshalBinary ¶
func (a *ActionCopyField) UnmarshalBinary(data []byte) error
type ActionDecNwTtl ¶
type ActionDecNwTtl struct { ActionHeader // contains filtered or unexported fields }
func NewActionDecNwTtl ¶
func NewActionDecNwTtl() *ActionDecNwTtl
func (*ActionDecNwTtl) Len ¶
func (a *ActionDecNwTtl) Len() (n uint16)
func (*ActionDecNwTtl) MarshalBinary ¶
func (a *ActionDecNwTtl) MarshalBinary() (data []byte, err error)
func (*ActionDecNwTtl) UnmarshalBinary ¶
func (a *ActionDecNwTtl) UnmarshalBinary(data []byte) error
type ActionGroup ¶
type ActionGroup struct { ActionHeader GroupId uint32 }
func NewActionGroup ¶
func NewActionGroup(group uint32) *ActionGroup
func (*ActionGroup) Len ¶
func (a *ActionGroup) Len() (n uint16)
func (*ActionGroup) MarshalBinary ¶
func (a *ActionGroup) MarshalBinary() (data []byte, err error)
func (*ActionGroup) UnmarshalBinary ¶
func (a *ActionGroup) UnmarshalBinary(data []byte) error
type ActionHeader ¶
func (*ActionHeader) Header ¶
func (a *ActionHeader) Header() *ActionHeader
func (*ActionHeader) Len ¶
func (a *ActionHeader) Len() (n uint16)
func (*ActionHeader) MarshalBinary ¶
func (a *ActionHeader) MarshalBinary() (data []byte, err error)
func (*ActionHeader) UnmarshalBinary ¶
func (a *ActionHeader) UnmarshalBinary(data []byte) error
type ActionId ¶
ofp_action_id
func NewActionId ¶
func (*ActionId) MarshalBinary ¶
func (*ActionId) UnmarshalBinary ¶
type ActionMeter ¶
type ActionMeter struct { ActionHeader MeterId uint32 }
ofp_action_meter
func NewActionMeter ¶
func NewActionMeter(meterId uint32) *ActionMeter
func (*ActionMeter) Len ¶
func (a *ActionMeter) Len() (n uint16)
func (*ActionMeter) MarshalBinary ¶
func (a *ActionMeter) MarshalBinary() (data []byte, err error)
func (*ActionMeter) UnmarshalBinary ¶
func (a *ActionMeter) UnmarshalBinary(data []byte) error
type ActionMplsTtl ¶
type ActionMplsTtl struct { ActionHeader MplsTtl uint8 // contains filtered or unexported fields }
type ActionNwTtl ¶
type ActionNwTtl struct { ActionHeader NwTtl uint8 // contains filtered or unexported fields }
type ActionOutput ¶
type ActionOutput struct { ActionHeader Port uint32 MaxLen uint16 // contains filtered or unexported fields }
Action structure for OFPAT_OUTPUT, which sends packets out ’port’. When the ’port’ is the OFPP_CONTROLLER, ’max_len’ indicates the max number of bytes to send. A ’max_len’ of zero means no bytes of the packet should be sent.
func NewActionOutput ¶
func NewActionOutput(portNum uint32) *ActionOutput
Returns a new Action Output message which sends packets out port number.
func (*ActionOutput) Len ¶
func (a *ActionOutput) Len() (n uint16)
func (*ActionOutput) MarshalBinary ¶
func (a *ActionOutput) MarshalBinary() (data []byte, err error)
func (*ActionOutput) UnmarshalBinary ¶
func (a *ActionOutput) UnmarshalBinary(data []byte) error
type ActionPopMpls ¶
type ActionPopMpls struct { ActionHeader EtherType uint16 // contains filtered or unexported fields }
func NewActionPopMpls ¶
func NewActionPopMpls(etherType uint16) *ActionPopMpls
func (*ActionPopMpls) Len ¶
func (a *ActionPopMpls) Len() (n uint16)
func (*ActionPopMpls) MarshalBinary ¶
func (a *ActionPopMpls) MarshalBinary() (data []byte, err error)
func (*ActionPopMpls) UnmarshalBinary ¶
func (a *ActionPopMpls) UnmarshalBinary(data []byte) error
type ActionPopVlan ¶
type ActionPopVlan struct { ActionHeader // contains filtered or unexported fields }
func NewActionPopVlan ¶
func NewActionPopVlan() *ActionPopVlan
func (*ActionPopVlan) Len ¶
func (a *ActionPopVlan) Len() (n uint16)
func (*ActionPopVlan) MarshalBinary ¶
func (a *ActionPopVlan) MarshalBinary() (data []byte, err error)
func (*ActionPopVlan) UnmarshalBinary ¶
func (a *ActionPopVlan) UnmarshalBinary(data []byte) error
type ActionProperty ¶
type ActionProperty struct { OFTablePropertyHeader Actions []ActionId }
func NewActionProperty ¶
func NewActionProperty(Type uint16) *ActionProperty
Type could be: * TFPT_APPLY_ACTIONS * TFPT_APPLY_ACTIONS_MISS * TFPT_WRITE_ACTIONS * TFPT_WRITE_ACTIONS_MISS
func (*ActionProperty) AddActionId ¶
func (p *ActionProperty) AddActionId(a ActionId)
func (*ActionProperty) Len ¶
func (p *ActionProperty) Len() uint16
func (*ActionProperty) MarshalBinary ¶
func (p *ActionProperty) MarshalBinary() (data []byte, err error)
func (*ActionProperty) UnmarshalBinary ¶
func (p *ActionProperty) UnmarshalBinary(data []byte) error
type ActionPush ¶
type ActionPush struct { ActionHeader EtherType uint16 // contains filtered or unexported fields }
func NewActionPushMpls ¶
func NewActionPushMpls(etherType uint16) *ActionPush
func NewActionPushVlan ¶
func NewActionPushVlan(etherType uint16) *ActionPush
func (*ActionPush) Len ¶
func (a *ActionPush) Len() (n uint16)
func (*ActionPush) MarshalBinary ¶
func (a *ActionPush) MarshalBinary() (data []byte, err error)
func (*ActionPush) UnmarshalBinary ¶
func (a *ActionPush) UnmarshalBinary(data []byte) error
type ActionSetField ¶
type ActionSetField struct { ActionHeader Field MatchField }
func NewActionSetField ¶
func NewActionSetField(field MatchField) *ActionSetField
func (*ActionSetField) Len ¶
func (a *ActionSetField) Len() (n uint16)
func (*ActionSetField) MarshalBinary ¶
func (a *ActionSetField) MarshalBinary() (data []byte, err error)
func (*ActionSetField) UnmarshalBinary ¶
func (a *ActionSetField) UnmarshalBinary(data []byte) error
type ActionSetqueue ¶
type ActionSetqueue struct { ActionHeader QueueId uint32 }
func NewActionSetQueue ¶
func NewActionSetQueue(queue uint32) *ActionSetqueue
func (*ActionSetqueue) Len ¶
func (a *ActionSetqueue) Len() (n uint16)
func (*ActionSetqueue) MarshalBinary ¶
func (a *ActionSetqueue) MarshalBinary() (data []byte, err error)
func (*ActionSetqueue) UnmarshalBinary ¶
func (a *ActionSetqueue) UnmarshalBinary(data []byte) error
type ActsetOutputField ¶
type ActsetOutputField struct {
OutputPort uint32
}
ACTSET_OUTPUT field
func (*ActsetOutputField) Len ¶
func (m *ActsetOutputField) Len() uint16
func (*ActsetOutputField) MarshalBinary ¶
func (m *ActsetOutputField) MarshalBinary() (data []byte, err error)
func (*ActsetOutputField) UnmarshalBinary ¶
func (m *ActsetOutputField) UnmarshalBinary(data []byte) error
type AggregateStats ¶
type AggregateStats struct { PacketCount uint64 ByteCount uint64 FlowCount uint32 // contains filtered or unexported fields }
ofp_aggregate_stats_reply
func NewAggregateStats ¶
func NewAggregateStats() *AggregateStats
func (*AggregateStats) Len ¶
func (s *AggregateStats) Len() (n uint16)
func (*AggregateStats) MarshalBinary ¶
func (s *AggregateStats) MarshalBinary() (data []byte, err error)
func (*AggregateStats) UnmarshalBinary ¶
func (s *AggregateStats) UnmarshalBinary(data []byte) error
type AggregateStatsReply ¶
type AggregateStatsReply struct {
Stats
}
ofp_aggregate_stats_reply
func NewAggregateStatsReply ¶
func NewAggregateStatsReply() *AggregateStatsReply
func (*AggregateStatsReply) Len ¶
func (a *AggregateStatsReply) Len() uint16
func (*AggregateStatsReply) MarshalBinary ¶
func (s *AggregateStatsReply) MarshalBinary() (data []byte, err error)
func (*AggregateStatsReply) UnmarshalBinary ¶
func (s *AggregateStatsReply) UnmarshalBinary(data []byte) error
type AggregateStatsRequest ¶
type AggregateStatsRequest struct { TableId uint8 OutPort uint32 OutGroup uint32 Cookie uint64 CookieMask uint64 Match // contains filtered or unexported fields }
ofp_aggregate_stats_request
func NewAggregateStatsRequest ¶
func NewAggregateStatsRequest() *AggregateStatsRequest
func (*AggregateStatsRequest) Len ¶
func (s *AggregateStatsRequest) Len() (n uint16)
func (*AggregateStatsRequest) MarshalBinary ¶
func (s *AggregateStatsRequest) MarshalBinary() (data []byte, err error)
func (*AggregateStatsRequest) UnmarshalBinary ¶
func (s *AggregateStatsRequest) UnmarshalBinary(data []byte) error
type ArpOperField ¶
type ArpOperField struct {
ArpOper uint16
}
ARP Oper type field
func (*ArpOperField) Len ¶
func (m *ArpOperField) Len() uint16
func (*ArpOperField) MarshalBinary ¶
func (m *ArpOperField) MarshalBinary() (data []byte, err error)
func (*ArpOperField) UnmarshalBinary ¶
func (m *ArpOperField) UnmarshalBinary(data []byte) error
type ArpXHaField ¶
type ArpXHaField struct {
ArpHa net.HardwareAddr
}
ARP Host Address field message, used by arp_sha and arp_tha match
func (*ArpXHaField) Len ¶
func (m *ArpXHaField) Len() uint16
func (*ArpXHaField) MarshalBinary ¶
func (m *ArpXHaField) MarshalBinary() (data []byte, err error)
func (*ArpXHaField) UnmarshalBinary ¶
func (m *ArpXHaField) UnmarshalBinary(data []byte) error
type ArpXPaField ¶
ARP Protocol Address field message, used by arp_spa and arp_tpa match
func (*ArpXPaField) Len ¶
func (m *ArpXPaField) Len() uint16
func (*ArpXPaField) MarshalBinary ¶
func (m *ArpXPaField) MarshalBinary() (data []byte, err error)
func (*ArpXPaField) UnmarshalBinary ¶
func (m *ArpXPaField) UnmarshalBinary(data []byte) error
type AsyncConfigPropExperimenter ¶
type AsyncConfigPropExperimenter struct { Header AsyncConfigPropHeader Experimenter uint32 Data []byte Pad []byte }
ofp_async_config_prop_experimenter
func (*AsyncConfigPropExperimenter) Len ¶
func (p *AsyncConfigPropExperimenter) Len() uint16
func (*AsyncConfigPropExperimenter) MarshalBinary ¶
func (p *AsyncConfigPropExperimenter) MarshalBinary() (data []byte, err error)
func (*AsyncConfigPropExperimenter) UnmarshalBinary ¶
func (p *AsyncConfigPropExperimenter) UnmarshalBinary(data []byte) (err error)
type AsyncConfigPropHeader ¶
func (*AsyncConfigPropHeader) Len ¶
func (h *AsyncConfigPropHeader) Len() uint16
func (*AsyncConfigPropHeader) MarshalBinary ¶
func (h *AsyncConfigPropHeader) MarshalBinary() (data []byte, err error)
func (*AsyncConfigPropHeader) UnmarshalBinary ¶
func (h *AsyncConfigPropHeader) UnmarshalBinary(data []byte) (err error)
type AsyncConfigPropReasons ¶
type AsyncConfigPropReasons struct { Header AsyncConfigPropHeader Mask uint32 }
ofp_async_config_prop_reasons
func (*AsyncConfigPropReasons) Len ¶
func (p *AsyncConfigPropReasons) Len() uint16
func (*AsyncConfigPropReasons) MarshalBinary ¶
func (p *AsyncConfigPropReasons) MarshalBinary() (data []byte, err error)
func (*AsyncConfigPropReasons) UnmarshalBinary ¶
func (p *AsyncConfigPropReasons) UnmarshalBinary(data []byte) (err error)
type Async_Config ¶
func (*Async_Config) Len ¶
func (a *Async_Config) Len() uint16
func (*Async_Config) MarshalBinary ¶
func (a *Async_Config) MarshalBinary() (data []byte, err error)
func (*Async_Config) UnmarshalBinary ¶
func (a *Async_Config) UnmarshalBinary(data []byte) (err error)
type BndleAdd ¶
type BndleAdd struct { common.Header BundleId uint32 Pad uint16 Flags uint16 Message util.Message Properties []util.Message }
ofp_bundle_add_msg
func NewBndleAdd ¶
func (*BndleAdd) MarshalBinary ¶
func (*BndleAdd) UnmarshalBinary ¶
type Bucket ¶
type Bucket struct { Length uint16 /* Length the bucket in bytes, including this header and any padding to make it 64-bit aligned. */ ActionArrayLen uint16 /* Length of all actions in bytes. */ BucketId uint32 /* Bucket Id used to identify bucket*/ Actions []Action /* zero or more actions */ Properties []util.Message }
ofp_bucket
func (*Bucket) AddProperty ¶
func (*Bucket) MarshalBinary ¶
func (*Bucket) UnmarshalBinary ¶
type BucketCounter ¶
ofp_bucket_counter
func NewBucketCounter ¶
func NewBucketCounter() *BucketCounter
func (*BucketCounter) Len ¶
func (b *BucketCounter) Len() uint16
func (*BucketCounter) MarshalBinary ¶
func (g *BucketCounter) MarshalBinary() (data []byte, err error)
func (*BucketCounter) UnmarshalBinary ¶
func (g *BucketCounter) UnmarshalBinary(data []byte) (err error)
type BundleAdd ¶
type BundleAdd struct { BundleID uint32 Flags uint16 Message util.Message Properties []BundlePropertyExperimenter // contains filtered or unexported fields }
BundleAdd is a message to add supported message in the opened bundle. After all required messages are added, close the bundle and commit it. The Switch will realized added messages in the bundle. Discard the bundle after close it, if the added messages are not wanted to realize on the switch.
func (*BundleAdd) MarshalBinary ¶
func (*BundleAdd) UnmarshalBinary ¶
type BundleControl ¶
BundleControl is a message to control the bundle.
func (*BundleControl) Len ¶
func (b *BundleControl) Len() (n uint16)
func (*BundleControl) MarshalBinary ¶
func (b *BundleControl) MarshalBinary() (data []byte, err error)
func (*BundleControl) UnmarshalBinary ¶
func (b *BundleControl) UnmarshalBinary(data []byte) error
type BundleCtrl ¶
type BundleCtrl struct { common.Header BundleId uint32 Type uint16 Flags uint16 Properties []util.Message }
ofp_bundle_ctrl_msg
func NewBundleCtrl ¶
func NewBundleCtrl(id uint32, bundleType uint16, flags uint16) *BundleCtrl
func (*BundleCtrl) Len ¶
func (c *BundleCtrl) Len() uint16
func (*BundleCtrl) MarshalBinary ¶
func (c *BundleCtrl) MarshalBinary() (data []byte, err error)
func (*BundleCtrl) UnmarshalBinary ¶
func (c *BundleCtrl) UnmarshalBinary(data []byte) (err error)
type BundleFeatures ¶
ofp_bundle_features
func NewBundleFeatures ¶
func NewBundleFeatures() *BundleFeatures
func (*BundleFeatures) Len ¶
func (b *BundleFeatures) Len() uint16
func (*BundleFeatures) MarshalBinary ¶
func (b *BundleFeatures) MarshalBinary() (data []byte, err error)
func (*BundleFeatures) UnmarshalBinary ¶
func (b *BundleFeatures) UnmarshalBinary(data []byte) (err error)
type BundleFeaturesPropTime ¶
type BundleFeaturesPropTime struct { Header PropHeader Pad uint32 SchedAccuracy OfpTime SchedMaxFuture OfpTime SchedMaxPast OfpTime Timestamp OfpTime }
ofp_bundle_features_prop_time
func NewBundleFeaturesPropTime ¶
func NewBundleFeaturesPropTime() *BundleFeaturesPropTime
func (*BundleFeaturesPropTime) Len ¶
func (prop *BundleFeaturesPropTime) Len() uint16
func (*BundleFeaturesPropTime) MarshalBinary ¶
func (prop *BundleFeaturesPropTime) MarshalBinary() (data []byte, err error)
func (*BundleFeaturesPropTime) UnmarshalBinary ¶
func (prop *BundleFeaturesPropTime) UnmarshalBinary(data []byte) (err error)
type BundleFeaturesRequest ¶
type BundleFeaturesRequest struct { FeaturesRequestFlag uint32 Pad uint32 Properties []util.Message }
ofp_bundle_features_request
func NewBundleFeaturesRequest ¶
func NewBundleFeaturesRequest() *BundleFeaturesRequest
func (*BundleFeaturesRequest) Len ¶
func (b *BundleFeaturesRequest) Len() uint16
func (*BundleFeaturesRequest) MarshalBinary ¶
func (b *BundleFeaturesRequest) MarshalBinary() (data []byte, err error)
func (*BundleFeaturesRequest) UnmarshalBinary ¶
func (b *BundleFeaturesRequest) UnmarshalBinary(data []byte) (err error)
type BundlePropTime ¶
type BundlePropTime struct { Header PropHeader Pad uint32 SchedTime OfpTime }
ofp_bundle_prop_time
func (*BundlePropTime) Len ¶
func (t *BundlePropTime) Len() uint16
func (*BundlePropTime) MarshalBinary ¶
func (t *BundlePropTime) MarshalBinary() (data []byte, err error)
func (*BundlePropTime) UnmarshalBinary ¶
func (t *BundlePropTime) UnmarshalBinary(data []byte) (err error)
type BundlePropertyExperimenter ¶
type BundlePropertyExperimenter struct { Type uint16 Length uint16 ExperimenterID uint32 ExperimenterType uint32 // contains filtered or unexported fields }
func NewBundlePropertyExperimenter ¶
func NewBundlePropertyExperimenter() *BundlePropertyExperimenter
func (*BundlePropertyExperimenter) Len ¶
func (p *BundlePropertyExperimenter) Len() uint16
func (*BundlePropertyExperimenter) MarshalBinary ¶
func (p *BundlePropertyExperimenter) MarshalBinary() (data []byte, err error)
func (*BundlePropertyExperimenter) UnmarshalBinary ¶
func (p *BundlePropertyExperimenter) UnmarshalBinary(data []byte) error
type ByteArrayField ¶
func (*ByteArrayField) Len ¶
func (m *ByteArrayField) Len() uint16
Len returns the length of ByteArrayField. The length of ByteArrayField should be multiple of 8 byte.
func (*ByteArrayField) MarshalBinary ¶
func (m *ByteArrayField) MarshalBinary() (data []byte, err error)
func (*ByteArrayField) UnmarshalBinary ¶
func (m *ByteArrayField) UnmarshalBinary(data []byte) error
type ByteCountStatField ¶
type ByteCountStatField = PBCountStatField
func NewByteCountStatField ¶
func NewByteCountStatField() *ByteCountStatField
type CTLabel ¶
type CTLabel struct {
// contains filtered or unexported fields
}
func (*CTLabel) MarshalBinary ¶
func (*CTLabel) UnmarshalBinary ¶
type CTStates ¶
type CTStates struct {
// contains filtered or unexported fields
}
func NewCTStates ¶
func NewCTStates() *CTStates
type ContinuationPropActionSet ¶
type ContinuationPropActionSet struct { *PropHeader /* Type: NXCPT_ACTION_SET */ ActionSet []Action // contains filtered or unexported fields }
func (*ContinuationPropActionSet) Len ¶
func (p *ContinuationPropActionSet) Len() (n uint16)
func (*ContinuationPropActionSet) MarshalBinary ¶
func (p *ContinuationPropActionSet) MarshalBinary() (data []byte, err error)
func (*ContinuationPropActionSet) UnmarshalBinary ¶
func (p *ContinuationPropActionSet) UnmarshalBinary(data []byte) error
type ContinuationPropActions ¶
type ContinuationPropActions struct { *PropHeader /* Type: NXCPT_ACTIONS */ Actions []Action // contains filtered or unexported fields }
func (*ContinuationPropActions) Len ¶
func (p *ContinuationPropActions) Len() (n uint16)
func (*ContinuationPropActions) MarshalBinary ¶
func (p *ContinuationPropActions) MarshalBinary() (data []byte, err error)
func (*ContinuationPropActions) UnmarshalBinary ¶
func (p *ContinuationPropActions) UnmarshalBinary(data []byte) error
type ContinuationPropBridge ¶
type ContinuationPropBridge struct { *PropHeader /* Type: NXCPT_BRIDGE */ Bridge [4]uint32 // contains filtered or unexported fields }
func (*ContinuationPropBridge) Len ¶
func (p *ContinuationPropBridge) Len() (n uint16)
func (*ContinuationPropBridge) MarshalBinary ¶
func (p *ContinuationPropBridge) MarshalBinary() (data []byte, err error)
func (*ContinuationPropBridge) UnmarshalBinary ¶
func (p *ContinuationPropBridge) UnmarshalBinary(data []byte) error
type ContinuationPropConntracked ¶
type ContinuationPropConntracked struct { *PropHeader /* Type: NXCPT_CONNTRACKED */ // contains filtered or unexported fields }
func (*ContinuationPropConntracked) Len ¶
func (p *ContinuationPropConntracked) Len() (n uint16)
func (*ContinuationPropConntracked) MarshalBinary ¶
func (p *ContinuationPropConntracked) MarshalBinary() (data []byte, err error)
func (*ContinuationPropConntracked) UnmarshalBinary ¶
func (p *ContinuationPropConntracked) UnmarshalBinary(data []byte) error
type ContinuationPropCookie ¶
type ContinuationPropCookie struct { *PropHeader /* Type: NXCPT_COOKIE */ Cookie uint64 // contains filtered or unexported fields }
func (*ContinuationPropCookie) Len ¶
func (p *ContinuationPropCookie) Len() (n uint16)
func (*ContinuationPropCookie) MarshalBinary ¶
func (p *ContinuationPropCookie) MarshalBinary() (data []byte, err error)
func (*ContinuationPropCookie) UnmarshalBinary ¶
func (p *ContinuationPropCookie) UnmarshalBinary(data []byte) error
type ContinuationPropMirrors ¶
type ContinuationPropMirrors struct { *PropHeader /* Type: NXCPT_MIRRORS */ Mirrors uint32 }
func (*ContinuationPropMirrors) Len ¶
func (p *ContinuationPropMirrors) Len() (n uint16)
func (*ContinuationPropMirrors) MarshalBinary ¶
func (p *ContinuationPropMirrors) MarshalBinary() (data []byte, err error)
func (*ContinuationPropMirrors) UnmarshalBinary ¶
func (p *ContinuationPropMirrors) UnmarshalBinary(data []byte) error
type ContinuationPropOdpPort ¶
type ContinuationPropOdpPort struct { *PropHeader /* Type: NXCPT_ODP_PORT */ OdpPort uint32 }
func (*ContinuationPropOdpPort) Len ¶
func (p *ContinuationPropOdpPort) Len() (n uint16)
func (*ContinuationPropOdpPort) MarshalBinary ¶
func (p *ContinuationPropOdpPort) MarshalBinary() (data []byte, err error)
func (*ContinuationPropOdpPort) UnmarshalBinary ¶
func (p *ContinuationPropOdpPort) UnmarshalBinary(data []byte) error
type ContinuationPropStack ¶
type ContinuationPropStack struct { *PropHeader /* Type: NXCPT_STACK */ Stack []uint8 // contains filtered or unexported fields }
func (*ContinuationPropStack) Len ¶
func (p *ContinuationPropStack) Len() (n uint16)
func (*ContinuationPropStack) MarshalBinary ¶
func (p *ContinuationPropStack) MarshalBinary() (data []byte, err error)
func (*ContinuationPropStack) UnmarshalBinary ¶
func (p *ContinuationPropStack) UnmarshalBinary(data []byte) error
type ContinuationPropTableID ¶
type ContinuationPropTableID struct { *PropHeader /* Type: NXCPT_TABLE_ID */ TableID uint8 // contains filtered or unexported fields }
func (*ContinuationPropTableID) Len ¶
func (p *ContinuationPropTableID) Len() (n uint16)
func (*ContinuationPropTableID) MarshalBinary ¶
func (p *ContinuationPropTableID) MarshalBinary() (data []byte, err error)
func (*ContinuationPropTableID) UnmarshalBinary ¶
func (p *ContinuationPropTableID) UnmarshalBinary(data []byte) error
type ControllerID ¶
type ControllerID struct { ID uint16 // contains filtered or unexported fields }
func (*ControllerID) Len ¶
func (c *ControllerID) Len() uint16
func (*ControllerID) MarshalBinary ¶
func (c *ControllerID) MarshalBinary() (data []byte, err error)
func (*ControllerID) UnmarshalBinary ¶
func (c *ControllerID) UnmarshalBinary(data []byte) error
type ControllerStatus ¶
type ControllerStatus struct { Length uint16 ShortId uint16 Role uint32 Reason uint8 ChannelStatus uint8 Pad []uint8 // 6 bytes Properties []util.Message // ofp_controller_status_prop_header }
ofp_controller_status
func NewControllerStatus ¶
func NewControllerStatus() *ControllerStatus
func (*ControllerStatus) Len ¶
func (c *ControllerStatus) Len() (n uint16)
func (*ControllerStatus) MarshalBinary ¶
func (c *ControllerStatus) MarshalBinary() (data []byte, err error)
func (*ControllerStatus) UnmarshalBinary ¶
func (c *ControllerStatus) UnmarshalBinary(data []byte) (err error)
type ControllerStatusHeader ¶
type ControllerStatusHeader struct { common.Header Status ControllerStatus }
ofp_controller_status_header
func NewControllerStatusHeader ¶
func NewControllerStatusHeader() *ControllerStatusHeader
func (*ControllerStatusHeader) Len ¶
func (c *ControllerStatusHeader) Len() uint16
func (*ControllerStatusHeader) MarshalBinary ¶
func (c *ControllerStatusHeader) MarshalBinary() (data []byte, err error)
func (*ControllerStatusHeader) UnmarshalBinary ¶
func (c *ControllerStatusHeader) UnmarshalBinary(data []byte) (err error)
type ControllerStatusPropUri ¶
type ControllerStatusPropUri struct { Header PropHeader Uri []byte Pad []byte // to make multiple of 8 }
ofp_controller_status_prop_uri
func NewControllerStatusPropUri ¶
func NewControllerStatusPropUri() *ControllerStatusPropUri
func (*ControllerStatusPropUri) Len ¶
func (p *ControllerStatusPropUri) Len() (n uint16)
func (*ControllerStatusPropUri) MarshalBinary ¶
func (p *ControllerStatusPropUri) MarshalBinary() (data []byte, err error)
func (*ControllerStatusPropUri) UnmarshalBinary ¶
func (p *ControllerStatusPropUri) UnmarshalBinary(data []byte) (err error)
type DescStats ¶
type DescStats struct { MfrDesc []byte // Size DESC_STR_LEN HWDesc []byte // Size DESC_STR_LEN SWDesc []byte // Size DESC_STR_LEN SerialNum []byte // Size SERIAL_NUM_LEN DPDesc []byte // Size DESC_STR_LEN }
ofp_desc_stats 1.5
func NewDescStats ¶
func NewDescStats() *DescStats
func (*DescStats) MarshalBinary ¶
func (*DescStats) UnmarshalBinary ¶
type DurationStatField ¶
type DurationStatField = TimeStatField
func NewDurationStatField ¶
func NewDurationStatField() *DurationStatField
type ErrorMsg ¶
func NewErrorMsg ¶
func NewErrorMsg() *ErrorMsg
func (*ErrorMsg) MarshalBinary ¶
func (*ErrorMsg) UnmarshalBinary ¶
type EthDstField ¶
type EthDstField struct {
EthDst net.HardwareAddr
}
ETH_DST field
func (*EthDstField) Len ¶
func (m *EthDstField) Len() uint16
func (*EthDstField) MarshalBinary ¶
func (m *EthDstField) MarshalBinary() (data []byte, err error)
func (*EthDstField) UnmarshalBinary ¶
func (m *EthDstField) UnmarshalBinary(data []byte) error
type EthSrcField ¶
type EthSrcField struct {
EthSrc net.HardwareAddr
}
ETH_SRC field
func (*EthSrcField) Len ¶
func (m *EthSrcField) Len() uint16
func (*EthSrcField) MarshalBinary ¶
func (m *EthSrcField) MarshalBinary() (data []byte, err error)
func (*EthSrcField) UnmarshalBinary ¶
func (m *EthSrcField) UnmarshalBinary(data []byte) error
type EthTypeField ¶
type EthTypeField struct {
EthType uint16
}
ETH_TYPE field
func (*EthTypeField) Len ¶
func (m *EthTypeField) Len() uint16
func (*EthTypeField) MarshalBinary ¶
func (m *EthTypeField) MarshalBinary() (data []byte, err error)
func (*EthTypeField) UnmarshalBinary ¶
func (m *EthTypeField) UnmarshalBinary(data []byte) error
type FlowCountStatField ¶
type FlowCountStatField struct { Header OXSStatHeader Count uint32 }
type XST_OFB_FLOW_COUNT
func NewFlowCountStatField ¶
func NewFlowCountStatField() *FlowCountStatField
func (*FlowCountStatField) Len ¶
func (f *FlowCountStatField) Len() (n uint16)
func (*FlowCountStatField) MarshalBinary ¶
func (f *FlowCountStatField) MarshalBinary() (data []byte, err error)
func (*FlowCountStatField) UnmarshalBinary ¶
func (f *FlowCountStatField) UnmarshalBinary(data []byte) (err error)
type FlowDesc ¶
type FlowDesc struct { Length uint16 Pad2 uint16 TableId uint8 Pad uint8 Priority uint16 IdleTimeout uint16 HardTimeout uint16 Flags uint16 Importance uint16 Cookie uint64 Match Stats Instructions []Instruction }
ofp_flow_desc
func NewFlowDesc ¶
func NewFlowDesc() *FlowDesc
func (*FlowDesc) AddInstruction ¶
func (f *FlowDesc) AddInstruction(i Instruction)
func (*FlowDesc) MarshalBinary ¶
func (*FlowDesc) UnmarshalBinary ¶
type FlowMod ¶
type FlowMod struct { common.Header Cookie uint64 CookieMask uint64 TableId uint8 /* ID of the table to put the flow in */ Command uint8 /* flowmod command */ IdleTimeout uint16 /* Idle time before discarding (seconds). */ HardTimeout uint16 /* Max time before discarding (seconds). */ Priority uint16 /* Priority level of flow entry. */ BufferId uint32 /* Buffered packet to apply to */ OutPort uint32 OutGroup uint32 Flags uint16 Importance uint16 Match Match // Fields to match Instructions []Instruction // Instruction set - 0 or more. }
ofp_flow_mod
func NewFlowMod ¶
func NewFlowMod() *FlowMod
func (*FlowMod) AddInstruction ¶
func (f *FlowMod) AddInstruction(i Instruction)
func (*FlowMod) MarshalBinary ¶
func (*FlowMod) UnmarshalBinary ¶
type FlowMonitorRequest ¶
type FlowMonitorRequest struct { MonitorId uint32 OutPort uint32 OutGroup uint32 Flags uint16 TableId uint8 Command uint8 Match }
ofp_flow_monitor_request
func NewFlowMonitorRequest ¶
func NewFlowMonitorRequest(id uint32) *FlowMonitorRequest
func (*FlowMonitorRequest) Len ¶
func (mon *FlowMonitorRequest) Len() uint16
func (*FlowMonitorRequest) MarshalBinary ¶
func (mon *FlowMonitorRequest) MarshalBinary() (data []byte, err error)
func (*FlowMonitorRequest) UnmarshalBinary ¶
func (mon *FlowMonitorRequest) UnmarshalBinary(data []byte) (err error)
type FlowRemoved ¶
type FlowRemoved struct { common.Header TableId uint8 Reason uint8 Priority uint16 IdleTimeout uint16 HardTimeout uint16 Cookie uint64 Match Match Stats }
ofp_flow_removed
func NewFlowRemoved ¶
func NewFlowRemoved() *FlowRemoved
func (*FlowRemoved) Len ¶
func (f *FlowRemoved) Len() (n uint16)
func (*FlowRemoved) MarshalBinary ¶
func (f *FlowRemoved) MarshalBinary() (data []byte, err error)
func (*FlowRemoved) UnmarshalBinary ¶
func (f *FlowRemoved) UnmarshalBinary(data []byte) error
type FlowStats ¶
type FlowStats struct { Length uint16 Pad2 []byte // 2 bytes TableId uint8 Reason uint8 Priority uint16 Match Stats []Stats }
ofp_flow_stats
func NewFlowStats ¶
func NewFlowStats() *FlowStats
func (*FlowStats) MarshalBinary ¶
func (*FlowStats) UnmarshalBinary ¶
type FlowStatsRequest ¶
type FlowStatsRequest struct { TableId uint8 OutPort uint32 OutGroup uint32 Cookie uint64 CookieMask uint64 Match Match // contains filtered or unexported fields }
ofp_flow_stats_request
func NewFlowStatsRequest ¶
func NewFlowStatsRequest() *FlowStatsRequest
func (*FlowStatsRequest) Len ¶
func (s *FlowStatsRequest) Len() (n uint16)
func (*FlowStatsRequest) MarshalBinary ¶
func (s *FlowStatsRequest) MarshalBinary() (data []byte, err error)
func (*FlowStatsRequest) UnmarshalBinary ¶
func (s *FlowStatsRequest) UnmarshalBinary(data []byte) error
type FlowUpdateAbbrev ¶
type FlowUpdateAbbrev struct { FlowUpdateHeader Xid uint32 }
ofp_flow_update_abbrev
func NewFlowUpdateAbbrev ¶
func NewFlowUpdateAbbrev() *FlowUpdateAbbrev
func (*FlowUpdateAbbrev) Len ¶
func (abbr *FlowUpdateAbbrev) Len() uint16
func (*FlowUpdateAbbrev) MarshalBinary ¶
func (abbr *FlowUpdateAbbrev) MarshalBinary() (data []byte, err error)
func (*FlowUpdateAbbrev) UnmarshalBinary ¶
func (abbr *FlowUpdateAbbrev) UnmarshalBinary(data []byte) (err error)
type FlowUpdateFull ¶
type FlowUpdateFull struct { FlowUpdateHeader TableId uint8 Reason uint8 IdleTimeout uint16 HardTimeout uint16 Priority uint16 Zeros []byte // 4 bytes Cookie uint64 Match Instructions []Instruction }
ofp_flow_update_full
func NewFlowUpdateFull ¶
func NewFlowUpdateFull(event uint16) *FlowUpdateFull
FME_INITIAL or FME_ADDED or FME_REMOVED or FME_MODIFIED
func (*FlowUpdateFull) AddInstruction ¶
func (full *FlowUpdateFull) AddInstruction(i Instruction)
func (*FlowUpdateFull) Len ¶
func (full *FlowUpdateFull) Len() uint16
func (*FlowUpdateFull) MarshalBinary ¶
func (full *FlowUpdateFull) MarshalBinary() (data []byte, err error)
func (*FlowUpdateFull) UnmarshalBinary ¶
func (full *FlowUpdateFull) UnmarshalBinary(data []byte) (err error)
type FlowUpdateHeader ¶
ofp_flow_update_header
func NewFlowUpdateHeader ¶
func NewFlowUpdateHeader(event uint16) *FlowUpdateHeader
func (*FlowUpdateHeader) Len ¶
func (f *FlowUpdateHeader) Len() uint16
func (*FlowUpdateHeader) MarshalBinary ¶
func (f *FlowUpdateHeader) MarshalBinary() (data []byte, err error)
func (*FlowUpdateHeader) UnmarshalBinary ¶
func (f *FlowUpdateHeader) UnmarshalBinary(data []byte) (err error)
type FlowUpdatePaused ¶
type FlowUpdatePaused struct { FlowUpdateHeader Zeros uint32 }
ofp_flow_update_paused
func NewFlowUpdatePaused ¶
func NewFlowUpdatePaused(event uint16) *FlowUpdatePaused
FME_PAUSED or FME_RESUMED
func (*FlowUpdatePaused) Len ¶
func (pause *FlowUpdatePaused) Len() uint16
func (*FlowUpdatePaused) MarshalBinary ¶
func (pause *FlowUpdatePaused) MarshalBinary() (data []byte, err error)
func (*FlowUpdatePaused) UnmarshalBinary ¶
func (pause *FlowUpdatePaused) UnmarshalBinary(data []byte) (err error)
type GetAsyncReply ¶
type GetAsyncReply = Async_Config
func NewGetAsyncReply ¶
func NewGetAsyncReply() *GetAsyncReply
type GroupBucketPropWatch ¶
type GroupBucketPropWatch struct { Header PropHeader Watch uint32 }
ofp_group_bucket_prop_watch
func (*GroupBucketPropWatch) Len ¶
func (prop *GroupBucketPropWatch) Len() uint16
func (*GroupBucketPropWatch) MarshalBinary ¶
func (prop *GroupBucketPropWatch) MarshalBinary() (data []byte, err error)
func (*GroupBucketPropWatch) UnmarshalBinary ¶
func (prop *GroupBucketPropWatch) UnmarshalBinary(data []byte) (err error)
type GroupBucketPropWatchGroup ¶
type GroupBucketPropWatchGroup = GroupBucketPropWatch //nolint
func NewGroupBucketPropWatchGroup ¶
func NewGroupBucketPropWatchGroup(watch uint32) *GroupBucketPropWatchGroup
type GroupBucketPropWatchPort ¶
type GroupBucketPropWatchPort = GroupBucketPropWatch //nolint
func NewGroupBucketPropWatchPort ¶
func NewGroupBucketPropWatchPort(watch uint32) *GroupBucketPropWatchPort
type GroupBucketPropWeight ¶
type GroupBucketPropWeight struct { Header PropHeader Weight uint16 Pad uint16 }
ofp_group_bucket_prop_weight
func NewGroupBucketPropWeight ¶
func NewGroupBucketPropWeight(weight uint16) *GroupBucketPropWeight
func (*GroupBucketPropWeight) Len ¶
func (prop *GroupBucketPropWeight) Len() uint16
func (*GroupBucketPropWeight) MarshalBinary ¶
func (prop *GroupBucketPropWeight) MarshalBinary() (data []byte, err error)
func (*GroupBucketPropWeight) UnmarshalBinary ¶
func (prop *GroupBucketPropWeight) UnmarshalBinary(data []byte) (err error)
type GroupDesc ¶
type GroupDesc struct { Length uint16 Type uint8 Pad uint8 GroupId uint32 BucketArrayLen uint16 Pad2 []byte // 6 bytes Buckets []Bucket Properties []util.Message }
ofp_group_desc
func NewGroupDesc ¶
func NewGroupDesc() *GroupDesc
func (*GroupDesc) MarshalBinary ¶
func (*GroupDesc) UnmarshalBinary ¶
type GroupFeatures ¶
type GroupFeatures struct { Types uint32 Capabilities uint32 MaxGroups []uint32 // size 4 Actions []uint32 // size 4 }
ofp_group_features
func NewGroupFeatures ¶
func NewGroupFeatures() *GroupFeatures
func (*GroupFeatures) Len ¶
func (g *GroupFeatures) Len() uint16
func (*GroupFeatures) MarshalBinary ¶
func (g *GroupFeatures) MarshalBinary() (data []byte, err error)
func (*GroupFeatures) UnmarshalBinary ¶
func (g *GroupFeatures) UnmarshalBinary(data []byte) (err error)
type GroupMod ¶
type GroupMod struct { common.Header Command uint16 /* One of OFPGC_*. */ Type uint8 /* One of OFPGT_*. */ GroupId uint32 /* Group identifier. */ BucketArrayLen uint16 /* Length of action buckets data. */ Pad uint16 CommandBucketId uint32 /* Bucket Id used as part of OFPGC_INSERT_BUCKET and OFPGC_REMOVE_BUCKET commands execution.*/ Buckets []Bucket /* List of buckets */ Properties []util.Message // contains filtered or unexported fields }
GroupMod message
func (*GroupMod) MarshalBinary ¶
func (*GroupMod) UnmarshalBinary ¶
type GroupMultipartRequest ¶
ofp_group_multipart_request
func NewGroupMultipartRequest ¶
func NewGroupMultipartRequest(id uint32) *GroupMultipartRequest
func (*GroupMultipartRequest) Len ¶
func (s *GroupMultipartRequest) Len() (n uint16)
func (*GroupMultipartRequest) MarshalBinary ¶
func (s *GroupMultipartRequest) MarshalBinary() (data []byte, err error)
func (*GroupMultipartRequest) UnmarshalBinary ¶
func (s *GroupMultipartRequest) UnmarshalBinary(data []byte) (err error)
type GroupStats ¶
type GroupStats struct { Length uint16 Pad []byte // 2 bytes GroupId uint32 RefCount uint32 Pad2 []byte // 4 bytes PacketCount uint64 ByteCount uint64 DurationSec uint32 DurationNSec uint32 Stats []BucketCounter }
ofp_group_stats
func NewGroupStats ¶
func NewGroupStats() *GroupStats
func (*GroupStats) Len ¶
func (g *GroupStats) Len() (n uint16)
func (*GroupStats) MarshalBinary ¶
func (g *GroupStats) MarshalBinary() (data []byte, err error)
func (*GroupStats) UnmarshalBinary ¶
func (g *GroupStats) UnmarshalBinary(data []byte) (err error)
type IcmpCodeField ¶
type IcmpCodeField struct {
Code uint8
}
func (*IcmpCodeField) Len ¶
func (f *IcmpCodeField) Len() uint16
func (*IcmpCodeField) MarshalBinary ¶
func (f *IcmpCodeField) MarshalBinary() (data []byte, err error)
func (*IcmpCodeField) UnmarshalBinary ¶
func (f *IcmpCodeField) UnmarshalBinary(data []byte) error
type IcmpTypeField ¶
type IcmpTypeField struct {
Type uint8
}
func (*IcmpTypeField) Len ¶
func (f *IcmpTypeField) Len() uint16
func (*IcmpTypeField) MarshalBinary ¶
func (f *IcmpTypeField) MarshalBinary() (data []byte, err error)
func (*IcmpTypeField) UnmarshalBinary ¶
func (f *IcmpTypeField) UnmarshalBinary(data []byte) error
type IdleTimeStatField ¶
type IdleTimeStatField = TimeStatField
func NewIdleTimeStatField ¶
func NewIdleTimeStatField() *IdleTimeStatField
type InPhyPortField ¶
type InPhyPortField struct {
InPhyPort uint32
}
IN_PHY_PORT field
func (*InPhyPortField) Len ¶
func (m *InPhyPortField) Len() uint16
func (*InPhyPortField) MarshalBinary ¶
func (m *InPhyPortField) MarshalBinary() (data []byte, err error)
func (*InPhyPortField) UnmarshalBinary ¶
func (m *InPhyPortField) UnmarshalBinary(data []byte) error
type InPortField ¶
type InPortField struct {
InPort uint32
}
IN_PORT field
func (*InPortField) Len ¶
func (m *InPortField) Len() uint16
func (*InPortField) MarshalBinary ¶
func (m *InPortField) MarshalBinary() (data []byte, err error)
func (*InPortField) UnmarshalBinary ¶
func (m *InPortField) UnmarshalBinary(data []byte) error
type InstrActions ¶
type InstrActions struct { InstrHeader Actions []Action /* 0 or more actions associated with OFPIT_WRITE_ACTIONS and OFPIT_APPLY_ACTIONS */ // contains filtered or unexported fields }
*_ACTION instructions
func NewInstrApplyActions ¶
func NewInstrApplyActions() *InstrActions
func NewInstrWriteActions ¶
func NewInstrWriteActions() *InstrActions
func (*InstrActions) AddAction ¶
func (instr *InstrActions) AddAction(act Action, prepend bool) error
func (*InstrActions) Len ¶
func (instr *InstrActions) Len() (n uint16)
func (*InstrActions) MarshalBinary ¶
func (instr *InstrActions) MarshalBinary() (data []byte, err error)
func (*InstrActions) UnmarshalBinary ¶
func (instr *InstrActions) UnmarshalBinary(data []byte) error
type InstrGotoTable ¶
type InstrGotoTable struct { InstrHeader TableId uint8 // contains filtered or unexported fields }
func NewInstrGotoTable ¶
func NewInstrGotoTable(tableId uint8) *InstrGotoTable
func (*InstrGotoTable) AddAction ¶
func (instr *InstrGotoTable) AddAction(act Action, prepend bool) error
func (*InstrGotoTable) Len ¶
func (instr *InstrGotoTable) Len() (n uint16)
func (*InstrGotoTable) MarshalBinary ¶
func (instr *InstrGotoTable) MarshalBinary() (data []byte, err error)
func (*InstrGotoTable) UnmarshalBinary ¶
func (instr *InstrGotoTable) UnmarshalBinary(data []byte) error
type InstrHeader ¶
Generic instruction header ofp_instruction_header
func (*InstrHeader) Len ¶
func (a *InstrHeader) Len() (n uint16)
func (*InstrHeader) MarshalBinary ¶
func (a *InstrHeader) MarshalBinary() (data []byte, err error)
func (*InstrHeader) UnmarshalBinary ¶
func (a *InstrHeader) UnmarshalBinary(data []byte) error
type InstrStatTrigger ¶
type InstrStatTrigger struct { InstrHeader Flags uint32 Thresholds Stats }
ofp_instruction_stat_trigger
func NewInstrStatTrigger ¶
func NewInstrStatTrigger(flags uint32) *InstrStatTrigger
func (*InstrStatTrigger) AddAction ¶
func (instr *InstrStatTrigger) AddAction(act Action, prepend bool) error
func (*InstrStatTrigger) Len ¶
func (instr *InstrStatTrigger) Len() (n uint16)
func (*InstrStatTrigger) MarshalBinary ¶
func (instr *InstrStatTrigger) MarshalBinary() (data []byte, err error)
func (*InstrStatTrigger) UnmarshalBinary ¶
func (instr *InstrStatTrigger) UnmarshalBinary(data []byte) error
type InstrWriteMetadata ¶
type InstrWriteMetadata struct { InstrHeader Metadata uint64 /* Metadata value to write */ MetadataMask uint64 /* Metadata write bitmask */ // contains filtered or unexported fields }
func NewInstrWriteMetadata ¶
func NewInstrWriteMetadata(metadata, metadataMask uint64) *InstrWriteMetadata
func (*InstrWriteMetadata) AddAction ¶
func (instr *InstrWriteMetadata) AddAction(act Action, prepend bool) error
func (*InstrWriteMetadata) Len ¶
func (instr *InstrWriteMetadata) Len() (n uint16)
FIXME: we need marshall/unmarshall/len/new functions for write metadata instr
func (*InstrWriteMetadata) MarshalBinary ¶
func (instr *InstrWriteMetadata) MarshalBinary() (data []byte, err error)
func (*InstrWriteMetadata) UnmarshalBinary ¶
func (instr *InstrWriteMetadata) UnmarshalBinary(data []byte) error
type Instruction ¶
func DecodeInstr ¶
func DecodeInstr(data []byte) Instruction
type InstructionId ¶
ofp_instruction_id
func NewInstructionId ¶
func NewInstructionId(t uint16) *InstructionId
func (*InstructionId) Len ¶
func (i *InstructionId) Len() (n uint16)
func (*InstructionId) MarshalBinary ¶
func (i *InstructionId) MarshalBinary() (data []byte, err error)
func (*InstructionId) UnmarshalBinary ¶
func (i *InstructionId) UnmarshalBinary(data []byte) (err error)
type InstructionProperty ¶
type InstructionProperty struct { OFTablePropertyHeader Instructions []InstructionId }
ofp_table_feature_prop_instructions
func NewInstructionProperty ¶
func NewInstructionProperty(Type uint16) *InstructionProperty
Type could be: * TFPT_INSTRUCTIONS * TFPT_INSTRUCTIONS_MISS
func (*InstructionProperty) AddInstructionId ¶
func (p *InstructionProperty) AddInstructionId(i InstructionId)
func (*InstructionProperty) Len ¶
func (p *InstructionProperty) Len() uint16
func (*InstructionProperty) MarshalBinary ¶
func (p *InstructionProperty) MarshalBinary() (data []byte, err error)
func (*InstructionProperty) UnmarshalBinary ¶
func (p *InstructionProperty) UnmarshalBinary(data []byte) error
type IpDscpField ¶
type IpDscpField struct {
Dscp uint8
}
IP_DSCP field
func (*IpDscpField) Len ¶
func (m *IpDscpField) Len() uint16
func (*IpDscpField) MarshalBinary ¶
func (m *IpDscpField) MarshalBinary() (data []byte, err error)
func (*IpDscpField) UnmarshalBinary ¶
func (m *IpDscpField) UnmarshalBinary(data []byte) error
type IpEcnField ¶
type IpEcnField struct {
IpEcn uint8
}
IP_ECN field
func (*IpEcnField) Len ¶
func (m *IpEcnField) Len() uint16
func (*IpEcnField) MarshalBinary ¶
func (m *IpEcnField) MarshalBinary() (data []byte, err error)
func (*IpEcnField) UnmarshalBinary ¶
func (m *IpEcnField) UnmarshalBinary(data []byte) (err error)
type IpProtoField ¶
type IpProtoField struct {
Protocol uint8
}
IP_PROTO field
func (*IpProtoField) Len ¶
func (m *IpProtoField) Len() uint16
func (*IpProtoField) MarshalBinary ¶
func (m *IpProtoField) MarshalBinary() (data []byte, err error)
func (*IpProtoField) UnmarshalBinary ¶
func (m *IpProtoField) UnmarshalBinary(data []byte) error
type Ipv4DstField ¶
IPV4_DST field
func (*Ipv4DstField) Len ¶
func (m *Ipv4DstField) Len() uint16
func (*Ipv4DstField) MarshalBinary ¶
func (m *Ipv4DstField) MarshalBinary() (data []byte, err error)
func (*Ipv4DstField) UnmarshalBinary ¶
func (m *Ipv4DstField) UnmarshalBinary(data []byte) error
type Ipv4SrcField ¶
IPV4_SRC field
func (*Ipv4SrcField) Len ¶
func (m *Ipv4SrcField) Len() uint16
func (*Ipv4SrcField) MarshalBinary ¶
func (m *Ipv4SrcField) MarshalBinary() (data []byte, err error)
func (*Ipv4SrcField) UnmarshalBinary ¶
func (m *Ipv4SrcField) UnmarshalBinary(data []byte) error
type Ipv6DstField ¶
IPV6_DST field
func (*Ipv6DstField) Len ¶
func (m *Ipv6DstField) Len() uint16
func (*Ipv6DstField) MarshalBinary ¶
func (m *Ipv6DstField) MarshalBinary() (data []byte, err error)
func (*Ipv6DstField) UnmarshalBinary ¶
func (m *Ipv6DstField) UnmarshalBinary(data []byte) error
type Ipv6ExtHdrField ¶
type Ipv6ExtHdrField struct {
Ipv6ExtHdr uint16
}
IPV6_EXT_HEADER FIELD
func (*Ipv6ExtHdrField) Len ¶
func (m *Ipv6ExtHdrField) Len() uint16
func (*Ipv6ExtHdrField) MarshalBinary ¶
func (m *Ipv6ExtHdrField) MarshalBinary() (data []byte, err error)
func (*Ipv6ExtHdrField) UnmarshalBinary ¶
func (m *Ipv6ExtHdrField) UnmarshalBinary(data []byte) error
type Ipv6FLabelField ¶
type Ipv6FLabelField struct {
FLabel uint32
}
IPV6_FLABEL
func (*Ipv6FLabelField) Len ¶
func (m *Ipv6FLabelField) Len() uint16
func (*Ipv6FLabelField) MarshalBinary ¶
func (m *Ipv6FLabelField) MarshalBinary() (data []byte, err error)
func (*Ipv6FLabelField) UnmarshalBinary ¶
func (m *Ipv6FLabelField) UnmarshalBinary(data []byte) error
type Ipv6SrcField ¶
IPV6_SRC field
func (*Ipv6SrcField) Len ¶
func (m *Ipv6SrcField) Len() uint16
func (*Ipv6SrcField) MarshalBinary ¶
func (m *Ipv6SrcField) MarshalBinary() (data []byte, err error)
func (*Ipv6SrcField) UnmarshalBinary ¶
func (m *Ipv6SrcField) UnmarshalBinary(data []byte) error
type Match ¶
type Match struct { Type uint16 Length uint16 Fields []MatchField }
ofp_match 1.5
func (*Match) AddField ¶
func (m *Match) AddField(f MatchField)
func (*Match) MarshalBinary ¶
func (*Match) UnmarshalBinary ¶
type MatchField ¶
type MatchField struct { Class uint16 Field uint8 HasMask bool Length uint8 ExperimenterID uint32 Value util.Message Mask util.Message }
One match field TLV
func FindFieldHeaderByName ¶
func FindFieldHeaderByName(fieldName string, hasMask bool) (*MatchField, error)
FindFieldHeaderByName finds OXM/NXM field by name and mask.
func NewActsetOutputField ¶
func NewActsetOutputField(actsetOutputPort uint32) *MatchField
Return a MatchField for actset_output port matching
func NewArpOperField ¶
func NewArpOperField(arpOper uint16) *MatchField
Return a MatchField for arp operation type matching
func NewArpShaField ¶
func NewArpShaField(arpSha net.HardwareAddr) *MatchField
func NewArpSpaField ¶
func NewArpSpaField(arpSpa net.IP) *MatchField
func NewArpThaField ¶
func NewArpThaField(arpTha net.HardwareAddr) *MatchField
func NewArpTpaField ¶
func NewArpTpaField(arpTpa net.IP) *MatchField
func NewCTLabelMatchField ¶
func NewCTLabelMatchField(label [16]byte, mask *[16]byte) *MatchField
func NewCTMarkMatchField ¶
func NewCTMarkMatchField(mark uint32, mask *uint32) *MatchField
func NewCTStateMatchField ¶
func NewCTStateMatchField(states *CTStates) *MatchField
func NewCTZoneMatchField ¶
func NewCTZoneMatchField(zone uint16) *MatchField
func NewConjIDMatchField ¶
func NewConjIDMatchField(conjID uint32) *MatchField
func NewEthDstField ¶
func NewEthDstField(ethDst net.HardwareAddr, ethDstMask *net.HardwareAddr) *MatchField
Return a MatchField for ethernet dest addr
func NewEthSrcField ¶
func NewEthSrcField(ethSrc net.HardwareAddr, ethSrcMask *net.HardwareAddr) *MatchField
Return a MatchField for ethernet src addr
func NewEthTypeField ¶
func NewEthTypeField(ethType uint16) *MatchField
Return a MatchField for ethertype matching
func NewIPTtlField ¶
func NewIPTtlField(ttl uint8) *MatchField
NewIPTtlField will return a MatchField for ipv4 ttl
func NewInPhyPortField ¶
func NewInPhyPortField(inPhyPort uint32) *MatchField
Return a MatchField for Input port matching
func NewInPortField ¶
func NewInPortField(inPort uint32) *MatchField
Return a MatchField for Input port matching
func NewIpDscpField ¶
func NewIpDscpField(dscp uint8, ipDscpMask *uint8) *MatchField
Return a MatchField for ipv4/ipv6 dscp
func NewIpEcnField ¶
func NewIpEcnField(vlanPcp uint8) *MatchField
Return a MatchField for vlan id matching
func NewIpProtoField ¶
func NewIpProtoField(protocol uint8) *MatchField
Return a MatchField for ipv4 protocol
func NewIpv4DstField ¶
func NewIpv4DstField(ipDst net.IP, ipDstMask *net.IP) *MatchField
Return a MatchField for ipv4 dest addr
func NewIpv4SrcField ¶
func NewIpv4SrcField(ipSrc net.IP, ipSrcMask *net.IP) *MatchField
Return a MatchField for ipv4 src addr
func NewIpv6DstField ¶
func NewIpv6DstField(ipDst net.IP, ipDstMask *net.IP) *MatchField
Return a MatchField for ipv6 dest addr
func NewIpv6ExtHdrField ¶
func NewIpv6ExtHdrField(ipv6ExtHeader uint16, ipv6ExtHeaderMask *uint16) *MatchField
func NewIpv6FLabelField ¶
func NewIpv6FLabelField(flabel uint32, flabelMask *uint32) *MatchField
func NewIpv6SrcField ¶
func NewIpv6SrcField(ipSrc net.IP, ipSrcMask *net.IP) *MatchField
Return a MatchField for ipv6 src addr
func NewMetadataField ¶
func NewMetadataField(metadata uint64, metadataMask *uint64) *MatchField
Return a MatchField for tunnel id matching
func NewMplsBosField ¶
func NewMplsBosField(mplsBos uint8) *MatchField
Return a MatchField for mpls Bos matching
func NewMplsLabelField ¶
func NewMplsLabelField(mplsLabel uint32) *MatchField
Return a MatchField for mpls Label matching
func NewMplsTcField ¶
func NewMplsTcField(mplsTc uint8) *MatchField
Return a MatchField for vlan id matching
func NewNxARPShaMatchField ¶
func NewNxARPShaMatchField(addr net.HardwareAddr, mask net.HardwareAddr) *MatchField
func NewNxARPSpaMatchField ¶
func NewNxARPSpaMatchField(addr net.IP, mask net.IP) *MatchField
func NewNxARPThaMatchField ¶
func NewNxARPThaMatchField(addr net.HardwareAddr, mask net.HardwareAddr) *MatchField
func NewNxARPTpaMatchField ¶
func NewNxARPTpaMatchField(addr net.IP, mask net.IP) *MatchField
func NewPacketTypeField ¶
func NewPacketTypeField(namespace uint16, nsType uint16) *MatchField
func NewPbbIsidField ¶
func NewPbbIsidField(pbbIsid uint32, pbbIsidMask *uint32) *MatchField
func NewRegMatchField ¶
func NewRegMatchField(idx int, data uint32, dataRng *NXRange) *MatchField
This function will generate a MatchField with continuous reg mask according to dataRng. We may need to use NewRegMatchFieldWithMask if we want a discontinuous reg mask, such as, 0x5.
func NewRegMatchFieldWithMask ¶
func NewRegMatchFieldWithMask(idx int, data uint32, mask uint32) *MatchField
This function will generate a MatchField with data/mask for Reg[idx]. The mask can be arbitrary bitwise, including continuous mask, such as, 0x7 and discontinous mask, such as, 0x5.