openflow15

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 11 Imported by: 8

Documentation

Index

Constants

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

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

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

View Source
const (
	Type_BundleCtrl uint32 = 2300
	Type_BundleAdd  uint32 = 2301
)

Bundle message types

View Source
const (
	OFPBCT_ATOMIC  = uint16(1 << 0)
	OFPBCT_ORDERED = uint16(1 << 1)
)

Bundle control flags

View Source
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.

View Source
const (
	FC_ADD = iota // OFPFC_ADD = 0
	FC_MODIFY
	FC_MODIFY_STRICT
	FC_DELETE
	FC_DELETE_STRICT
)

ofp_flow_mod_command 1.5

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

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

View Source
const (
	XSC_OPENFLOW_BASIC = 0x8002
	XSC_EXPERIMENTER   = 0xFFFF
)

ofp_oxs_class

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

View Source
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).
	 */
)
View Source
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 */
)
View Source
const (
	GT_ALL      = 0 /* All (multicast/broadcast) group. */
	GT_SELECT   = 1 /* Select group. */
	GT_INDIRECT = 2 /* Indirect group. */
	GT_FF       = 3 /* Fast failover group. */
)
View Source
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

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

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

View Source
const (
	MatchType_Standard = iota /* Deprecated. */
	MatchType_OXM
)

ofp_match_type 1.5

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

View Source
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) */
)
View Source
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 */
)
View Source
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 */
)
View Source
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

View Source
const (
	MC_ADD    = 0 /* New meter. */
	MC_MODIFY = 1 /* Modify specified meter. */
	MC_DELETE = 2 /* Delete specified meter. */
)

ofp_meter_mod_command

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

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

View Source
const (
	METER_BAND_HEADER_LEN = 12
	METER_BAND_LEN        = 16
)
View Source
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

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

View Source
const (
	DESC_STR_LEN   = 256
	SERIAL_NUM_LEN = 32
)
View Source
const (
	OFPTT_MAX = 0xfe
	/* Fake tables. */
	OFPTT_ALL = 0xff /* Wildcard table used for table config, flow stats and flow deletes. */
)
View Source
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

View Source
const (
	PSPT_ETHERNET     = 0      /* Ethernet property. */
	PSPT_OPTICAL      = 1      /* Optical property. */
	PSPT_EXPERIMENTER = 0xFFFF /* Experimenter property. */
)

ofp_port_stats_prop_type

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

View Source
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.
)
View Source
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

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

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

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

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

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

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

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

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

View Source
const (
	TMPBF_TIME_CAPABILITY = 0x1    /* Time feature property. */
	TMPBF_EXPERIMENTER    = 0xFFFF /* Experimenter property. */
)

ofp_bundle_features_prop_type

View Source
const (
	NxExperimenterID     = 0x00002320 // Vendor ID for Nicira extension messages
	NxActionHeaderLength = 10         // Length of Nicira extension message header
)

NX Action constants

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

View Source
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
)
View Source
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

View Source
const (
	NX_CT_F_COMMIT    = 1 << 0
	NX_CT_F_FORCE     = 1 << 1
	NX_CT_RECIRC_NONE = 0xff
)

NX_CT Flags

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

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

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

View Source
const (
	LEARN_SPEC_HEADER_LOAD  = 11
	LEARN_SPEC_HEADER_MATCH = 13
)

NX_LEARN field offset

View Source
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.

View Source
const (
	NXTTMC_ADD = iota
	NXTTMC_DELETE
	NXTTMC_CLEAR
)

TLV_Table_Mod commands.

View Source
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.

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

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

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

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

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

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

View Source
const (
	C_FRAG_NORMAL = 0
	C_FRAG_DROP   = 1
	C_FRAG_REASM  = 2
	C_FRAG_MASK   = 3
)

ofp_config_flags 1.5

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

View Source
const (
	HFC_INCOMPATIBLE = iota
	HFC_EPERM
)

ofp_hello_failed_code 1.5

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

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

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

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

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

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

View Source
const (
	PMFC_BAD_PORT = iota
	PMFC_BAD_HW_ADDR
	PMFC_BAD_CONFIG
	PMFC_BAD_ADVERTISE
	PMFC_EPERM
)

ofp_port_mod_failed_code 1.5

View Source
const (
	TMFC_BAD_TABLE = iota
	TMFC_BAD_CONFIG
	TMFC_EPERM
)

ofp_table_mod_failed_code 1.5

View Source
const (
	QOFC_BAD_PORT = iota
	QOFC_BAD_QUEUE
	QOFC_EPERM
)

ofp_queue_op_failed_code 1.0

View Source
const (
	SCFC_BAD_FLAGS = iota
	SCFC_BAD_LEN
	SCFC_EPERM
)

ofp_switch_config_failed_code 1.5

View Source
const (
	RRFC_STALE = iota
	RRFC_UNSUP
	RRFC_BAD_ROLE
	RRFC_ID_UNSUP
	RRFC_ID_IN_USE
)

ofp_role_request_failed_code

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

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

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

View Source
const (
	ACFC_INVALID = iota
	ACFC_UNSUPPORTED
	ACFC_EPERM
)

ofp_async_config_failed_cod

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

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

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

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

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

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

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

View Source
const (
	OFPTMPT_EVICTION     = 0x2    /* Eviction property. */
	OFPTMPT_VACANCY      = 0x3    /* Vacancy property. */
	OFPTMPT_EXPERIMENTER = 0xFFFF /* Experimenter property. */
)

ofp_table_mod_prop_type

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

View Source
const (
	TR_VACANCY_DOWN = 3 /* Vacancy down threshold event. */
	TR_VACANCY_UP   = 4 /* Vacancy up threshold event. */
)

ofp_table_reason

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

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

View Source
const (
	BPT_TIME         = 1      /* Time property. */
	BPT_EXPERIMENTER = 0xFFFF /* Experimenter property. */
)

ofp_bundle_prop_type

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

View Source
const (
	CT_STATUS_UP   = iota /* Control channel is operational. */
	CT_STATUS_DOWN        /* Control channel is not operational. */
)

ofp_control_channel_status

View Source
const (
	CSPT_URI          = 0      /* Connection URI property. */
	CSPT_EXPERIMENTER = 0xFFFF /* Experimenter property. */
)

ofp_controller_status_prop_type

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

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

View Source
const (
	ETH_ALEN          = 6
	MAX_PORT_NAME_LEN = 16
)
View Source
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

View Source
const (
	PS_LINK_DOWN = 1 << 0
	PS_BLOCKED   = 1 << 1
	PS_LIVE      = 1 << 2
)

ofp_port_state 1.5

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

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

View Source
const (
	PMPT_ETHERNET     = 0      /* Ethernet property. */
	PMPT_OPTICAL      = 1      /* Optical property. */
	PMPT_EXPERIMENTER = 0xFFFF /* Experimenter property. */
)

ofp_port_mod_prop_type

View Source
const (
	PR_ADD = iota
	PR_DELETE
	PR_MODIFY
)

ofp_port_reason

View Source
const (
	GPT_EXPERIMENTER = 0xFFFF /* Experimenter defined. */
)

ofp_group_prop_type

View Source
const (
	MAX_TABLE_NAME_LEN = 32
)
View Source
const (
	OFPBPT_EXPERIMENTER = 0xFFFF
)

Bundle property types

View Source
const (
	// OFPP_IN_PORT is the default number of in_port field in resubmit actions.
	OFPP_IN_PORT = 0xfff8
)
View Source
const OFPVID_NONE = 0x0000 /* No VLAN id was set. */
View Source
const OFPVID_PRESENT = 0x1000 /* Bit that indicate that a VLAN id is set */
View Source
const (
	QSPT_EXPERIMENTER = 0xffff /* Experimenter defined property. */
)

ofp_queue_stats_prop_type

View Source
const Q_MAX_RATE_UNCFG = 0xffff
View Source
const Q_MIN_RATE_UNCFG = 0xffff
View Source
const (
	RPT_EXPERIMENTER = 0xFFFF /* Experimenter property. */
)

ofp_role_prop_type

View Source
const (
	VERSION = 6
)

Variables

View Source
var NewOfp15Header func() common.Header = common.NewHeaderGenerator(VERSION)

Returns a new OpenFlow header with version field set to v1.5.

Functions

func DecodeMatchField

func DecodeMatchField(class uint16, field uint8, length uint8, hasMask bool, data []byte) (util.Message, error)

func NewBarrierReply

func NewBarrierReply() *common.Header

BarrierReply constructor

func NewBarrierRequest

func NewBarrierRequest() *common.Header

BarrierRequest constructor

func NewConfigRequest

func NewConfigRequest() *common.Header

func NewEchoReply

func NewEchoReply() *common.Header

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

func NewEchoRequest() *common.Header

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 NewFeaturesRequest

func NewFeaturesRequest() *common.Header

FeaturesRequest constructor

func NewGetAsyncRequest

func NewGetAsyncRequest() *common.Header

func Parse

func Parse(b []byte) (message util.Message, err error)

func ParseBundleError

func ParseBundleError(errCode uint16) error

ParseBundleError returns error according to bundle error code.

Types

type Action

type Action interface {
	Header() *ActionHeader
	util.Message
}

func DecodeAction

func DecodeAction(data []byte) (Action, error)

Decode Action types.

func DecodeNxAction

func DecodeNxAction(data []byte) Action

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 NewActionCopyField(nBits uint16, srcOffset uint16, dstOffset uint16,
	srcOxmId OxmId, dstOxmId OxmId) *ActionCopyField

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

type ActionHeader struct {
	Type   uint16
	Length uint16
}

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

type ActionId struct {
	Type   uint16
	Length uint16
	Data   []byte
}

ofp_action_id

func NewActionId

func NewActionId(t uint16) *ActionId

func (*ActionId) Len

func (a *ActionId) Len() (n uint16)

func (*ActionId) MarshalBinary

func (a *ActionId) MarshalBinary() (data []byte, err error)

func (*ActionId) UnmarshalBinary

func (a *ActionId) UnmarshalBinary(data []byte) (err error)

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

type ArpXPaField struct {
	ArpPa net.IP
}

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 (*AsyncConfigPropExperimenter) MarshalBinary

func (p *AsyncConfigPropExperimenter) MarshalBinary() (data []byte, err error)

func (*AsyncConfigPropExperimenter) UnmarshalBinary

func (p *AsyncConfigPropExperimenter) UnmarshalBinary(data []byte) (err error)

type AsyncConfigPropHeader

type AsyncConfigPropHeader struct {
	Type   uint16
	Length uint16
}

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

type Async_Config struct {
	common.Header
	Properties []util.Message
}

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 NewBndleAdd(id uint32, flags uint16) *BndleAdd

func (*BndleAdd) Len

func (c *BndleAdd) Len() uint16

func (*BndleAdd) MarshalBinary

func (c *BndleAdd) MarshalBinary() (data []byte, err error)

func (*BndleAdd) UnmarshalBinary

func (c *BndleAdd) UnmarshalBinary(data []byte) (err error)

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 NewBucket

func NewBucket(id uint32) *Bucket

Create a new Bucket

func (*Bucket) AddAction

func (b *Bucket) AddAction(act Action)

Add an action to the bucket

func (*Bucket) AddProperty

func (b *Bucket) AddProperty(prop util.Message)

func (*Bucket) Len

func (b *Bucket) Len() (n uint16)

func (*Bucket) MarshalBinary

func (b *Bucket) MarshalBinary() (data []byte, err error)

func (*Bucket) UnmarshalBinary

func (b *Bucket) UnmarshalBinary(data []byte) (err error)

type BucketCounter

type BucketCounter struct {
	PacketCount uint64
	ByteCount   uint64
}

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

func (b *BundleAdd) Len() (n uint16)

func (*BundleAdd) MarshalBinary

func (b *BundleAdd) MarshalBinary() (data []byte, err error)

func (*BundleAdd) UnmarshalBinary

func (b *BundleAdd) UnmarshalBinary(data []byte) error

type BundleControl

type BundleControl struct {
	BundleID uint32
	Type     uint16
	Flags    uint16
}

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

type BundleFeatures struct {
	Capabilities uint16
	Pad          []byte // 6 bytes
	Properties   []util.Message
}

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 (*BundlePropertyExperimenter) MarshalBinary

func (p *BundlePropertyExperimenter) MarshalBinary() (data []byte, err error)

func (*BundlePropertyExperimenter) UnmarshalBinary

func (p *BundlePropertyExperimenter) UnmarshalBinary(data []byte) error

type ByteArrayField

type ByteArrayField struct {
	Data   []byte
	Length uint8
}

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

func (m *CTLabel) Len() uint16

func (*CTLabel) MarshalBinary

func (m *CTLabel) MarshalBinary() (data []byte, err error)

func (*CTLabel) UnmarshalBinary

func (m *CTLabel) UnmarshalBinary(data []byte) error

type CTStates

type CTStates struct {
	// contains filtered or unexported fields
}

func NewCTStates

func NewCTStates() *CTStates

func (*CTStates) SetDNAT

func (s *CTStates) SetDNAT()

SetDNAT sets ct_state as "+dnat".

func (*CTStates) SetEst

func (s *CTStates) SetEst()

SetEst sets ct_state as "+est".

func (*CTStates) SetInv

func (s *CTStates) SetInv()

SetInv sets ct_state as "+inv".

func (*CTStates) SetNew

func (s *CTStates) SetNew()

SetNew sets ct_state as "+new".

func (*CTStates) SetRel

func (s *CTStates) SetRel()

SetRel sets ct_state as "+rel".

func (*CTStates) SetRpl

func (s *CTStates) SetRpl()

SetRpl sets ct_state as "+rpl".

func (*CTStates) SetSNAT

func (s *CTStates) SetSNAT()

SetSNAT sets ct_state as "+snat".

func (*CTStates) SetTrk

func (s *CTStates) SetTrk()

SetTrk sets ct_state as "+trk".

func (*CTStates) UnsetDNAT

func (s *CTStates) UnsetDNAT()

UnsetDNAT sets ct_state as "-dnat".

func (*CTStates) UnsetEst

func (s *CTStates) UnsetEst()

UnsetEst sets ct_state as "-est".

func (*CTStates) UnsetInv

func (s *CTStates) UnsetInv()

UnsetInv sets ct_state as "-inv".

func (*CTStates) UnsetNew

func (s *CTStates) UnsetNew()

UnsetNew sets ct_state as "-new".

func (*CTStates) UnsetRel

func (s *CTStates) UnsetRel()

UnsetRel sets ct_state as "-rel".

func (*CTStates) UnsetRpl

func (s *CTStates) UnsetRpl()

UnsetRpl sets ct_state as "-rpl".

func (*CTStates) UnsetSNAT

func (s *CTStates) UnsetSNAT()

UnsetSNAT sets ct_state as "-snat".

func (*CTStates) UnsetTrk

func (s *CTStates) UnsetTrk()

UnsetTrk sets ct_state as "-trk".

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

func (s *DescStats) Len() (n uint16)

func (*DescStats) MarshalBinary

func (s *DescStats) MarshalBinary() (data []byte, err error)

func (*DescStats) UnmarshalBinary

func (s *DescStats) UnmarshalBinary(data []byte) error

type DurationStatField

type DurationStatField = TimeStatField

func NewDurationStatField

func NewDurationStatField() *DurationStatField

type ErrorMsg

type ErrorMsg struct {
	common.Header
	Type uint16
	Code uint16
	Data util.Buffer
}

func NewErrorMsg

func NewErrorMsg() *ErrorMsg

func (*ErrorMsg) Len

func (e *ErrorMsg) Len() (n uint16)

func (*ErrorMsg) MarshalBinary

func (e *ErrorMsg) MarshalBinary() (data []byte, err error)

func (*ErrorMsg) UnmarshalBinary

func (e *ErrorMsg) UnmarshalBinary(data []byte) error

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

func (f *FlowDesc) Len() uint16

func (*FlowDesc) MarshalBinary

func (f *FlowDesc) MarshalBinary() (data []byte, err error)

func (*FlowDesc) UnmarshalBinary

func (f *FlowDesc) UnmarshalBinary(data []byte) (err error)

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

func (f *FlowMod) Len() (n uint16)

func (*FlowMod) MarshalBinary

func (f *FlowMod) MarshalBinary() (data []byte, err error)

func (*FlowMod) UnmarshalBinary

func (f *FlowMod) UnmarshalBinary(data []byte) error

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

func (s *FlowStats) Len() (n uint16)

func (*FlowStats) MarshalBinary

func (s *FlowStats) MarshalBinary() (data []byte, err error)

func (*FlowStats) UnmarshalBinary

func (s *FlowStats) UnmarshalBinary(data []byte) error

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

type FlowUpdateHeader struct {
	Length uint16
	Event  uint16
}

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

func (g *GroupDesc) AddBucket(bkt Bucket)

Add a bucket to group desc

func (*GroupDesc) Len

func (g *GroupDesc) Len() uint16

func (*GroupDesc) MarshalBinary

func (g *GroupDesc) MarshalBinary() (data []byte, err error)

func (*GroupDesc) UnmarshalBinary

func (g *GroupDesc) UnmarshalBinary(data []byte) (err error)

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 NewGroupMod

func NewGroupMod() *GroupMod

Create a new group mod message

func (*GroupMod) AddBucket

func (g *GroupMod) AddBucket(bkt Bucket)

Add a bucket to group mod

func (*GroupMod) Len

func (g *GroupMod) Len() (n uint16)

func (*GroupMod) MarshalBinary

func (g *GroupMod) MarshalBinary() (data []byte, err error)

func (*GroupMod) UnmarshalBinary

func (g *GroupMod) UnmarshalBinary(data []byte) (err error)

type GroupMultipartRequest

type GroupMultipartRequest struct {
	GroupId uint32
	Pad     []byte // 4 bytes
}

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

type InstrHeader struct {
	Type   uint16
	Length uint16
}

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

type Instruction interface {
	util.Message
	AddAction(act Action, prepend bool) error
}

func DecodeInstr

func DecodeInstr(data []byte) Instruction

type InstructionId

type InstructionId struct {
	Type   uint16
	Length uint16
	Data   []byte
}

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

type Ipv4DstField struct {
	Ipv4Dst net.IP
}

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

type Ipv4SrcField struct {
	Ipv4Src net.IP
}

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

type Ipv6DstField struct {
	Ipv6Dst net.IP
}

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

type Ipv6SrcField struct {
	Ipv6Src net.IP
}

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 NewMatch

func NewMatch() *Match

func (*Match) AddField

func (m *Match) AddField(f MatchField)

func (*Match) Len

func (m *Match) Len() (n uint16)

func (*Match) MarshalBinary

func (m *Match) MarshalBinary() (data []byte, err error)

func (*Match) UnmarshalBinary

func (m *Match) UnmarshalBinary(data []byte) error

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.

func NewSctpDstField

func NewSctpDstField(port uint16) *MatchField

SCTP_DST field

func NewSctpSrcField

func NewSctpSrcField(port uint16) *MatchField

SCTP_DST field

func NewTcpDstField

func NewTcpDstField(port uint16) *MatchField

TCP_DST field

func NewTcpFlagsField

func NewTcpFlagsField(tcpFlag uint16, tcpFlagMask *uint16) *MatchField

Return a tcp flags field

func NewTcpSrcField

func NewTcpSrcField(port uint16) *MatchField

TCP_SRC field

func NewTunMetadataField

func NewTunMetadataField(idx int, data []byte, mask []byte) *MatchField

func NewTunnelIdField

func NewTunnelIdField(tunnelId uint64) *MatchField

Return a MatchField for tunel id matching

func NewTunnelIpv4DstField

func NewTunnelIpv4DstField(tunnelIpDst net.IP, tunnelIpDstMask *net.IP) *MatchField

Return a MatchField for tunnel ipv4 dst addr

func NewTunnelIpv4SrcField

func NewTunnelIpv4SrcField(tunnelIpSrc net.IP, tunnelIpSrcMask *net.IP) *MatchField

Return a MatchField for tunnel ipv4 src addr

func NewTunnelIpv6DstField

func NewTunnelIpv6DstField(tunnelIpv6Dst net.IP, tunnelIpv6DstMask *net.IP) *MatchField

Return a MatchField for tunnel ipv6 dst addr

func NewTunnelIpv6SrcField

func NewTunnelIpv6SrcField(tunnelIpv6Src net.IP, tunnelIpv6SrcMask *net.IP) *MatchField

Return a MatchField for tunnel ipv6 src addr

func NewUdpDstField

func NewUdpDstField(port uint16) *MatchField

UDP_DST field

func NewUdpSrcField

func NewUdpSrcField(port uint16) *MatchField

UDP_SRC field

func NewVlanIdField

func NewVlanIdField(vlanId uint16, vlanMask *uint16) *MatchField

Return a MatchField for vlan id matching

func NewVlanPcpField

func NewVlanPcpField(vlanPcp uint8) *MatchField

Return a MatchField for vlan id matching

func (*MatchField) Len

func (m *MatchField) Len() (n uint16)

func (*MatchField) MarshalBinary

func (m *MatchField) MarshalBinary() (data []byte, err error)

func (*MatchField) MarshalHeader

func (m *MatchField) MarshalHeader() uint32

func (*MatchField) UnmarshalBinary

func (m *MatchField) UnmarshalBinary(data []byte) error

func (*MatchField) UnmarshalHeader

func (m *MatchField) UnmarshalHeader(data []byte) error

type MetadataField

type MetadataField struct {
	Metadata uint64
}

METADATA field

func (*MetadataField) Len

func (m *MetadataField) Len() uint16

func (*MetadataField) MarshalBinary

func (m *MetadataField) MarshalBinary() (data []byte, err error)

func (*MetadataField) UnmarshalBinary

func (m *MetadataField) UnmarshalBinary(data []byte) error

type MeterBandDSCP

type MeterBandDSCP struct {
	MeterBandHeader       /* Type: OFPMBT_DSCP_REMARK. */
	PrecLevel       uint8 /* Number of drop precedence level to add. */
	// contains filtered or unexported fields
}

ofp_meter_band_dscp_remark

func NewMeterBandDSCP

func NewMeterBandDSCP() *MeterBandDSCP

func (*MeterBandDSCP) Len

func (m *MeterBandDSCP) Len() (n uint16)

func (*MeterBandDSCP) MarshalBinary

func (m *MeterBandDSCP) MarshalBinary() (data []byte, err error)

func (*MeterBandDSCP) UnmarshalBinary

func (m *MeterBandDSCP) UnmarshalBinary(data []byte) error

type MeterBandDrop

type MeterBandDrop struct {
	MeterBandHeader /* Type: OFPMBT_DROP. */
	// contains filtered or unexported fields
}

ofp_meter_band_drop

func NewMeterBandDrop

func NewMeterBandDrop() *MeterBandDrop

func (*MeterBandDrop) Len

func (m *MeterBandDrop) Len() (n uint16)

func (*MeterBandDrop) MarshalBinary

func (m *MeterBandDrop) MarshalBinary() (data []byte, err error)

func (*MeterBandDrop) UnmarshalBinary

func (m *MeterBandDrop) UnmarshalBinary(data []byte) error

type MeterBandExperimenter

type MeterBandExperimenter struct {
	MeterBandHeader        /* Type: OFPMBT13_EXPERIMENTER. */
	Experimenter    uint32 /* Experimenter ID which takes the same form as in struct ofp_experimenter_header. */
}

func (*MeterBandExperimenter) Len

func (m *MeterBandExperimenter) Len() (n uint16)

func (*MeterBandExperimenter) MarshalBinary

func (m *MeterBandExperimenter) MarshalBinary() (data []byte, err error)

func (*MeterBandExperimenter) UnmarshalBinary

func (m *MeterBandExperimenter) UnmarshalBinary(data []byte) error

type MeterBandHeader

type MeterBandHeader struct {
	Type      uint16 /* One of OFPMBT13_*. */
	Length    uint16 /* Length in bytes of this band. */
	Rate      uint32 /* Rate for this band. */
	BurstSize uint32 /* Size of bursts. */
}

ofp_meter_band_header

func NewMeterBandHeader

func NewMeterBandHeader() *MeterBandHeader

func (*MeterBandHeader) Len

func (m *MeterBandHeader) Len() (n uint16)

func (*MeterBandHeader) MarshalBinary

func (m *MeterBandHeader) MarshalBinary() (data []byte, err error)

func (*MeterBandHeader) UnmarshalBinary

func (m *MeterBandHeader) UnmarshalBinary(data []byte) error

type MeterBandStats

type MeterBandStats struct {
	PacketBandCount uint64
	ByteBandCount   uint64
}

ofp_meter_band_stats

func NewMeterBandStats

func NewMeterBandStats() *MeterBandStats

func (*MeterBandStats) Len

func (m *MeterBandStats) Len() uint16

func (*MeterBandStats) MarshalBinary

func (m *MeterBandStats) MarshalBinary() (data []byte, err error)

func (*MeterBandStats) UnmarshalBinary

func (m *MeterBandStats) UnmarshalBinary(data []byte) (err error)

type MeterDesc

type MeterDesc struct {
	Length  uint16
	Flags   uint16
	MeterId uint32
	Bands   []util.Message // ofp_meter_band_header + body
}

ofp_meter_desc

func NewMeterDesc

func NewMeterDesc(id uint32) *MeterDesc

func (*MeterDesc) AddBand

func (m *MeterDesc) AddBand(b util.Message)

func (*MeterDesc) Len

func (m *MeterDesc) Len() uint16

func (*MeterDesc) MarshalBinary

func (m *MeterDesc) MarshalBinary() (data []byte, err error)

func (*MeterDesc) UnmarshalBinary

func (m *MeterDesc) UnmarshalBinary(data []byte) (err error)

type MeterFeatures

type MeterFeatures struct {
	MaxMeter     uint32
	BandTypes    uint32
	Capabilities uint32
	MaxBands     uint8
	MaxColor     uint8
	Pad          []byte // 2 bytes
	Features     uint32
	Pad2         []byte // 4 bytes
}

ofp_meter_features

func NewMeterFeatures

func NewMeterFeatures() *MeterFeatures

func (*MeterFeatures) Len

func (m *MeterFeatures) Len() uint16

func (*MeterFeatures) MarshalBinary

func (m *MeterFeatures) MarshalBinary() (data []byte, err error)

func (*MeterFeatures) UnmarshalBinary

func (m *MeterFeatures) UnmarshalBinary(data []byte) (err error)

type MeterMod

type MeterMod struct {
	common.Header
	Command    uint16         /* One of OFPMC_*. */
	Flags      uint16         /* Set of OFPMF_*. */
	MeterId    uint32         /* Meter instance. */
	MeterBands []util.Message /* List of MeterBand*. */
}

MeterMod message

func NewMeterMod

func NewMeterMod() *MeterMod

Create a new meter mod message

func (*MeterMod) AddMeterBand

func (m *MeterMod) AddMeterBand(mb util.Message)

Add a meterBand to meter mod

func (*MeterMod) Len

func (m *MeterMod) Len() (n uint16)

func (*MeterMod) MarshalBinary

func (m *MeterMod) MarshalBinary() (data []byte, err error)

func (*MeterMod) UnmarshalBinary

func (m *MeterMod) UnmarshalBinary(data []byte) error

type MeterMultipartRequest

type MeterMultipartRequest struct {
	MeterId uint32
	Pad     []byte // 4 bytes
}

ofp_meter_multipart_request

func NewMeterMultipartRequest

func NewMeterMultipartRequest(id uint32) *MeterMultipartRequest

func (*MeterMultipartRequest) Len

func (m *MeterMultipartRequest) Len() uint16

func (*MeterMultipartRequest) MarshalBinary

func (m *MeterMultipartRequest) MarshalBinary() (data []byte, err error)

func (*MeterMultipartRequest) UnmarshalBinary

func (m *MeterMultipartRequest) UnmarshalBinary(data []byte) (err error)

type MeterStats

type MeterStats struct {
	MeterId       uint32
	Length        uint16
	Pad           []byte // 6 bytes
	RefCount      uint32
	PacketInCount uint64
	ByteInCount   uint64
	DurationSec   uint32
	DurationNSec  uint32
	BandStats     []MeterBandStats
}

ofp_meter_stats

func NewMeterStats

func NewMeterStats(id uint32) *MeterStats

func (*MeterStats) AddBandStats

func (m *MeterStats) AddBandStats(s MeterBandStats)

func (*MeterStats) Len

func (m *MeterStats) Len() uint16

func (*MeterStats) MarshalBinary

func (m *MeterStats) MarshalBinary() (data []byte, err error)

func (*MeterStats) UnmarshalBinary

func (m *MeterStats) UnmarshalBinary(data []byte) (err error)

type MplsBosField

type MplsBosField struct {
	MplsBos uint8
}

MplsBos field

func (*MplsBosField) Len

func (m *MplsBosField) Len() uint16

func (*MplsBosField) MarshalBinary

func (m *MplsBosField) MarshalBinary() (data []byte, err error)

func (*MplsBosField) UnmarshalBinary

func (m *MplsBosField) UnmarshalBinary(data []byte) error

type MplsLabelField

type MplsLabelField struct {
	MplsLabel uint32
}

MplsLabel field

func (*MplsLabelField) Len

func (m *MplsLabelField) Len() uint16

func (*MplsLabelField) MarshalBinary

func (m *MplsLabelField) MarshalBinary() (data []byte, err error)

func (*MplsLabelField) UnmarshalBinary

func (m *MplsLabelField) UnmarshalBinary(data []byte) error

type MplsTcField

type MplsTcField struct {
	MplsTc uint8
}

MPLS_TC field

func (*MplsTcField) Len

func (m *MplsTcField) Len() uint16

func (*MplsTcField) MarshalBinary

func (m *MplsTcField) MarshalBinary() (data []byte, err error)

func (*MplsTcField) UnmarshalBinary

func (m *MplsTcField) UnmarshalBinary(data []byte) (err error)

type MultipartReply

type MultipartReply struct {
	common.Header
	Type  uint16
	Flags uint16

	Body []util.Message
	// contains filtered or unexported fields
}

ofp_multipart_reply

func NewMpReply

func NewMpReply(mpType uint16) *MultipartReply

func (*MultipartReply) Len

func (s *MultipartReply) Len() (n uint16)

func (*MultipartReply) MarshalBinary

func (s *MultipartReply) MarshalBinary() (data []byte, err error)

func (*MultipartReply) UnmarshalBinary

func (s *MultipartReply) UnmarshalBinary(data []byte) error

type MultipartRequest

type MultipartRequest struct {
	common.Header
	Type  uint16
	Flags uint16

	Body []util.Message
	// contains filtered or unexported fields
}

ofp_multipart_request

func NewMpRequest

func NewMpRequest(mpType uint16) *MultipartRequest

func (*MultipartRequest) Len

func (s *MultipartRequest) Len() (n uint16)

func (*MultipartRequest) MarshalBinary

func (s *MultipartRequest) MarshalBinary() (data []byte, err error)

func (*MultipartRequest) UnmarshalBinary

func (s *MultipartRequest) UnmarshalBinary(data []byte) error

type NXActionCTNAT

type NXActionCTNAT struct {
	*NXActionHeader

	Flags uint16 // nat Flags to identify snat/dnat, and nat algorithms: random/protocolHash, connection persistent
	// contains filtered or unexported fields
}

NXActionCTNAT is NX action to set NAT in conntrack.

func NewNXActionCTNAT

func NewNXActionCTNAT() *NXActionCTNAT

func (*NXActionCTNAT) Len

func (a *NXActionCTNAT) Len() (n uint16)

func (*NXActionCTNAT) MarshalBinary

func (a *NXActionCTNAT) MarshalBinary() (data []byte, err error)

func (*NXActionCTNAT) SetDNAT

func (a *NXActionCTNAT) SetDNAT() error

func (*NXActionCTNAT) SetPersistent

func (a *NXActionCTNAT) SetPersistent() error

func (*NXActionCTNAT) SetProtoHash

func (a *NXActionCTNAT) SetProtoHash() error

func (*NXActionCTNAT) SetRandom

func (a *NXActionCTNAT) SetRandom() error

func (*NXActionCTNAT) SetRangeIPv4Max

func (a *NXActionCTNAT) SetRangeIPv4Max(ipMax net.IP)

func (*NXActionCTNAT) SetRangeIPv4Min

func (a *NXActionCTNAT) SetRangeIPv4Min(ipMin net.IP)

func (*NXActionCTNAT) SetRangeIPv6Max

func (a *NXActionCTNAT) SetRangeIPv6Max(ipMax net.IP)

func (*NXActionCTNAT) SetRangeIPv6Min

func (a *NXActionCTNAT) SetRangeIPv6Min(ipMin net.IP)

func (*NXActionCTNAT) SetRangeProtoMax

func (a *NXActionCTNAT) SetRangeProtoMax(protoMax *uint16)

func (*NXActionCTNAT) SetRangeProtoMin

func (a *NXActionCTNAT) SetRangeProtoMin(protoMin *uint16)

func (*NXActionCTNAT) SetSNAT

func (a *NXActionCTNAT) SetSNAT() error

func (*NXActionCTNAT) UnmarshalBinary

func (a *NXActionCTNAT) UnmarshalBinary(data []byte) error

type NXActionConjunction

type NXActionConjunction struct {
	*NXActionHeader
	Clause  uint8
	NClause uint8
	ID      uint32
}

NXActionConjunction is NX action to configure conjunctive match flows.

func NewNXActionConjunction

func NewNXActionConjunction(clause uint8, nclause uint8, id uint32) *NXActionConjunction

NewNXActionConjunction creates NXActionConjunction, the action in flow entry is like conjunction(ID, Clause/nclause).

func (*NXActionConjunction) Len

func (a *NXActionConjunction) Len() (n uint16)

func (*NXActionConjunction) MarshalBinary

func (a *NXActionConjunction) MarshalBinary() (data []byte, err error)

func (*NXActionConjunction) UnmarshalBinary

func (a *NXActionConjunction) UnmarshalBinary(data []byte) error

type NXActionConnTrack

type NXActionConnTrack struct {
	*NXActionHeader
	Flags        uint16
	ZoneSrc      uint32
	ZoneOfsNbits uint16
	RecircTable  uint8

	Alg uint16
	// contains filtered or unexported fields
}

NXActionConnTrack is NX action for conntrack.

func NewNXActionConnTrack

func NewNXActionConnTrack() *NXActionConnTrack

func (*NXActionConnTrack) AddAction

func (a *NXActionConnTrack) AddAction(actions ...Action) *NXActionConnTrack

func (*NXActionConnTrack) Commit

func (a *NXActionConnTrack) Commit() *NXActionConnTrack

func (*NXActionConnTrack) Force

func (*NXActionConnTrack) Len

func (a *NXActionConnTrack) Len() (n uint16)

func (*NXActionConnTrack) MarshalBinary

func (a *NXActionConnTrack) MarshalBinary() (data []byte, err error)

func (*NXActionConnTrack) Table

func (a *NXActionConnTrack) Table(tableID uint8) *NXActionConnTrack

func (*NXActionConnTrack) UnmarshalBinary

func (a *NXActionConnTrack) UnmarshalBinary(data []byte) error

func (*NXActionConnTrack) ZoneImm

func (a *NXActionConnTrack) ZoneImm(zoneID uint16) *NXActionConnTrack

func (*NXActionConnTrack) ZoneRange

func (a *NXActionConnTrack) ZoneRange(field *MatchField, rng *NXRange) *NXActionConnTrack

type NXActionController

type NXActionController struct {
	*NXActionHeader
	MaxLen       uint16
	ControllerID uint16
	Reason       uint8
	// contains filtered or unexported fields
}

NXActionController is NX action to output packet to the Controller set with a specified ID.

func NewNXActionController

func NewNXActionController(controllerID uint16) *NXActionController

func (*NXActionController) Len

func (a *NXActionController) Len() uint16

func (*NXActionController) MarshalBinary

func (a *NXActionController) MarshalBinary() (data []byte, err error)

func (*NXActionController) UnmarshalBinary

func (a *NXActionController) UnmarshalBinary(data []byte) error

type NXActionController2

type NXActionController2 struct {
	*NXActionHeader
	// contains filtered or unexported fields
}

NXActionController2 is NX action to output packet to the Controller set with a specified ID.

func NewNXActionController2

func NewNXActionController2() *NXActionController2

func (*NXActionController2) AddControllerID

func (a *NXActionController2) AddControllerID(controllerID uint16)

func (*NXActionController2) AddMaxLen

func (a *NXActionController2) AddMaxLen(maxLen uint16)

func (*NXActionController2) AddMeterID

func (a *NXActionController2) AddMeterID(meterID uint32)

func (*NXActionController2) AddPause

func (a *NXActionController2) AddPause(pause bool)

func (*NXActionController2) AddReason

func (a *NXActionController2) AddReason(reason uint8)

func (*NXActionController2) AddUserdata

func (a *NXActionController2) AddUserdata(userdata []byte)

func (*NXActionController2) Len

func (a *NXActionController2) Len() uint16

func (*NXActionController2) MarshalBinary

func (a *NXActionController2) MarshalBinary() (data []byte, err error)

func (*NXActionController2) UnmarshalBinary

func (a *NXActionController2) UnmarshalBinary(data []byte) error

type NXActionController2PropControllerID

type NXActionController2PropControllerID struct {
	*PropHeader  /* Type: NXAC2PT_CONTROLLER_ID */
	ControllerID uint16
	// contains filtered or unexported fields
}

func NewControllerID

func NewControllerID(controllerID uint16) *NXActionController2PropControllerID

func (*NXActionController2PropControllerID) Len

func (*NXActionController2PropControllerID) MarshalBinary

func (a *NXActionController2PropControllerID) MarshalBinary() (data []byte, err error)

func (*NXActionController2PropControllerID) UnmarshalBinary

func (a *NXActionController2PropControllerID) UnmarshalBinary(data []byte) error

type NXActionController2PropMaxLen

type NXActionController2PropMaxLen struct {
	*PropHeader /* Type: NXAC2PT_MAX_LEN */
	MaxLen      uint16
	// contains filtered or unexported fields
}

func NewMaxLen

func NewMaxLen(maxLen uint16) *NXActionController2PropMaxLen

func (*NXActionController2PropMaxLen) Len

func (*NXActionController2PropMaxLen) MarshalBinary

func (a *NXActionController2PropMaxLen) MarshalBinary() (data []byte, err error)

func (*NXActionController2PropMaxLen) UnmarshalBinary

func (a *NXActionController2PropMaxLen) UnmarshalBinary(data []byte) error

type NXActionController2PropMeterId

type NXActionController2PropMeterId struct {
	*PropHeader /* Type: NXAC2PT_METER_ID */
	MeterId     uint32
}

func NewMeterId

func NewMeterId(meterId uint32) *NXActionController2PropMeterId

func (*NXActionController2PropMeterId) Len

func (*NXActionController2PropMeterId) MarshalBinary

func (a *NXActionController2PropMeterId) MarshalBinary() (data []byte, err error)

func (*NXActionController2PropMeterId) UnmarshalBinary

func (a *NXActionController2PropMeterId) UnmarshalBinary(data []byte) error

type NXActionController2PropPause

type NXActionController2PropPause struct {
	*PropHeader /* Type: NXAC2PT_PAUSE */
	// contains filtered or unexported fields
}

func NewPause

func NewPause() *NXActionController2PropPause

func (*NXActionController2PropPause) Len

func (*NXActionController2PropPause) MarshalBinary

func (a *NXActionController2PropPause) MarshalBinary() (data []byte, err error)

func (*NXActionController2PropPause) UnmarshalBinary

func (a *NXActionController2PropPause) UnmarshalBinary(data []byte) error

type NXActionController2PropReason

type NXActionController2PropReason struct {
	*PropHeader /* Type: NXAC2PT_REASON */
	Reason      uint8
	// contains filtered or unexported fields
}

func NewReason

func NewReason(reason uint8) *NXActionController2PropReason

func (*NXActionController2PropReason) Len

func (*NXActionController2PropReason) MarshalBinary

func (a *NXActionController2PropReason) MarshalBinary() (data []byte, err error)

func (*NXActionController2PropReason) UnmarshalBinary

func (a *NXActionController2PropReason) UnmarshalBinary(data []byte) error

type NXActionController2PropUserdata

type NXActionController2PropUserdata struct {
	*PropHeader /* Type: NXAC2PT_USERDATA */
	Userdata    []byte
	// contains filtered or unexported fields
}

func NewUserdata

func NewUserdata(userdata []byte) *NXActionController2PropUserdata

func (*NXActionController2PropUserdata) Len

func (*NXActionController2PropUserdata) MarshalBinary

func (a *NXActionController2PropUserdata) MarshalBinary() (data []byte, err error)

func (*NXActionController2PropUserdata) UnmarshalBinary

func (a *NXActionController2PropUserdata) UnmarshalBinary(data []byte) error

type NXActionDecTTL

type NXActionDecTTL struct {
	*NXActionHeader
	// contains filtered or unexported fields
}

func NewNXActionDecTTL

func NewNXActionDecTTL() *NXActionDecTTL

func (*NXActionDecTTL) Len

func (a *NXActionDecTTL) Len() (n uint16)

func (*NXActionDecTTL) MarshalBinary

func (a *NXActionDecTTL) MarshalBinary() (data []byte, err error)

func (*NXActionDecTTL) UnmarshalBinary

func (a *NXActionDecTTL) UnmarshalBinary(data []byte) error

type NXActionDecTTLCntIDs

type NXActionDecTTLCntIDs struct {
	*NXActionHeader
	// contains filtered or unexported fields
}

func NewNXActionDecTTLCntIDs

func NewNXActionDecTTLCntIDs(controllers uint16, ids ...uint16) *NXActionDecTTLCntIDs

func (*NXActionDecTTLCntIDs) Len

func (a *NXActionDecTTLCntIDs) Len() (n uint16)

func (*NXActionDecTTLCntIDs) MarshalBinary

func (a *NXActionDecTTLCntIDs) MarshalBinary() (data []byte, err error)

func (*NXActionDecTTLCntIDs) UnmarshalBinary

func (a *NXActionDecTTLCntIDs) UnmarshalBinary(data []byte) error

type NXActionHeader

type NXActionHeader struct {
	*ActionHeader
	Vendor  uint32
	Subtype uint16
}

func NewNxActionHeader

func NewNxActionHeader(subtype uint16) *NXActionHeader

func (*NXActionHeader) Header

func (a *NXActionHeader) Header() *ActionHeader

func (*NXActionHeader) Len

func (a *NXActionHeader) Len() (n uint16)

func (*NXActionHeader) MarshalBinary

func (a *NXActionHeader) MarshalBinary() (data []byte, err error)

func (*NXActionHeader) NXHeader

func (a *NXActionHeader) NXHeader() *NXActionHeader

func (*NXActionHeader) UnmarshalBinary

func (a *NXActionHeader) UnmarshalBinary(data []byte) error

type NXActionLearn

type NXActionLearn struct {
	*NXActionHeader
	IdleTimeout uint16
	HardTimeout uint16
	Priority    uint16
	Cookie      uint64
	Flags       uint16
	TableID     uint8

	FinIdleTimeout uint16
	FinHardTimeout uint16
	LearnSpecs     []*NXLearnSpec
	// contains filtered or unexported fields
}

func NewNXActionLearn

func NewNXActionLearn() *NXActionLearn

func (*NXActionLearn) Len

func (a *NXActionLearn) Len() uint16

func (*NXActionLearn) MarshalBinary

func (a *NXActionLearn) MarshalBinary() (data []byte, err error)

func (*NXActionLearn) UnmarshalBinary

func (a *NXActionLearn) UnmarshalBinary(data []byte) error

type NXActionNote

type NXActionNote struct {
	*NXActionHeader
	Note []byte
}

func NewNXActionNote

func NewNXActionNote() *NXActionNote

func (*NXActionNote) Len

func (a *NXActionNote) Len() uint16

func (*NXActionNote) MarshalBinary

func (a *NXActionNote) MarshalBinary() (data []byte, err error)

func (*NXActionNote) UnmarshalBinary

func (a *NXActionNote) UnmarshalBinary(data []byte) error

type NXActionOutputReg

type NXActionOutputReg struct {
	*NXActionHeader
	OfsNbits uint16      // (ofs << 6 | (Nbits -1)
	SrcField *MatchField // source nxm_nx_reg
	MaxLen   uint16      // Max length to send to controller if chosen port is OFPP_CONTROLLER
	// contains filtered or unexported fields
}

NXActionOutputReg is NX action to output to a field with a specified range.

func NewOutputFromField

func NewOutputFromField(srcField *MatchField, ofsNbits uint16) *NXActionOutputReg

func NewOutputFromFieldWithMaxLen

func NewOutputFromFieldWithMaxLen(srcField *MatchField, ofsNbits uint16, maxLen uint16) *NXActionOutputReg

func (*NXActionOutputReg) Len

func (a *NXActionOutputReg) Len() (n uint16)

func (*NXActionOutputReg) MarshalBinary

func (a *NXActionOutputReg) MarshalBinary() (data []byte, err error)

func (*NXActionOutputReg) UnmarshalBinary

func (a *NXActionOutputReg) UnmarshalBinary(data []byte) error

type NXActionRegLoad

type NXActionRegLoad struct {
	*NXActionHeader
	OfsNbits uint16
	DstReg   *MatchField
	Value    uint64
}

NXActionRegLoad is NX action to load data to a specified field.

func NewNXActionRegLoad

func NewNXActionRegLoad(ofsNbits uint16, dstField *MatchField, value uint64) *NXActionRegLoad

func (*NXActionRegLoad) Len

func (a *NXActionRegLoad) Len() (n uint16)

func (*NXActionRegLoad) MarshalBinary

func (a *NXActionRegLoad) MarshalBinary() (data []byte, err error)

func (*NXActionRegLoad) UnmarshalBinary

func (a *NXActionRegLoad) UnmarshalBinary(data []byte) error

type NXActionRegLoad2

type NXActionRegLoad2 struct {
	*NXActionHeader
	DstField *MatchField
	// contains filtered or unexported fields
}

NXActionRegLoad2 is NX action to load data to a specified field.

func NewNXActionRegLoad2

func NewNXActionRegLoad2(dstField *MatchField) *NXActionRegLoad2

func (*NXActionRegLoad2) Len

func (a *NXActionRegLoad2) Len() (n uint16)

func (*NXActionRegLoad2) MarshalBinary

func (a *NXActionRegLoad2) MarshalBinary() (data []byte, err error)

func (*NXActionRegLoad2) UnmarshalBinary

func (a *NXActionRegLoad2) UnmarshalBinary(data []byte) error

type NXActionRegMove

type NXActionRegMove struct {
	*NXActionHeader
	Nbits    uint16
	SrcOfs   uint16
	DstOfs   uint16
	SrcField *MatchField
	DstField *MatchField
}

NXActionRegMove is NX action to move data from srcField to dstField.

func NewNXActionRegMove

func NewNXActionRegMove(nBits uint16, srcOfs uint16, dstOfs uint16, srcField *MatchField, dstField *MatchField) *NXActionRegMove

func (*NXActionRegMove) Len

func (a *NXActionRegMove) Len() (n uint16)

func (*NXActionRegMove) MarshalBinary

func (a *NXActionRegMove) MarshalBinary() (data []byte, err error)

func (*NXActionRegMove) UnmarshalBinary

func (a *NXActionRegMove) UnmarshalBinary(data []byte) error

type NXActionResubmit

type NXActionResubmit struct {
	*NXActionHeader
	InPort  uint16
	TableID uint8
	// contains filtered or unexported fields
}

NXActionResubmit is NX action to resubmit packet to a specified in_port.

func NewNXActionResubmit

func NewNXActionResubmit(inPort uint16) *NXActionResubmit

func (*NXActionResubmit) Len

func (a *NXActionResubmit) Len() (n uint16)

func (*NXActionResubmit) MarshalBinary

func (a *NXActionResubmit) MarshalBinary() (data []byte, err error)

func (*NXActionResubmit) UnmarshalBinary

func (a *NXActionResubmit) UnmarshalBinary(data []byte) error

type NXActionResubmitTable

type NXActionResubmitTable struct {
	*NXActionHeader
	InPort  uint16
	TableID uint8
	// contains filtered or unexported fields
}

NXActionResubmitTable is NX action to resubmit packet to a specified table and in_port.

func NewNXActionResubmitTableAction

func NewNXActionResubmitTableAction(inPort uint16, tableID uint8) *NXActionResubmitTable

func NewNXActionResubmitTableCT

func NewNXActionResubmitTableCT(inPort uint16, tableID uint8) *NXActionResubmitTable

func NewNXActionResubmitTableCTNoInPort

func NewNXActionResubmitTableCTNoInPort(tableID uint8) *NXActionResubmitTable

func (*NXActionResubmitTable) IsCT

func (a *NXActionResubmitTable) IsCT() bool

func (*NXActionResubmitTable) Len

func (a *NXActionResubmitTable) Len() (n uint16)

func (*NXActionResubmitTable) MarshalBinary

func (a *NXActionResubmitTable) MarshalBinary() (data []byte, err error)

func (*NXActionResubmitTable) UnmarshalBinary

func (a *NXActionResubmitTable) UnmarshalBinary(data []byte) error

type NXLearnSpec

type NXLearnSpec struct {
	Header   *NXLearnSpecHeader
	SrcField *NXLearnSpecField
	DstField *NXLearnSpecField
	SrcValue []byte
}

func (*NXLearnSpec) Len

func (s *NXLearnSpec) Len() uint16

func (*NXLearnSpec) MarshalBinary

func (s *NXLearnSpec) MarshalBinary() (data []byte, err error)

func (*NXLearnSpec) UnmarshalBinary

func (s *NXLearnSpec) UnmarshalBinary(data []byte) error

type NXLearnSpecField

type NXLearnSpecField struct {
	Field *MatchField
	Ofs   uint16
}

func (*NXLearnSpecField) Len

func (f *NXLearnSpecField) Len() uint16

func (*NXLearnSpecField) MarshalBinary

func (f *NXLearnSpecField) MarshalBinary() (data []byte, err error)

func (*NXLearnSpecField) UnmarshalBinary

func (f *NXLearnSpecField) UnmarshalBinary(data []byte) error

type NXLearnSpecHeader

type NXLearnSpecHeader struct {
	// contains filtered or unexported fields
}

func NewLearnHeaderLoadFromField

func NewLearnHeaderLoadFromField(nBits uint16) *NXLearnSpecHeader

func NewLearnHeaderLoadFromValue

func NewLearnHeaderLoadFromValue(nBits uint16) *NXLearnSpecHeader

func NewLearnHeaderMatchFromField

func NewLearnHeaderMatchFromField(nBits uint16) *NXLearnSpecHeader

func NewLearnHeaderMatchFromValue

func NewLearnHeaderMatchFromValue(nBits uint16) *NXLearnSpecHeader

func NewLearnHeaderOutputFromField

func NewLearnHeaderOutputFromField(nBits uint16) *NXLearnSpecHeader

func (*NXLearnSpecHeader) Len

func (h *NXLearnSpecHeader) Len() (n uint16)

func (*NXLearnSpecHeader) MarshalBinary

func (h *NXLearnSpecHeader) MarshalBinary() (data []byte, err error)

func (*NXLearnSpecHeader) UnmarshalBinary

func (h *NXLearnSpecHeader) UnmarshalBinary(data []byte) error

type NXRange

type NXRange struct {
	// contains filtered or unexported fields
}

func NewNXRange

func NewNXRange(start int, end int) *NXRange

NewNXRange creates a NXRange using start and end number.

func NewNXRangeByOfsNBits

func NewNXRangeByOfsNBits(ofs int, nBits int) *NXRange

NewNXRangeByOfsNBits creates a NXRange using offshift and bit count.

func (*NXRange) GetNbits

func (n *NXRange) GetNbits() uint16

GetNbits returns the bits count from NXRange.

func (*NXRange) GetOfs

func (n *NXRange) GetOfs() uint16

GetOfs returns the offshift number from NXRange.

func (*NXRange) ToOfsBits

func (n *NXRange) ToOfsBits() uint16

ToOfsBits encodes the NXRange to a uint16 number to identify offshift and bits count.

func (*NXRange) ToUint32Mask

func (n *NXRange) ToUint32Mask() uint32

ToUint32Mask generates a uint32 number mask from NXRange.

type NextTableProperty

type NextTableProperty struct {
	OFTablePropertyHeader
	TableIDs []uint8
}

func NewNextTableProperty

func NewNextTableProperty(Type uint16) *NextTableProperty

Type could be: * TFPT_NEXT_TABLES * TFPT_NEXT_TABLES_MISS * TFPT_TABLE_SYNC_FROM

func (*NextTableProperty) Len

func (p *NextTableProperty) Len() uint16

func (*NextTableProperty) MarshalBinary

func (p *NextTableProperty) MarshalBinary() (data []byte, err error)

func (*NextTableProperty) UnmarshalBinary

func (p *NextTableProperty) UnmarshalBinary(data []byte) error

type OFTablePropertyHeader

type OFTablePropertyHeader struct {
	Type   uint16
	Length uint16
}

func (*OFTablePropertyHeader) Len

func (h *OFTablePropertyHeader) Len() uint16

func (*OFTablePropertyHeader) MarshalBinary

func (h *OFTablePropertyHeader) MarshalBinary() (data []byte, err error)

func (*OFTablePropertyHeader) UnmarshalBinary

func (h *OFTablePropertyHeader) UnmarshalBinary(data []byte) error

type OXSStatHeader

type OXSStatHeader struct {
	Class  uint16
	Field  uint8
	Length uint8
}

func (*OXSStatHeader) Len

func (f *OXSStatHeader) Len() (n uint16)

func (*OXSStatHeader) MarshalBinary

func (h *OXSStatHeader) MarshalBinary() (data []byte, err error)

func (*OXSStatHeader) UnmarshalBinary

func (h *OXSStatHeader) UnmarshalBinary(data []byte) (err error)

type OfpTime

type OfpTime struct {
	Seconds     uint64
	NanoSeconds uint32
	Pad         uint32
}

ofp_time

func (*OfpTime) Len

func (t *OfpTime) Len() uint16

func (*OfpTime) MarshalBinary

func (t *OfpTime) MarshalBinary() (data []byte, err error)

func (*OfpTime) UnmarshalBinary

func (t *OfpTime) UnmarshalBinary(data []byte) (err error)

type OxmId

type OxmId struct {
	Class          uint16
	Field          uint8
	HasMask        bool
	Length         uint8
	ExperimenterID uint32
}

oxm_id - OXM TLV Header

func FindOxmIdByName

func FindOxmIdByName(fieldName string, hasMask bool) (*OxmId, error)

func NewOxmId

func NewOxmId(class uint16, field uint8, hasMask bool, length uint8, expId uint32) *OxmId
  • The oxm_ids is a list of OXM types (see 7.2.3.2).
  • The elements of that list are 32-bit OXM headers for non-experimenter
  • OXM fields or 64-bit OXM headers for experimenter OXM fields, those
  • OXM fields don’t include any payload.
  • The oxm_length field in OXM headers must be the length value defined for
  • the OXM field, i.e. the payload length if the OXM field had a payload.
  • For experimenter OXM fields with variable payload size, the oxm_length field
  • must be the maximum length of the payload.

/* Header for OXM experimenter match fields.

  • struct ofp_oxm_experimenter_header {
  • uint32_t oxm_header; // oxm_class = OFPXMC_EXPERIMENTER (OXM_CLASS_EXPERIMENTER)
  • uint32_t experimenter; // Experimenter ID.
  • };
  • OFP_ASSERT(sizeof(struct ofp_oxm_experimenter_header) == 8);

func (*OxmId) Len

func (o *OxmId) Len() (n uint16)

func (*OxmId) MarshalBinary

func (o *OxmId) MarshalBinary() (data []byte, err error)

func (*OxmId) UnmarshalBinary

func (o *OxmId) UnmarshalBinary(data []byte) error

type PBCountStatField

type PBCountStatField struct {
	Header OXSStatHeader
	Count  uint64
}

type XST_OFB_PACKET_COUNT or XST_OFB_BYTE_COUNT

func (*PBCountStatField) Len

func (f *PBCountStatField) Len() (n uint16)

func (*PBCountStatField) MarshalBinary

func (f *PBCountStatField) MarshalBinary() (data []byte, err error)

func (*PBCountStatField) UnmarshalBinary

func (f *PBCountStatField) UnmarshalBinary(data []byte) (err error)

type PacketCountStatField

type PacketCountStatField = PBCountStatField

func NewPacketCountStatField

func NewPacketCountStatField() *PacketCountStatField

type PacketIn

type PacketIn struct {
	common.Header
	BufferId uint32
	TotalLen uint16
	Reason   uint8
	TableId  uint8
	Cookie   uint64
	Match    Match

	Data util.Message
	// contains filtered or unexported fields
}

ofp_packet_in 1.5 (same as 1.3)

func NewPacketIn

func NewPacketIn() *PacketIn

func (*PacketIn) Len

func (p *PacketIn) Len() (n uint16)

func (*PacketIn) MarshalBinary

func (p *PacketIn) MarshalBinary() (data []byte, err error)

func (*PacketIn) UnmarshalBinary

func (p *PacketIn) UnmarshalBinary(data []byte) error

type PacketIn2

type PacketIn2 struct {
	Props []Property
}

func (*PacketIn2) Len

func (p *PacketIn2) Len() (n uint16)

func (*PacketIn2) MarshalBinary

func (p *PacketIn2) MarshalBinary() (data []byte, err error)

func (*PacketIn2) UnmarshalBinary

func (p *PacketIn2) UnmarshalBinary(data []byte) error

type PacketIn2PropBufferID

type PacketIn2PropBufferID struct {
	*PropHeader /* Type: NXPINT_BUFFER_ID */
	BufferID    uint32
}

func (*PacketIn2PropBufferID) Len

func (p *PacketIn2PropBufferID) Len() (n uint16)

func (*PacketIn2PropBufferID) MarshalBinary

func (p *PacketIn2PropBufferID) MarshalBinary() (data []byte, err error)

func (*PacketIn2PropBufferID) UnmarshalBinary

func (p *PacketIn2PropBufferID) UnmarshalBinary(data []byte) error

type PacketIn2PropContinuation

type PacketIn2PropContinuation struct {
	*PropHeader  /* Type: NXPINT_CONTINUATION */
	Continuation []byte
	// contains filtered or unexported fields
}

func (*PacketIn2PropContinuation) Len

func (p *PacketIn2PropContinuation) Len() (n uint16)

func (*PacketIn2PropContinuation) MarshalBinary

func (p *PacketIn2PropContinuation) MarshalBinary() (data []byte, err error)

func (*PacketIn2PropContinuation) UnmarshalBinary

func (p *PacketIn2PropContinuation) UnmarshalBinary(data []byte) error

type PacketIn2PropCookie

type PacketIn2PropCookie struct {
	*PropHeader /* Type: NXPINT_COOKIE */

	Cookie uint64
	// contains filtered or unexported fields
}

func (*PacketIn2PropCookie) Len

func (p *PacketIn2PropCookie) Len() (n uint16)

func (*PacketIn2PropCookie) MarshalBinary

func (p *PacketIn2PropCookie) MarshalBinary() (data []byte, err error)

func (*PacketIn2PropCookie) UnmarshalBinary

func (p *PacketIn2PropCookie) UnmarshalBinary(data []byte) error

type PacketIn2PropFullLen

type PacketIn2PropFullLen struct {
	*PropHeader /* Type: NXPINT_FULL_LEN */
	FullLen     uint32
}

func (*PacketIn2PropFullLen) Len

func (p *PacketIn2PropFullLen) Len() (n uint16)

func (*PacketIn2PropFullLen) MarshalBinary

func (p *PacketIn2PropFullLen) MarshalBinary() (data []byte, err error)

func (*PacketIn2PropFullLen) UnmarshalBinary

func (p *PacketIn2PropFullLen) UnmarshalBinary(data []byte) error

type PacketIn2PropMetadata

type PacketIn2PropMetadata struct {
	*PropHeader /* Type: NXPINT_METADATA */
	Fields      []MatchField
	// contains filtered or unexported fields
}

func (*PacketIn2PropMetadata) Len

func (p *PacketIn2PropMetadata) Len() (n uint16)

func (*PacketIn2PropMetadata) MarshalBinary

func (p *PacketIn2PropMetadata) MarshalBinary() (data []byte, err error)

func (*PacketIn2PropMetadata) UnmarshalBinary

func (p *PacketIn2PropMetadata) UnmarshalBinary(data []byte) error

type PacketIn2PropPacket

type PacketIn2PropPacket struct {
	*PropHeader
	Packet protocol.Ethernet
	// contains filtered or unexported fields
}

func (*PacketIn2PropPacket) Len

func (p *PacketIn2PropPacket) Len() (n uint16)

func (*PacketIn2PropPacket) MarshalBinary

func (p *PacketIn2PropPacket) MarshalBinary() (data []byte, err error)

func (*PacketIn2PropPacket) UnmarshalBinary

func (p *PacketIn2PropPacket) UnmarshalBinary(data []byte) error

type PacketIn2PropReason

type PacketIn2PropReason struct {
	*PropHeader /* Type: NXPINT_COOKIE */
	Reason      uint8
	// contains filtered or unexported fields
}

func (*PacketIn2PropReason) Len

func (p *PacketIn2PropReason) Len() (n uint16)

func (*PacketIn2PropReason) MarshalBinary

func (p *PacketIn2PropReason) MarshalBinary() (data []byte, err error)

func (*PacketIn2PropReason) UnmarshalBinary

func (p *PacketIn2PropReason) UnmarshalBinary(data []byte) error

type PacketIn2PropTableID

type PacketIn2PropTableID struct {
	*PropHeader /* Type: NXPINT_TABLE_ID */
	TableID     uint8
	// contains filtered or unexported fields
}

func (*PacketIn2PropTableID) Len

func (p *PacketIn2PropTableID) Len() (n uint16)

func (*PacketIn2PropTableID) MarshalBinary

func (p *PacketIn2PropTableID) MarshalBinary() (data []byte, err error)

func (*PacketIn2PropTableID) UnmarshalBinary

func (p *PacketIn2PropTableID) UnmarshalBinary(data []byte) error

type PacketIn2PropUserdata

type PacketIn2PropUserdata struct {
	*PropHeader /* Type: NXPINT_USERDATA */
	Userdata    []uint8
	// contains filtered or unexported fields
}

func (*PacketIn2PropUserdata) Len

func (p *PacketIn2PropUserdata) Len() (n uint16)

func (*PacketIn2PropUserdata) MarshalBinary

func (p *PacketIn2PropUserdata) MarshalBinary() (data []byte, err error)

func (*PacketIn2PropUserdata) UnmarshalBinary

func (p *PacketIn2PropUserdata) UnmarshalBinary(data []byte) error

type PacketInFormat

type PacketInFormat struct {
	Spif uint32
}

func (*PacketInFormat) Len

func (p *PacketInFormat) Len() (n uint16)

func (*PacketInFormat) MarshalBinary

func (p *PacketInFormat) MarshalBinary() (data []byte, err error)

func (*PacketInFormat) UnmarshalBinary

func (p *PacketInFormat) UnmarshalBinary(data []byte) error

type PacketOut

type PacketOut struct {
	common.Header
	BufferId   uint32
	ActionsLen uint16

	Match   Match
	Actions []Action
	Data    util.Message
	// contains filtered or unexported fields
}

func NewPacketOut

func NewPacketOut() *PacketOut

func (*PacketOut) AddAction

func (p *PacketOut) AddAction(act Action)

func (*PacketOut) Len

func (p *PacketOut) Len() (n uint16)

func (*PacketOut) MarshalBinary

func (p *PacketOut) MarshalBinary() (data []byte, err error)

func (*PacketOut) UnmarshalBinary

func (p *PacketOut) UnmarshalBinary(data []byte) (err error)

type PacketTypeField

type PacketTypeField struct {
	Namespace uint16
	NsType    uint16
}

PACKET_TYPE field

func (*PacketTypeField) Len

func (f *PacketTypeField) Len() uint16

func (*PacketTypeField) MarshalBinary

func (f *PacketTypeField) MarshalBinary() (data []byte, err error)

func (*PacketTypeField) UnmarshalBinary

func (f *PacketTypeField) UnmarshalBinary(data []byte) error

type PbbIsidField

type PbbIsidField struct {
	PbbIsid uint32
}

PBB_ISID FIELD

func (*PbbIsidField) Len

func (m *PbbIsidField) Len() uint16

func (*PbbIsidField) MarshalBinary

func (m *PbbIsidField) MarshalBinary() (data []byte, err error)

func (*PbbIsidField) UnmarshalBinary

func (m *PbbIsidField) UnmarshalBinary(data []byte) error

type Port

type Port struct {
	PortNo uint32
	Length uint16
	Pad    []byte // 2 bytes
	HWAddr net.HardwareAddr

	Name []byte // Size 16

	Config     uint32
	State      uint32
	Properties []util.Message
	// contains filtered or unexported fields
}

ofp_port

func NewPort

func NewPort(num uint32) *Port

func (*Port) Len

func (p *Port) Len() (n uint16)

func (*Port) MarshalBinary

func (p *Port) MarshalBinary() (data []byte, err error)

func (*Port) UnmarshalBinary

func (p *Port) UnmarshalBinary(data []byte) (err error)

type PortDescPropEthernet

type PortDescPropEthernet struct {
	Header     PropHeader
	Pad        []byte // 4 bytes
	Curr       uint32
	Advertised uint32
	Supported  uint32
	Peer       uint32
	CurrSpeed  uint32
	MaxSpeed   uint32
}

ofp_port_desc_prop_ethernet

func NewPortDescPropEthernet

func NewPortDescPropEthernet() *PortDescPropEthernet

func (*PortDescPropEthernet) Len

func (prop *PortDescPropEthernet) Len() uint16

func (*PortDescPropEthernet) MarshalBinary

func (prop *PortDescPropEthernet) MarshalBinary() (data []byte, err error)

func (*PortDescPropEthernet) UnmarshalBinary

func (prop *PortDescPropEthernet) UnmarshalBinary(data []byte) (err error)

type PortDescPropOptical

type PortDescPropOptical struct {
	Header         PropHeader
	Pad            []byte // 4 bytes
	Supported      uint32
	TxMinFreqLmda  uint32
	TxMaxFreqLmda  uint32
	TxGridFreqLmda uint32
	RxMinFreqLmda  uint32
	RxMaxFreqLmda  uint32
	RxGridFreqLmda uint32
	TxPwrMin       uint16
	TxPwrMax       uint16
}

ofp_port_desc_prop_optical

func NewPortDescPropOptical

func NewPortDescPropOptical() *PortDescPropOptical

func (*PortDescPropOptical) Len

func (prop *PortDescPropOptical) Len() uint16

func (*PortDescPropOptical) MarshalBinary

func (prop *PortDescPropOptical) MarshalBinary() (data []byte, err error)

func (*PortDescPropOptical) UnmarshalBinary

func (prop *PortDescPropOptical) UnmarshalBinary(data []byte) (err error)

type PortDescPropOxm

type PortDescPropOxm struct {
	Header PropHeader
	OxmIds []uint32
}

ofp_port_desc_prop_oxm

func NewPortDescPropOxm

func NewPortDescPropOxm(t uint16) *PortDescPropOxm

func (*PortDescPropOxm) Len

func (prop *PortDescPropOxm) Len() uint16

func (*PortDescPropOxm) MarshalBinary

func (prop *PortDescPropOxm) MarshalBinary() (data []byte, err error)

func (*PortDescPropOxm) UnmarshalBinary

func (prop *PortDescPropOxm) UnmarshalBinary(data []byte) (err error)

type PortDescPropRecirculate

type PortDescPropRecirculate struct {
	Header  PropHeader
	PortNos []uint32
}

ofp_port_desc_prop_recirculate

func NewPortDescPropRecirculate

func NewPortDescPropRecirculate() *PortDescPropRecirculate

func (*PortDescPropRecirculate) Len

func (prop *PortDescPropRecirculate) Len() uint16

func (*PortDescPropRecirculate) MarshalBinary

func (prop *PortDescPropRecirculate) MarshalBinary() (data []byte, err error)

func (*PortDescPropRecirculate) UnmarshalBinary

func (prop *PortDescPropRecirculate) UnmarshalBinary(data []byte) (err error)

type PortField

type PortField struct {
	Port uint16
}

Common struct for all port fields

func NewPortField

func NewPortField(port uint16) *PortField

func (*PortField) Len

func (m *PortField) Len() uint16

func (*PortField) MarshalBinary

func (m *PortField) MarshalBinary() (data []byte, err error)

func (*PortField) UnmarshalBinary

func (m *PortField) UnmarshalBinary(data []byte) error

type PortMod

type PortMod struct {
	common.Header
	PortNo uint32

	HWAddr []uint8 // 6 bytes

	Config     uint32
	Mask       uint32
	Properties []util.Message
	// contains filtered or unexported fields
}

ofp_port_mod 1.5

func NewPortMod

func NewPortMod(port int) *PortMod

func (*PortMod) Len

func (p *PortMod) Len() (n uint16)

func (*PortMod) MarshalBinary

func (p *PortMod) MarshalBinary() (data []byte, err error)

func (*PortMod) UnmarshalBinary

func (p *PortMod) UnmarshalBinary(data []byte) (err error)

type PortModPropEthernet

type PortModPropEthernet struct {
	Header    PropHeader
	Advertise uint32
}

ofp_port_mod_prop_ethernet

func NewPortModPropEthernet

func NewPortModPropEthernet(adv uint32) *PortModPropEthernet

func (*PortModPropEthernet) Len

func (prop *PortModPropEthernet) Len() uint16

func (*PortModPropEthernet) MarshalBinary

func (prop *PortModPropEthernet) MarshalBinary() (data []byte, err error)

func (*PortModPropEthernet) UnmarshalBinary

func (prop *PortModPropEthernet) UnmarshalBinary(data []byte) (err error)

type PortModPropOptical

type PortModPropOptical struct {
	Header    PropHeader
	Configure uint32
	FreqLmda  uint32
	FlOffset  uint32
	GridSpan  uint32
	TxPwr     uint32
}

ofp_port_mod_prop_optical

func NewPortModPropOptical

func NewPortModPropOptical(conf, freq, flof, grid, txpwr uint32) *PortModPropOptical

func (*PortModPropOptical) Len

func (prop *PortModPropOptical) Len() uint16

func (*PortModPropOptical) MarshalBinary

func (prop *PortModPropOptical) MarshalBinary() (data []byte, err error)

func (*PortModPropOptical) UnmarshalBinary

func (prop *PortModPropOptical) UnmarshalBinary(data []byte) (err error)

type PortMultipartRequest

type PortMultipartRequest struct {
	PortNo uint32
	Pad    []byte // 4 bytes
}

ofp_port_multipart_request

func NewPortMultipartRequest

func NewPortMultipartRequest(num uint32) *PortMultipartRequest

func (*PortMultipartRequest) Len

func (p *PortMultipartRequest) Len() uint16

func (*PortMultipartRequest) MarshalBinary

func (p *PortMultipartRequest) MarshalBinary() (data []byte, err error)

func (*PortMultipartRequest) UnmarshalBinary

func (p *PortMultipartRequest) UnmarshalBinary(data []byte) (err error)

type PortMultipartRequst

type PortMultipartRequst struct {
	PortNo uint32
	// contains filtered or unexported fields
}

ofp_port_multipart_request

func NewPortStatsRequest

func NewPortStatsRequest(port uint32) *PortMultipartRequst

func (*PortMultipartRequst) Len

func (s *PortMultipartRequst) Len() (n uint16)

func (*PortMultipartRequst) MarshalBinary

func (s *PortMultipartRequst) MarshalBinary() (data []byte, err error)

func (*PortMultipartRequst) UnmarshalBinary

func (s *PortMultipartRequst) UnmarshalBinary(data []byte) error

type PortStats

type PortStats struct {
	Length uint16

	PortNo       uint32
	DurationSec  uint32
	DurationNSec uint32
	RxPackets    uint64
	TxPackets    uint64
	RxBytes      uint64
	TxBytes      uint64
	RxDropped    uint64
	TxDropped    uint64
	RxErrors     uint64
	TxErrors     uint64
	Properties   []util.Message
	// contains filtered or unexported fields
}

ofp_port_stats

func NewPortStats

func NewPortStats(port uint32) *PortStats

func (*PortStats) Len

func (s *PortStats) Len() (n uint16)

func (*PortStats) MarshalBinary

func (s *PortStats) MarshalBinary() (data []byte, err error)

func (*PortStats) UnmarshalBinary

func (s *PortStats) UnmarshalBinary(data []byte) (err error)

type PortStatsPropEthernet

type PortStatsPropEthernet struct {
	Header     PropHeader
	Pad        []byte // 4 bytes
	RxFrameErr uint64
	RxOverErr  uint64
	RxCrcErr   uint64
	Collisions uint64
}

ofp_port_stats_prop_ethernet

func NewPortStatsPropEthernet

func NewPortStatsPropEthernet() *PortStatsPropEthernet

func (*PortStatsPropEthernet) Len

func (prop *PortStatsPropEthernet) Len() uint16

func (*PortStatsPropEthernet) MarshalBinary

func (prop *PortStatsPropEthernet) MarshalBinary() (data []byte, err error)

func (*PortStatsPropEthernet) UnmarshalBinary

func (prop *PortStatsPropEthernet) UnmarshalBinary(data []byte) (err error)

type PortStatsPropOptical

type PortStatsPropOptical struct {
	Header      PropHeader
	Pad         []byte // 4 bytes
	Flags       uint32
	TxFreqLmda  uint32
	TxOffset    uint32
	TxGridSpan  uint32
	RxFreqLmda  uint32
	RxOffset    uint32
	RxGridSpan  uint32
	TxPwr       uint16
	RxPwr       uint16
	BiasCurrent uint16
	Temperature uint16
}

ofp_port_stats_prop_optical

func NewPortStatsPropOptical

func NewPortStatsPropOptical() *PortStatsPropOptical

func (*PortStatsPropOptical) Len

func (prop *PortStatsPropOptical) Len() uint16

func (*PortStatsPropOptical) MarshalBinary

func (prop *PortStatsPropOptical) MarshalBinary() (data []byte, err error)

func (*PortStatsPropOptical) UnmarshalBinary

func (prop *PortStatsPropOptical) UnmarshalBinary(data []byte) (err error)

type PortStatus

type PortStatus struct {
	common.Header
	Reason uint8

	Desc Port
	// contains filtered or unexported fields
}

ofp_port_status

func NewPortStatus

func NewPortStatus() *PortStatus

func (*PortStatus) Len

func (p *PortStatus) Len() (n uint16)

func (*PortStatus) MarshalBinary

func (s *PortStatus) MarshalBinary() (data []byte, err error)

func (*PortStatus) UnmarshalBinary

func (s *PortStatus) UnmarshalBinary(data []byte) error

type PropExperimenter

type PropExperimenter struct {
	Header       PropHeader
	Experimenter uint32
	ExpType      uint32
	Data         []uint32
	Pad          []byte
}

ofp_role_prop_experimenter

func (*PropExperimenter) Len

func (p *PropExperimenter) Len() uint16

func (*PropExperimenter) MarshalBinary

func (p *PropExperimenter) MarshalBinary() (data []byte, err error)

func (*PropExperimenter) UnmarshalBinary

func (p *PropExperimenter) UnmarshalBinary(data []byte) (err error)

type PropHeader

type PropHeader struct {
	Type   uint16
	Length uint16
}

ofp_role_prop_header

func (*PropHeader) Header

func (p *PropHeader) Header() *PropHeader

func (*PropHeader) Len

func (h *PropHeader) Len() uint16

func (*PropHeader) MarshalBinary

func (h *PropHeader) MarshalBinary() (data []byte, err error)

func (*PropHeader) UnmarshalBinary

func (h *PropHeader) UnmarshalBinary(data []byte) (err error)

type Property

type Property interface {
	Header() *PropHeader
	util.Message
}

func DecodeContinuationProp

func DecodeContinuationProp(data []byte) (Property, error)

Decode Continuation Property types.

func DecodeController2Prop

func DecodeController2Prop(data []byte) (Property, error)

Decode Controller2 Property types.

func DecodePacketIn2Prop

func DecodePacketIn2Prop(data []byte) (Property, error)

Decode PacketIn2 Property types.

type QueueDesc

type QueueDesc struct {
	PortNo     uint32
	QueueId    uint32
	Length     uint16
	Pad        []byte // 6 bytes
	Properties []util.Message
}

ofp_queue_desc

func NewQueueDesc

func NewQueueDesc(id uint32) *QueueDesc

func (*QueueDesc) Len

func (q *QueueDesc) Len() uint16

func (*QueueDesc) MarshalBinary

func (q *QueueDesc) MarshalBinary() (data []byte, err error)

func (*QueueDesc) UnmarshalBinary

func (q *QueueDesc) UnmarshalBinary(data []byte) (err error)

type QueueDescPropMaxRate

type QueueDescPropMaxRate = QueueDescPropRate

ofp_queue_desc_prop_max_rate

type QueueDescPropMinRate

type QueueDescPropMinRate = QueueDescPropRate

ofp_queue_desc_prop_min_rate

type QueueDescPropRate

type QueueDescPropRate struct {
	Header PropHeader
	Rate   uint16
	Pad    uint16
}

func NewQueueDescPropMaxRate

func NewQueueDescPropMaxRate() *QueueDescPropRate

func NewQueueDescPropMinRate

func NewQueueDescPropMinRate() *QueueDescPropRate

func (*QueueDescPropRate) Len

func (prop *QueueDescPropRate) Len() uint16

func (*QueueDescPropRate) MarshalBinary

func (prop *QueueDescPropRate) MarshalBinary() (data []byte, err error)

func (*QueueDescPropRate) UnmarshalBinary

func (prop *QueueDescPropRate) UnmarshalBinary(data []byte) (err error)

type QueueMultipartRequest

type QueueMultipartRequest struct {
	PortNo  uint32
	QueueId uint32
}

ofp_queue_multipart_request

func NewQueueStatsRequest

func NewQueueStatsRequest() *QueueMultipartRequest

func (*QueueMultipartRequest) Len

func (s *QueueMultipartRequest) Len() (n uint16)

func (*QueueMultipartRequest) MarshalBinary

func (s *QueueMultipartRequest) MarshalBinary() (data []byte, err error)

func (*QueueMultipartRequest) UnmarshalBinary

func (s *QueueMultipartRequest) UnmarshalBinary(data []byte) error

type QueueStats

type QueueStats struct {
	Length       uint16
	Pad          []byte // 6 bytes
	PortNo       uint32
	QueueId      uint32
	TxBytes      uint64
	TxPackets    uint64
	TxErrors     uint64
	DurationSec  uint32
	DurationNSec uint32
	Properties   []util.Message
}

ofp_queue_stats

func NewQueueStats

func NewQueueStats() *QueueStats

func (*QueueStats) Len

func (s *QueueStats) Len() (n uint16)

func (*QueueStats) MarshalBinary

func (s *QueueStats) MarshalBinary() (data []byte, err error)

func (*QueueStats) UnmarshalBinary

func (s *QueueStats) UnmarshalBinary(data []byte) (err error)

type RequestForward

type RequestForward struct {
	common.Header
	Request common.Header
}

func NewRequestForward

func NewRequestForward() *RequestForward

func (*RequestForward) Len

func (r *RequestForward) Len() uint16

func (*RequestForward) MarshalBinary

func (r *RequestForward) MarshalBinary() (data []byte, err error)

func (*RequestForward) UnmarshalBinary

func (r *RequestForward) UnmarshalBinary(data []byte) (err error)

type Resume

type Resume struct {
	Props []Property
}

func (*Resume) Len

func (p *Resume) Len() (n uint16)

func (*Resume) MarshalBinary

func (p *Resume) MarshalBinary() (data []byte, err error)

func (*Resume) UnmarshalBinary

func (p *Resume) UnmarshalBinary(data []byte) error

type RoleReply

type RoleReply = RoleRequest

func NewRoleReply

func NewRoleReply() *RoleReply

type RoleRequest

type RoleRequest struct {
	common.Header
	Role    uint32
	Shortid uint16

	GenerationId uint64
	// contains filtered or unexported fields
}

ofp_role_request

func NewRoleRequest

func NewRoleRequest() *RoleRequest

func (*RoleRequest) Len

func (m *RoleRequest) Len() uint16

func (*RoleRequest) MarshalBinary

func (m *RoleRequest) MarshalBinary() (data []byte, err error)

func (*RoleRequest) UnmarshalBinary

func (m *RoleRequest) UnmarshalBinary(data []byte) (err error)

type RoleStatus

type RoleStatus struct {
	common.Header
	Role         uint32
	Reason       uint8
	Pad          []byte // 3 bytes
	GenerationId uint64
	Properties   []util.Message
}

ofp_role_status

func NewRoleStatus

func NewRoleStatus() *RoleStatus

func (*RoleStatus) Len

func (r *RoleStatus) Len() uint16

func (*RoleStatus) MarshalBinary

func (r *RoleStatus) MarshalBinary() (data []byte, err error)

func (*RoleStatus) UnmarshalBinary

func (r *RoleStatus) UnmarshalBinary(data []byte) (err error)

type SetAsync

type SetAsync = Async_Config

func NewSetAsync

func NewSetAsync() *SetAsync

type SetFieldPacketTypes

type SetFieldPacketTypes struct {
	OFTablePropertyHeader
	OXMs []uint32
}

func (*SetFieldPacketTypes) Len

func (p *SetFieldPacketTypes) Len() uint16

func (*SetFieldPacketTypes) MarshalBinary

func (p *SetFieldPacketTypes) MarshalBinary() (data []byte, err error)

func (*SetFieldPacketTypes) UnmarshalBinary

func (p *SetFieldPacketTypes) UnmarshalBinary(data []byte) error

type SetFieldProperty

type SetFieldProperty struct {
	OFTablePropertyHeader
	IDs []uint32
}

func NewSetFieldProperty

func NewSetFieldProperty(Type uint16) *SetFieldProperty

Type could be: * TFPT_MATCH * TFPT_WILDCARDS * TFPT_WRITE_SETFIELD * TFPT_WRITE_SETFIELD_MISS * TFPT_APPLY_SETFIELD * TFPT_APPLY_SETFIELD_MISS * TFPT_WRITE_COPYFIELD * TFPT_WRITE_COPYFIELD_MISS * TFPT_APPLY_COPYFIELD * TFPT_APPLY_COPYFIELD_MISS

func (*SetFieldProperty) Len

func (p *SetFieldProperty) Len() uint16

func (*SetFieldProperty) MarshalBinary

func (p *SetFieldProperty) MarshalBinary() (data []byte, err error)

func (*SetFieldProperty) UnmarshalBinary

func (p *SetFieldProperty) UnmarshalBinary(data []byte) error

type Stats

type Stats struct {
	Reserved uint16 /* Reserved for future use, currently zeroed. */
	Length   uint16 /* Length of ofp_stats (excluding padding) */
	/* Followed by:
	 * - Exactly (length - 4) (possibly 0) bytes containing OXS TLVs, then
	 * - Exactly ((length + 7)/8*8 - length) (between 0 and 7) bytes of
	 * all-zero bytes
	 * In summary, ofp_stats is padded as needed, to make its overall size
	 * a multiple of 8, to preserve alignement in structures using it.
	 */
	Fields []util.Message
	Pad    uint32 /* Zero bytes - see above for sizing */
}

ofp_stats

func NewStats

func NewStats() *Stats

func (*Stats) AddField

func (s *Stats) AddField(f util.Message)

func (*Stats) Len

func (s *Stats) Len() (n uint16)

func (*Stats) MarshalBinary

func (s *Stats) MarshalBinary() (data []byte, err error)

func (*Stats) UnmarshalBinary

func (s *Stats) UnmarshalBinary(data []byte) (err error)

type SwitchConfig

type SwitchConfig struct {
	common.Header
	Flags       uint16 // OFPC_* flags
	MissSendLen uint16
}

ofp_switch_config 1.5

func NewGetConfigReply

func NewGetConfigReply() *SwitchConfig

func NewSetConfig

func NewSetConfig() *SwitchConfig

func (*SwitchConfig) Len

func (c *SwitchConfig) Len() (n uint16)

func (*SwitchConfig) MarshalBinary

func (c *SwitchConfig) MarshalBinary() (data []byte, err error)

func (*SwitchConfig) UnmarshalBinary

func (c *SwitchConfig) UnmarshalBinary(data []byte) error

type SwitchFeatures

type SwitchFeatures struct {
	common.Header
	DPID       net.HardwareAddr // Size 8
	Buffers    uint32
	NumTables  uint8
	AuxilaryId uint8

	Capabilities uint32
	Reserved     uint32
	// contains filtered or unexported fields
}

ofp_switch_features

func NewFeaturesReply

func NewFeaturesReply() *SwitchFeatures

FeaturesReply constructor

func (*SwitchFeatures) Len

func (s *SwitchFeatures) Len() (n uint16)

func (*SwitchFeatures) MarshalBinary

func (s *SwitchFeatures) MarshalBinary() (data []byte, err error)

func (*SwitchFeatures) UnmarshalBinary

func (s *SwitchFeatures) UnmarshalBinary(data []byte) error

type TLVTableMap

type TLVTableMap struct {
	OptClass  uint16
	OptType   uint8
	OptLength uint8
	Index     uint16
	// contains filtered or unexported fields
}

func (*TLVTableMap) Len

func (t *TLVTableMap) Len() uint16

func (*TLVTableMap) MarshalBinary

func (t *TLVTableMap) MarshalBinary() (data []byte, err error)

func (*TLVTableMap) UnmarshalBinary

func (t *TLVTableMap) UnmarshalBinary(data []byte) error

type TLVTableMod

type TLVTableMod struct {
	Command uint16

	TlvMaps []*TLVTableMap
	// contains filtered or unexported fields
}

func NewTLVTableMod

func NewTLVTableMod(command uint16, tlvMaps []*TLVTableMap) *TLVTableMod

func (*TLVTableMod) Len

func (t *TLVTableMod) Len() uint16

func (*TLVTableMod) MarshalBinary

func (t *TLVTableMod) MarshalBinary() (data []byte, err error)

func (*TLVTableMod) UnmarshalBinary

func (t *TLVTableMod) UnmarshalBinary(data []byte) error

type TLVTableReply

type TLVTableReply struct {
	MaxSpace  uint32
	MaxFields uint16

	TlvMaps []*TLVTableMap
	// contains filtered or unexported fields
}

func (*TLVTableReply) Len

func (t *TLVTableReply) Len() uint16

func (*TLVTableReply) MarshalBinary

func (t *TLVTableReply) MarshalBinary() (data []byte, err error)

func (*TLVTableReply) UnmarshalBinary

func (t *TLVTableReply) UnmarshalBinary(data []byte) error

type TableDesc

type TableDesc struct {
	Length     uint16
	TableId    uint8
	Pad        uint8
	Config     uint32
	Properties []util.Message
}

ofp_table_desc

func NewTableDesc

func NewTableDesc(id uint8) *TableDesc

func (*TableDesc) Len

func (t *TableDesc) Len() uint16

func (*TableDesc) MarshalBinary

func (t *TableDesc) MarshalBinary() (data []byte, err error)

func (*TableDesc) UnmarshalBinary

func (t *TableDesc) UnmarshalBinary(data []byte) (err error)

type TableExperimenterProperty

type TableExperimenterProperty struct {
	OFTablePropertyHeader
	Experimenter     uint32
	ExperimenterType uint32
	ExperimenterData []uint32
}

func NewTableExperimenterProperty

func NewTableExperimenterProperty(Type uint16) *TableExperimenterProperty

Type could be: * TFPT_EXPERIMENTER * TFPT_EXPERIMENTER_MISS

func (*TableExperimenterProperty) Len

func (*TableExperimenterProperty) MarshalBinary

func (p *TableExperimenterProperty) MarshalBinary() (data []byte, err error)

func (*TableExperimenterProperty) UnmarshalBinary

func (p *TableExperimenterProperty) UnmarshalBinary(data []byte) error

type TableFeatures

type TableFeatures struct {
	Length        uint16
	TableID       uint8
	Command       uint8
	Features      uint32
	Name          []byte // MAX_TABLE_NAME_LEN
	MetadataMatch uint64
	MetadataWrite uint64
	Capabilities  uint32
	MaxEntries    uint32
	Properties    []util.Message
}

ofp_table_features

func NewTableFeatures

func NewTableFeatures(t uint8) *TableFeatures

func (*TableFeatures) Len

func (f *TableFeatures) Len() uint16

func (*TableFeatures) MarshalBinary

func (f *TableFeatures) MarshalBinary() (data []byte, err error)

func (*TableFeatures) UnmarshalBinary

func (f *TableFeatures) UnmarshalBinary(data []byte) error

type TableMod

type TableMod struct {
	common.Header
	TableId    uint8
	Pad        []byte // 3 bytes
	Config     uint32
	Properties []util.Message
}

ofp_table_mod

func NewTableMod

func NewTableMod() *TableMod

func (*TableMod) Len

func (t *TableMod) Len() uint16

func (*TableMod) MarshalBinary

func (t *TableMod) MarshalBinary() (data []byte, err error)

func (*TableMod) UnmarshalBinary

func (t *TableMod) UnmarshalBinary(data []byte) (err error)

type TableModPropEviction

type TableModPropEviction struct {
	Header PropHeader
	Flags  uint32
}

ofp_table_mod_prop_eviction

func NewTableModPropEviction

func NewTableModPropEviction() *TableModPropEviction

func (*TableModPropEviction) Len

func (t *TableModPropEviction) Len() uint16

func (*TableModPropEviction) MarshalBinary

func (t *TableModPropEviction) MarshalBinary() (data []byte, err error)

func (*TableModPropEviction) UnmarshalBinary

func (t *TableModPropEviction) UnmarshalBinary(data []byte) (err error)

type TableModPropVacancy

type TableModPropVacancy struct {
	Header      PropHeader
	VacancyDown uint8
	VacancyUp   uint8
	Vacancy     uint8
	Pad         uint8
}

ofp_table_mod_prop_vacancy

func NewTableModPropVacancy

func NewTableModPropVacancy() *TableModPropVacancy

func (*TableModPropVacancy) Len

func (t *TableModPropVacancy) Len() uint16

func (*TableModPropVacancy) MarshalBinary

func (t *TableModPropVacancy) MarshalBinary() (data []byte, err error)

func (*TableModPropVacancy) UnmarshalBinary

func (t *TableModPropVacancy) UnmarshalBinary(data []byte) (err error)

type TableStats

type TableStats struct {
	TableId uint8

	ActiveCount  uint32
	LookupCount  uint64
	MatchedCount uint64
	// contains filtered or unexported fields
}

ofp_table_stats

func NewTableStats

func NewTableStats() *TableStats

func (*TableStats) Len

func (s *TableStats) Len() (n uint16)

func (*TableStats) MarshalBinary

func (s *TableStats) MarshalBinary() (data []byte, err error)

func (*TableStats) UnmarshalBinary

func (s *TableStats) UnmarshalBinary(data []byte) error

type TableStatus

type TableStatus struct {
	common.Header
	Reason uint8
	Pad    []byte // 7 bytes
	Table  TableDesc
}

func NewTableStatus

func NewTableStatus() *TableStatus

func (*TableStatus) Len

func (t *TableStatus) Len() uint16

func (*TableStatus) MarshalBinary

func (t *TableStatus) MarshalBinary() (data []byte, err error)

func (*TableStatus) UnmarshalBinary

func (t *TableStatus) UnmarshalBinary(data []byte) (err error)

type TcpFlagsField

type TcpFlagsField struct {
	TcpFlags uint16
}

Tcp flags field

func (*TcpFlagsField) Len

func (m *TcpFlagsField) Len() uint16

func (*TcpFlagsField) MarshalBinary

func (m *TcpFlagsField) MarshalBinary() (data []byte, err error)

func (*TcpFlagsField) UnmarshalBinary

func (m *TcpFlagsField) UnmarshalBinary(data []byte) error

type TimeStatField

type TimeStatField struct {
	Header OXSStatHeader
	Sec    uint32
	NSec   uint32
}

type XST_OFB_DURATION or XST_OFB_IDLE_TIME

func (*TimeStatField) Len

func (f *TimeStatField) Len() (n uint16)

func (*TimeStatField) MarshalBinary

func (f *TimeStatField) MarshalBinary() (data []byte, err error)

func (*TimeStatField) UnmarshalBinary

func (f *TimeStatField) UnmarshalBinary(data []byte) (err error)

type TtlField

type TtlField struct {
	Ttl uint8
}

func (*TtlField) Len

func (m *TtlField) Len() uint16

func (*TtlField) MarshalBinary

func (m *TtlField) MarshalBinary() (data []byte, err error)

func (*TtlField) UnmarshalBinary

func (m *TtlField) UnmarshalBinary(data []byte) error

type TunnelIdField

type TunnelIdField struct {
	TunnelId uint64
}

TUNNEL_ID field

func (*TunnelIdField) Len

func (m *TunnelIdField) Len() uint16

func (*TunnelIdField) MarshalBinary

func (m *TunnelIdField) MarshalBinary() (data []byte, err error)

func (*TunnelIdField) UnmarshalBinary

func (m *TunnelIdField) UnmarshalBinary(data []byte) error

type TunnelIpv4DstField

type TunnelIpv4DstField struct {
	TunnelIpv4Dst net.IP
}

Tunnel IPv4 Dst field

func (*TunnelIpv4DstField) Len

func (m *TunnelIpv4DstField) Len() uint16

func (*TunnelIpv4DstField) MarshalBinary

func (m *TunnelIpv4DstField) MarshalBinary() (data []byte, err error)

func (*TunnelIpv4DstField) UnmarshalBinary

func (m *TunnelIpv4DstField) UnmarshalBinary(data []byte) error

type TunnelIpv4SrcField

type TunnelIpv4SrcField struct {
	TunnelIpv4Src net.IP
}

Tunnel IPv4 Src field

func (*TunnelIpv4SrcField) Len

func (m *TunnelIpv4SrcField) Len() uint16

func (*TunnelIpv4SrcField) MarshalBinary

func (m *TunnelIpv4SrcField) MarshalBinary() (data []byte, err error)

func (*TunnelIpv4SrcField) UnmarshalBinary

func (m *TunnelIpv4SrcField) UnmarshalBinary(data []byte) error

type Uint16Message

type Uint16Message struct {
	Data uint16
}

func (*Uint16Message) Len

func (m *Uint16Message) Len() uint16

func (*Uint16Message) MarshalBinary

func (m *Uint16Message) MarshalBinary() (data []byte, err error)

func (*Uint16Message) UnmarshalBinary

func (m *Uint16Message) UnmarshalBinary(data []byte) error

type Uint32Message

type Uint32Message struct {
	Data uint32
}

func (*Uint32Message) Len

func (m *Uint32Message) Len() uint16

func (*Uint32Message) MarshalBinary

func (m *Uint32Message) MarshalBinary() (data []byte, err error)

func (*Uint32Message) UnmarshalBinary

func (m *Uint32Message) UnmarshalBinary(data []byte) error

type VendorError

type VendorError struct {
	*ErrorMsg
	ExperimenterID uint32
}

func NewBundleError

func NewBundleError() *VendorError

func (*VendorError) Len

func (e *VendorError) Len() uint16

func (*VendorError) MarshalBinary

func (e *VendorError) MarshalBinary() (data []byte, err error)

func (*VendorError) UnmarshalBinary

func (e *VendorError) UnmarshalBinary(data []byte) error

type VendorHeader

type VendorHeader struct {
	Header           common.Header /*Type OFPT_VENDOR*/
	Vendor           uint32
	ExperimenterType uint32
	VendorData       util.Message
}

ofp_vendor 1.5

func NewBundleAdd

func NewBundleAdd(bundleAdd *BundleAdd) *VendorHeader

func NewBundleControl

func NewBundleControl(bundleControl *BundleControl) *VendorHeader

func NewNXTVendorHeader

func NewNXTVendorHeader(msgType uint32) *VendorHeader

func NewPacketIn2

func NewPacketIn2(props []Property) *VendorHeader

func NewResume

func NewResume(props []Property) *VendorHeader

func NewSetControllerID

func NewSetControllerID(id uint16) *VendorHeader

func NewSetPacketInFormet

func NewSetPacketInFormet(format uint32) *VendorHeader

func NewTLVTableModMessage

func NewTLVTableModMessage(tlvMod *TLVTableMod) *VendorHeader

func NewTLVTableRequest

func NewTLVTableRequest() *VendorHeader

func (*VendorHeader) Len

func (v *VendorHeader) Len() (n uint16)

func (*VendorHeader) MarshalBinary

func (v *VendorHeader) MarshalBinary() (data []byte, err error)

func (*VendorHeader) UnmarshalBinary

func (v *VendorHeader) UnmarshalBinary(data []byte) error

type VlanIdField

type VlanIdField struct {
	VlanId uint16
}

VLAN_ID field

func (*VlanIdField) Len

func (m *VlanIdField) Len() uint16

func (*VlanIdField) MarshalBinary

func (m *VlanIdField) MarshalBinary() (data []byte, err error)

func (*VlanIdField) UnmarshalBinary

func (m *VlanIdField) UnmarshalBinary(data []byte) error

type VlanPcpField

type VlanPcpField struct {
	VlanPcp uint8
}

VLAN_PCP field

func (*VlanPcpField) Len

func (m *VlanPcpField) Len() uint16

func (*VlanPcpField) MarshalBinary

func (m *VlanPcpField) MarshalBinary() (data []byte, err error)

func (*VlanPcpField) UnmarshalBinary

func (m *VlanPcpField) UnmarshalBinary(data []byte) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL