Initial import
LoxiGen is the work of several developers, not just myself.
diff --git a/openflow_input/bsn_get_interfaces b/openflow_input/bsn_get_interfaces
new file mode 100644
index 0000000..90060ee
--- /dev/null
+++ b/openflow_input/bsn_get_interfaces
@@ -0,0 +1,55 @@
+// Copyright 2013, Big Switch Networks, Inc.
+//
+// LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
+// the following special exception:
+//
+// LOXI Exception
+//
+// As a special exception to the terms of the EPL, you may distribute libraries
+// generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
+// that copyright and licensing notices generated by LoxiGen are not altered or removed
+// from the LoxiGen Libraries and the notice provided below is (i) included in
+// the LoxiGen Libraries, if distributed in source code form and (ii) included in any
+// documentation for the LoxiGen Libraries, if distributed in binary form.
+//
+// Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
+//
+// You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
+// a copy of the EPL at:
+//
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// EPL for the specific language governing permissions and limitations
+// under the EPL.
+
+#version any
+
+struct ofp_bsn_get_interfaces_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
+ uint32_t subtype; // BSN_GET_INTERFACES_REQUEST
+};
+
+struct ofp_bsn_interface {
+ of_mac_addr_t hw_addr;
+ uint16_t pad;
+ of_port_name_t name;
+ uint32_t ipv4_addr;
+ uint32_t ipv4_netmask;
+};
+
+struct ofp_bsn_get_interfaces_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
+ uint32_t subtype; // BSN_GET_INTERFACES_REQUEST
+ list(of_bsn_interface_t) interfaces;
+};
diff --git a/openflow_input/bsn_ip_mask b/openflow_input/bsn_ip_mask
new file mode 100644
index 0000000..03f233b
--- /dev/null
+++ b/openflow_input/bsn_ip_mask
@@ -0,0 +1,63 @@
+// Copyright 2013, Big Switch Networks, Inc.
+//
+// LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
+// the following special exception:
+//
+// LOXI Exception
+//
+// As a special exception to the terms of the EPL, you may distribute libraries
+// generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
+// that copyright and licensing notices generated by LoxiGen are not altered or removed
+// from the LoxiGen Libraries and the notice provided below is (i) included in
+// the LoxiGen Libraries, if distributed in source code form and (ii) included in any
+// documentation for the LoxiGen Libraries, if distributed in binary form.
+//
+// Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
+//
+// You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
+// a copy of the EPL at:
+//
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// EPL for the specific language governing permissions and limitations
+// under the EPL.
+
+#version 1
+
+struct ofp_bsn_set_ip_mask {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter; // bsn 0x005c16c7,
+ uint32_t subtype; // 0
+ uint8_t index;
+ uint8_t[3] pad;
+ uint32_t mask;
+};
+
+struct ofp_bsn_get_ip_mask_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter; // bsn 0x005c16c7,
+ uint32_t subtype; // 1
+ uint8_t index;
+ uint8_t[7] pad;
+};
+
+struct ofp_bsn_get_ip_mask_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter; // bsn 0x005c16c7,
+ uint32_t subtype; // 2
+ uint8_t index;
+ uint8_t[3] pad;
+ uint32_t mask;
+};
diff --git a/openflow_input/bsn_mirror b/openflow_input/bsn_mirror
new file mode 100644
index 0000000..c873595
--- /dev/null
+++ b/openflow_input/bsn_mirror
@@ -0,0 +1,74 @@
+// Copyright 2013, Big Switch Networks, Inc.
+//
+// LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
+// the following special exception:
+//
+// LOXI Exception
+//
+// As a special exception to the terms of the EPL, you may distribute libraries
+// generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
+// that copyright and licensing notices generated by LoxiGen are not altered or removed
+// from the LoxiGen Libraries and the notice provided below is (i) included in
+// the LoxiGen Libraries, if distributed in source code form and (ii) included in any
+// documentation for the LoxiGen Libraries, if distributed in binary form.
+//
+// Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
+//
+// You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
+// a copy of the EPL at:
+//
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// EPL for the specific language governing permissions and limitations
+// under the EPL.
+
+#version any
+
+// BSN mirror action
+struct ofp_action_bsn_mirror {
+ uint16_t type; // OF_ACTION_TYPE_EXPERIMENTER
+ uint16_t len;
+ uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
+ uint32_t subtype; // ACTION_BSN_MIRROR
+ uint32_t dest_port; // mirror destination port
+ uint32_t vlan_tag; // VLAN tag for mirrored packet (TPID+TCI) (0 == none)
+ uint8_t copy_stage; // 0 == ingress, 1 == egress
+ uint8_t[3] pad;
+};
+
+// BSN mirroring messages
+struct ofp_bsn_set_mirroring {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
+ uint32_t subtype; // BSN_MIRRORING_SET
+ uint8_t report_mirror_ports;
+ uint8_t[3] pad;
+};
+
+struct ofp_bsn_get_mirroring_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
+ uint32_t subtype; // BSN_MIRRORING_GET_REQUEST
+ uint8_t report_mirror_ports;
+ uint8_t[3] pad;
+};
+
+struct ofp_bsn_get_mirroring_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
+ uint32_t subtype; // BSN_MIRRORING_GET_REPLY
+ uint8_t report_mirror_ports;
+ uint8_t[3] pad;
+};
diff --git a/openflow_input/bsn_set_tunnel_dst b/openflow_input/bsn_set_tunnel_dst
new file mode 100644
index 0000000..6b16d96
--- /dev/null
+++ b/openflow_input/bsn_set_tunnel_dst
@@ -0,0 +1,37 @@
+// Copyright 2013, Big Switch Networks, Inc.
+//
+// LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
+// the following special exception:
+//
+// LOXI Exception
+//
+// As a special exception to the terms of the EPL, you may distribute libraries
+// generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
+// that copyright and licensing notices generated by LoxiGen are not altered or removed
+// from the LoxiGen Libraries and the notice provided below is (i) included in
+// the LoxiGen Libraries, if distributed in source code form and (ii) included in any
+// documentation for the LoxiGen Libraries, if distributed in binary form.
+//
+// Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
+//
+// You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
+// a copy of the EPL at:
+//
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// EPL for the specific language governing permissions and limitations
+// under the EPL.
+
+#version any
+
+// BSN set tunnel destination IP action
+struct ofp_action_bsn_set_tunnel_dst {
+ uint16_t type; // OF_ACTION_TYPE_EXPERIMENTER
+ uint16_t len;
+ uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
+ uint32_t subtype; // ACTION_BSN_SET_TUNNEL_DST
+ uint32_t dst; // tunnel destination IP
+};
diff --git a/openflow_input/bsn_shell b/openflow_input/bsn_shell
new file mode 100644
index 0000000..ea85571
--- /dev/null
+++ b/openflow_input/bsn_shell
@@ -0,0 +1,59 @@
+// Copyright 2013, Big Switch Networks, Inc.
+//
+// LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
+// the following special exception:
+//
+// LOXI Exception
+//
+// As a special exception to the terms of the EPL, you may distribute libraries
+// generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
+// that copyright and licensing notices generated by LoxiGen are not altered or removed
+// from the LoxiGen Libraries and the notice provided below is (i) included in
+// the LoxiGen Libraries, if distributed in source code form and (ii) included in any
+// documentation for the LoxiGen Libraries, if distributed in binary form.
+//
+// Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
+//
+// You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
+// a copy of the EPL at:
+//
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// EPL for the specific language governing permissions and limitations
+// under the EPL.
+
+#version 1
+
+struct ofp_bsn_shell_command {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
+ uint32_t subtype; // BSN_SHELL_COMMAND
+ uint32_t service;
+ of_octets_t data;
+};
+
+struct ofp_bsn_shell_output {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
+ uint32_t subtype; // BSN_SHELL_OUTPUT
+ of_octets_t data;
+};
+
+struct ofp_bsn_shell_status {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter; // OF_EXPERIMENTER_ID_BSN
+ uint32_t subtype; // BSN_SHELL_STATUS
+ uint32_t status;
+};
diff --git a/openflow_input/bsn_table_mod b/openflow_input/bsn_table_mod
new file mode 100644
index 0000000..418c716
--- /dev/null
+++ b/openflow_input/bsn_table_mod
@@ -0,0 +1,40 @@
+// Copyright 2013, Big Switch Networks, Inc.
+//
+// LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
+// the following special exception:
+//
+// LOXI Exception
+//
+// As a special exception to the terms of the EPL, you may distribute libraries
+// generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
+// that copyright and licensing notices generated by LoxiGen are not altered or removed
+// from the LoxiGen Libraries and the notice provided below is (i) included in
+// the LoxiGen Libraries, if distributed in source code form and (ii) included in any
+// documentation for the LoxiGen Libraries, if distributed in binary form.
+//
+// Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
+//
+// You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
+// a copy of the EPL at:
+//
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// EPL for the specific language governing permissions and limitations
+// under the EPL.
+
+#version 1
+
+// This is the 1.1+ table mod message which we back port to 1.0
+// for use inside components
+struct ofp_table_mod {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint8_t table_id;
+ uint8_t[3] pad;
+ uint32_t config;
+};
diff --git a/openflow_input/nicira_dec_ttl b/openflow_input/nicira_dec_ttl
new file mode 100644
index 0000000..b507d57
--- /dev/null
+++ b/openflow_input/nicira_dec_ttl
@@ -0,0 +1,37 @@
+// Copyright 2013, Big Switch Networks, Inc.
+//
+// LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
+// the following special exception:
+//
+// LOXI Exception
+//
+// As a special exception to the terms of the EPL, you may distribute libraries
+// generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
+// that copyright and licensing notices generated by LoxiGen are not altered or removed
+// from the LoxiGen Libraries and the notice provided below is (i) included in
+// the LoxiGen Libraries, if distributed in source code form and (ii) included in any
+// documentation for the LoxiGen Libraries, if distributed in binary form.
+//
+// Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
+//
+// You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
+// a copy of the EPL at:
+//
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// EPL for the specific language governing permissions and limitations
+// under the EPL.
+
+#version any
+
+struct ofp_action_nicira_dec_ttl {
+ uint16_t type; // OF_ACTION_TYPE_EXPERIMENTER
+ uint16_t len;
+ uint32_t experimenter; // OF_EXPERIMENTER_ID_NICIRA
+ uint16_t subtype; // 18
+ uint16_t pad;
+ uint32_t pad2;
+};
diff --git a/openflow_input/nicira_role b/openflow_input/nicira_role
new file mode 100644
index 0000000..06d7c7f
--- /dev/null
+++ b/openflow_input/nicira_role
@@ -0,0 +1,48 @@
+// Copyright 2013, Big Switch Networks, Inc.
+//
+// LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
+// the following special exception:
+//
+// LOXI Exception
+//
+// As a special exception to the terms of the EPL, you may distribute libraries
+// generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
+// that copyright and licensing notices generated by LoxiGen are not altered or removed
+// from the LoxiGen Libraries and the notice provided below is (i) included in
+// the LoxiGen Libraries, if distributed in source code form and (ii) included in any
+// documentation for the LoxiGen Libraries, if distributed in binary form.
+//
+// Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
+//
+// You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
+// a copy of the EPL at:
+//
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// EPL for the specific language governing permissions and limitations
+// under the EPL.
+
+#version 1
+
+struct ofp_nicira_controller_role_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter; // OF_EXPERIMENTER_ID_NICIRA 0x00002320
+ uint32_t subtype; // 10
+ uint32_t role; // 0 other, 1 master, 2 slave
+};
+
+struct ofp_nicira_controller_role_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter; // OF_EXPERIMENTER_ID_NICIRA 0x00002320
+ uint32_t subtype; // 11
+ uint32_t role; // 0 other, 1 master, 2 slave
+};
diff --git a/openflow_input/standard-1.0 b/openflow_input/standard-1.0
new file mode 100644
index 0000000..943d840
--- /dev/null
+++ b/openflow_input/standard-1.0
@@ -0,0 +1,669 @@
+// Copyright 2013, Big Switch Networks, Inc.
+//
+// LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
+// the following special exception:
+//
+// LOXI Exception
+//
+// As a special exception to the terms of the EPL, you may distribute libraries
+// generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
+// that copyright and licensing notices generated by LoxiGen are not altered or removed
+// from the LoxiGen Libraries and the notice provided below is (i) included in
+// the LoxiGen Libraries, if distributed in source code form and (ii) included in any
+// documentation for the LoxiGen Libraries, if distributed in binary form.
+//
+// Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
+//
+// You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
+// a copy of the EPL at:
+//
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// EPL for the specific language governing permissions and limitations
+// under the EPL.
+
+#version 1
+
+struct ofp_header {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_hello {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_echo_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_octets_t data;
+};
+
+struct ofp_echo_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_octets_t data;
+};
+
+struct ofp_experimenter {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter;
+ uint32_t subtype;
+ of_octets_t data;
+};
+
+struct ofp_barrier_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_barrier_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_get_config_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_get_config_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t flags;
+ uint16_t miss_send_len;
+};
+
+struct ofp_set_config {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t flags;
+ uint16_t miss_send_len;
+};
+
+struct ofp_port_desc {
+ of_port_no_t port_no;
+ of_mac_addr_t hw_addr;
+ of_port_name_t name;
+ uint32_t config;
+ uint32_t state;
+ uint32_t curr;
+ uint32_t advertised;
+ uint32_t supported;
+ uint32_t peer;
+};
+
+struct ofp_features_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_features_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t datapath_id;
+ uint32_t n_buffers;
+ uint8_t n_tables;
+ uint8_t[3] pad;
+ uint32_t capabilities;
+ uint32_t actions;
+ list(of_port_desc_t) ports;
+};
+
+struct ofp_port_status {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint8_t reason;
+ uint8_t[7] pad;
+ of_port_desc_t desc;
+};
+
+struct ofp_port_mod {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_port_no_t port_no;
+ of_mac_addr_t hw_addr;
+ uint32_t config;
+ uint32_t mask;
+ uint32_t advertise;
+ uint8_t[4] pad;
+};
+
+struct ofp_packet_in {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t buffer_id;
+ uint16_t total_len;
+ of_port_no_t in_port;
+ uint8_t reason;
+ uint8_t pad;
+ of_octets_t data;
+};
+
+struct ofp_action_output {
+ uint16_t type;
+ uint16_t len;
+ of_port_no_t port;
+ uint16_t max_len;
+};
+
+struct ofp_action_set_vlan_vid {
+ uint16_t type;
+ uint16_t len;
+ uint16_t vlan_vid;
+ uint8_t[2] pad;
+};
+
+struct ofp_action_strip_vlan {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_set_vlan_pcp {
+ uint16_t type;
+ uint16_t len;
+ uint8_t vlan_pcp;
+ uint8_t[3] pad;
+};
+
+struct ofp_action_set_dl_src {
+ uint16_t type;
+ uint16_t len;
+ of_mac_addr_t dl_addr;
+ uint8_t[6] pad;
+};
+
+struct ofp_action_set_dl_dst {
+ uint16_t type;
+ uint16_t len;
+ of_mac_addr_t dl_addr;
+ uint8_t[6] pad;
+};
+
+struct ofp_action_set_nw_src {
+ uint16_t type;
+ uint16_t len;
+ uint32_t nw_addr;
+};
+
+struct ofp_action_set_nw_dst {
+ uint16_t type;
+ uint16_t len;
+ uint32_t nw_addr;
+};
+
+struct ofp_action_set_tp_src {
+ uint16_t type;
+ uint16_t len;
+ uint16_t tp_port;
+ uint8_t[2] pad;
+};
+
+struct ofp_action_set_tp_dst {
+ uint16_t type;
+ uint16_t len;
+ uint16_t tp_port;
+ uint8_t[2] pad;
+};
+
+struct ofp_action_set_nw_tos {
+ uint16_t type;
+ uint16_t len;
+ uint8_t nw_tos;
+ uint8_t[3] pad;
+};
+
+struct ofp_action_experimenter {
+ uint16_t type;
+ uint16_t len;
+ uint32_t experimenter;
+ of_octets_t data;
+};
+
+struct ofp_action_enqueue {
+ uint16_t type;
+ uint16_t len;
+ of_port_no_t port;
+ uint8_t[6] pad;
+ uint32_t queue_id;
+};
+
+struct ofp_action {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_packet_out {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t buffer_id;
+ of_port_no_t in_port;
+ uint16_t actions_len;
+ list(of_action_t) actions;
+ of_octets_t data;
+};
+
+struct ofp_match_v1 {
+ of_wc_bmap_t wildcards;
+ of_port_no_t in_port;
+ of_mac_addr_t eth_src;
+ of_mac_addr_t eth_dst;
+ uint16_t vlan_vid;
+ uint8_t vlan_pcp;
+ uint8_t[1] pad1;
+ uint16_t eth_type;
+ uint8_t ip_dscp;
+ uint8_t ip_proto;
+ uint8_t[2] pad2;
+ uint32_t ipv4_src;
+ uint32_t ipv4_dst;
+ uint16_t tcp_src;
+ uint16_t tcp_dst;
+};
+
+struct ofp_flow_add {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_match_t match;
+ uint64_t cookie;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint16_t flags;
+ list(of_action_t) actions;
+};
+
+struct ofp_flow_modify {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_match_t match;
+ uint64_t cookie;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint16_t flags;
+ list(of_action_t) actions;
+};
+
+struct ofp_flow_modify_strict {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_match_t match;
+ uint64_t cookie;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint16_t flags;
+ list(of_action_t) actions;
+};
+
+struct ofp_flow_delete {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_match_t match;
+ uint64_t cookie;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint16_t flags;
+ list(of_action_t) actions;
+};
+
+struct ofp_flow_delete_strict {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_match_t match;
+ uint64_t cookie;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint16_t flags;
+ list(of_action_t) actions;
+};
+
+struct ofp_flow_removed {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_match_t match;
+ uint64_t cookie;
+ uint16_t priority;
+ uint8_t reason;
+ uint8_t[1] pad;
+ uint32_t duration_sec;
+ uint32_t duration_nsec;
+ uint16_t idle_timeout;
+ uint8_t[2] pad2;
+ uint64_t packet_count;
+ uint64_t byte_count;
+};
+
+struct ofp_error_msg {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t err_type;
+ uint16_t code;
+ of_octets_t data;
+};
+
+// STATS ENTRIES: flow, table, port, queue,
+struct ofp_flow_stats_entry {
+ uint16_t length;
+ uint8_t table_id;
+ uint8_t pad;
+ of_match_t match;
+ uint32_t duration_sec;
+ uint32_t duration_nsec;
+ uint16_t priority;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint8_t[6] pad2;
+ uint64_t cookie;
+ uint64_t packet_count;
+ uint64_t byte_count;
+ list(of_action_t) actions;
+};
+
+struct ofp_table_stats_entry {
+ uint8_t table_id;
+ uint8_t[3] pad;
+ of_table_name_t name;
+ of_wc_bmap_t wildcards;
+ uint32_t max_entries;
+ uint32_t active_count;
+ uint64_t lookup_count;
+ uint64_t matched_count;
+};
+
+struct ofp_port_stats_entry {
+ of_port_no_t port_no;
+ uint8_t[6] pad;
+ uint64_t rx_packets;
+ uint64_t tx_packets;
+ uint64_t rx_bytes;
+ uint64_t tx_bytes;
+ uint64_t rx_dropped;
+ uint64_t tx_dropped;
+ uint64_t rx_errors;
+ uint64_t tx_errors;
+ uint64_t rx_frame_err;
+ uint64_t rx_over_err;
+ uint64_t rx_crc_err;
+ uint64_t collisions;
+};
+
+struct ofp_queue_stats_entry {
+ of_port_no_t port_no;
+ uint8_t[2] pad;
+ uint32_t queue_id;
+ uint64_t tx_bytes;
+ uint64_t tx_packets;
+ uint64_t tx_errors;
+};
+
+// STATS request/reply: Desc, flow, agg, table, port, queue
+
+struct ofp_desc_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+};
+
+struct ofp_desc_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ of_desc_str_t mfr_desc;
+ of_desc_str_t hw_desc;
+ of_desc_str_t sw_desc;
+ of_serial_num_t serial_num;
+ of_desc_str_t dp_desc;
+};
+
+struct ofp_flow_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ of_match_t match;
+ uint8_t table_id;
+ uint8_t pad;
+ of_port_no_t out_port;
+};
+
+struct ofp_flow_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ list(of_flow_stats_entry_t) entries;
+};
+
+struct ofp_aggregate_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ of_match_t match;
+ uint8_t table_id;
+ uint8_t pad;
+ of_port_no_t out_port;
+};
+
+struct ofp_aggregate_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint64_t packet_count;
+ uint64_t byte_count;
+ uint32_t flow_count;
+ uint8_t[4] pad;
+};
+
+struct ofp_table_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+};
+
+struct ofp_table_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ list(of_table_stats_entry_t) entries;
+};
+
+struct ofp_port_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ of_port_no_t port_no;
+ uint8_t[6] pad;
+};
+
+struct ofp_port_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ list(of_port_stats_entry_t) entries;
+};
+
+struct ofp_queue_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ of_port_no_t port_no;
+ uint8_t[2] pad;
+ uint32_t queue_id;
+};
+
+struct ofp_queue_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ list(of_queue_stats_entry_t) entries;
+};
+
+struct ofp_experimenter_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint32_t experimenter;
+ of_octets_t data;
+};
+
+struct ofp_experimenter_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint32_t experimenter;
+ of_octets_t data;
+};
+
+// END OF STATS OBJECTS
+
+struct ofp_queue_prop {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_queue_prop_min_rate {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ uint16_t rate;
+ uint8_t[6] pad;
+};
+
+struct ofp_packet_queue {
+ uint32_t queue_id;
+ uint16_t len;
+ uint8_t[2] pad;
+ list(of_queue_prop_t) properties;
+};
+
+struct ofp_queue_get_config_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_port_no_t port;
+ uint8_t[2] pad;
+};
+
+struct ofp_queue_get_config_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_port_no_t port;
+ uint8_t[6] pad;
+ list(of_packet_queue_t) queues;
+};
diff --git a/openflow_input/standard-1.1 b/openflow_input/standard-1.1
new file mode 100644
index 0000000..66a4425
--- /dev/null
+++ b/openflow_input/standard-1.1
@@ -0,0 +1,966 @@
+// Copyright 2013, Big Switch Networks, Inc.
+//
+// LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
+// the following special exception:
+//
+// LOXI Exception
+//
+// As a special exception to the terms of the EPL, you may distribute libraries
+// generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
+// that copyright and licensing notices generated by LoxiGen are not altered or removed
+// from the LoxiGen Libraries and the notice provided below is (i) included in
+// the LoxiGen Libraries, if distributed in source code form and (ii) included in any
+// documentation for the LoxiGen Libraries, if distributed in binary form.
+//
+// Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
+//
+// You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
+// a copy of the EPL at:
+//
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// EPL for the specific language governing permissions and limitations
+// under the EPL.
+
+#version 2
+
+struct ofp_header {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_hello {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_echo_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_octets_t data;
+};
+
+struct ofp_echo_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_octets_t data;
+};
+
+struct ofp_experimenter {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter;
+ uint32_t subtype;
+ of_octets_t data;
+};
+
+struct ofp_barrier_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_barrier_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_get_config_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_get_config_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t flags;
+ uint16_t miss_send_len;
+};
+
+struct ofp_set_config {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t flags;
+ uint16_t miss_send_len;
+};
+
+struct ofp_table_mod {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint8_t table_id;
+ uint8_t[3] pad;
+ uint32_t config;
+};
+
+struct ofp_port_desc {
+ of_port_no_t port_no;
+ uint8_t[4] pad;
+ of_mac_addr_t hw_addr;
+ uint8_t[2] pad2;
+ of_port_name_t name;
+ uint32_t config;
+ uint32_t state;
+ uint32_t curr;
+ uint32_t advertised;
+ uint32_t supported;
+ uint32_t peer;
+ uint32_t curr_speed;
+ uint32_t max_speed;
+};
+
+struct ofp_features_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_features_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t datapath_id;
+ uint32_t n_buffers;
+ uint8_t n_tables;
+ uint8_t[3] pad;
+ uint32_t capabilities;
+ uint32_t reserved;
+ list(of_port_desc_t) ports;
+};
+
+struct ofp_port_status {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint8_t reason;
+ uint8_t[7] pad;
+ of_port_desc_t desc;
+};
+
+struct ofp_port_mod {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_port_no_t port_no;
+ uint8_t[4] pad;
+ of_mac_addr_t hw_addr;
+ uint8_t[2] pad2;
+ uint32_t config;
+ uint32_t mask;
+ uint32_t advertise;
+ uint8_t[4] pad3;
+};
+
+struct ofp_packet_in {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t buffer_id;
+ of_port_no_t in_port;
+ of_port_no_t in_phy_port;
+ uint16_t total_len;
+ uint8_t reason;
+ uint8_t table_id;
+ of_octets_t data;
+};
+
+struct ofp_action_output {
+ uint16_t type;
+ uint16_t len;
+ of_port_no_t port;
+ uint16_t max_len;
+ uint8_t[6] pad;
+};
+
+struct ofp_action_set_vlan_vid {
+ uint16_t type;
+ uint16_t len;
+ uint16_t vlan_vid;
+ uint8_t[2] pad;
+};
+
+struct ofp_action_set_vlan_pcp {
+ uint16_t type;
+ uint16_t len;
+ uint8_t vlan_pcp;
+ uint8_t[3] pad;
+};
+
+struct ofp_action_set_dl_src {
+ uint16_t type;
+ uint16_t len;
+ of_mac_addr_t dl_addr;
+ uint8_t[6] pad;
+};
+
+struct ofp_action_set_dl_dst {
+ uint16_t type;
+ uint16_t len;
+ of_mac_addr_t dl_addr;
+ uint8_t[6] pad;
+};
+
+struct ofp_action_set_nw_src {
+ uint16_t type;
+ uint16_t len;
+ uint32_t nw_addr;
+};
+
+struct ofp_action_set_nw_dst {
+ uint16_t type;
+ uint16_t len;
+ uint32_t nw_addr;
+};
+
+struct ofp_action_set_nw_tos {
+ uint16_t type;
+ uint16_t len;
+ uint8_t nw_tos;
+ uint8_t[3] pad;
+};
+
+struct ofp_action_set_nw_ecn {
+ uint16_t type;
+ uint16_t len;
+ uint8_t nw_ecn;
+ uint8_t[3] pad;
+};
+
+struct ofp_action_set_tp_src {
+ uint16_t type;
+ uint16_t len;
+ uint16_t tp_port;
+ uint8_t[2] pad;
+};
+
+struct ofp_action_set_tp_dst {
+ uint16_t type;
+ uint16_t len;
+ uint16_t tp_port;
+ uint8_t[2] pad;
+};
+
+struct ofp_action_copy_ttl_out {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_copy_ttl_in {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_set_mpls_label {
+ uint16_t type;
+ uint16_t len;
+ uint32_t mpls_label;
+};
+
+struct ofp_action_set_mpls_tc {
+ uint16_t type;
+ uint16_t len;
+ uint8_t mpls_tc;
+ uint8_t[3] pad;
+};
+
+struct ofp_action_set_mpls_ttl {
+ uint16_t type;
+ uint16_t len;
+ uint8_t mpls_ttl;
+ uint8_t[3] pad;
+};
+
+struct ofp_action_dec_mpls_ttl {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_push_vlan {
+ uint16_t type;
+ uint16_t len;
+ uint16_t ethertype;
+ uint8_t[2] pad;
+};
+
+struct ofp_action_pop_vlan {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_push_mpls {
+ uint16_t type;
+ uint16_t len;
+ uint16_t ethertype;
+ uint8_t[2] pad;
+};
+
+struct ofp_action_pop_mpls {
+ uint16_t type;
+ uint16_t len;
+ uint16_t ethertype;
+ uint8_t[2] pad;
+};
+
+struct ofp_action_set_queue {
+ uint16_t type;
+ uint16_t len;
+ uint32_t queue_id;
+};
+
+struct ofp_action_group {
+ uint16_t type;
+ uint16_t len;
+ uint32_t group_id;
+};
+
+struct ofp_action_set_nw_ttl {
+ uint16_t type;
+ uint16_t len;
+ uint8_t nw_ttl;
+ uint8_t[3] pad;
+};
+
+struct ofp_action_dec_nw_ttl {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_experimenter {
+ uint16_t type;
+ uint16_t len;
+ uint32_t experimenter;
+ of_octets_t data;
+};
+
+struct ofp_action {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_packet_out {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t buffer_id;
+ of_port_no_t in_port;
+ uint16_t actions_len;
+ uint8_t[6] pad;
+ list(of_action_t) actions;
+ of_octets_t data;
+};
+
+struct ofp_match_v2 {
+ uint16_t type;
+ uint16_t length;
+ of_port_no_t in_port;
+ of_wc_bmap_t wildcards;
+ of_mac_addr_t eth_src;
+ of_mac_addr_t eth_src_mask;
+ of_mac_addr_t eth_dst;
+ of_mac_addr_t eth_dst_mask;
+ uint16_t vlan_vid;
+ uint8_t vlan_pcp;
+ uint8_t[1] pad1;
+ uint16_t eth_type;
+ uint8_t ip_dscp;
+ uint8_t ip_proto;
+ uint32_t ipv4_src;
+ uint32_t ipv4_src_mask;
+ uint32_t ipv4_dst;
+ uint32_t ipv4_dst_mask;
+ uint16_t tcp_src;
+ uint16_t tcp_dst;
+ uint32_t mpls_label;
+ uint8_t mpls_tc;
+ uint8_t[3] pad2;
+ uint64_t metadata;
+ uint64_t metadata_mask;
+};
+
+struct ofp_instruction {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_instruction_goto_table {
+ uint16_t type;
+ uint16_t len;
+ uint8_t table_id;
+ uint8_t[3] pad;
+};
+
+struct ofp_instruction_write_metadata {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ uint64_t metadata;
+ uint64_t metadata_mask;
+};
+
+struct ofp_instruction_write_actions {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ list(of_action_t) actions;
+};
+
+struct ofp_instruction_apply_actions {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ list(of_action_t) actions;
+};
+
+struct ofp_instruction_clear_actions {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_instruction_experimenter {
+ uint16_t type;
+ uint16_t len;
+ uint32_t experimenter;
+ of_octets_t data;
+};
+
+struct ofp_flow_add {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ uint8_t table_id;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint16_t flags;
+ uint8_t[2] pad;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_flow_modify {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ uint8_t table_id;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint16_t flags;
+ uint8_t[2] pad;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_flow_modify_strict {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ uint8_t table_id;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint16_t flags;
+ uint8_t[2] pad;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_flow_delete {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ uint8_t table_id;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint16_t flags;
+ uint8_t[2] pad;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_flow_delete_strict {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ uint8_t table_id;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint16_t flags;
+ uint8_t[2] pad;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_bucket {
+ uint16_t len;
+ uint16_t weight;
+ of_port_no_t watch_port;
+ uint32_t watch_group;
+ uint8_t[4] pad;
+ list(of_action_t) actions;
+};
+
+struct ofp_group_mod {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t command;
+ uint8_t group_type;
+ uint8_t pad;
+ uint32_t group_id;
+ list(of_bucket_t) buckets;
+};
+
+struct ofp_flow_removed {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint16_t priority;
+ uint8_t reason;
+ uint8_t table_id;
+ uint32_t duration_sec;
+ uint32_t duration_nsec;
+ uint16_t idle_timeout;
+ uint8_t[2] pad2;
+ uint64_t packet_count;
+ uint64_t byte_count;
+ of_match_t match;
+};
+
+struct ofp_error_msg {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t err_type;
+ uint16_t code;
+ of_octets_t data;
+};
+
+// STATS ENTRIES: flow, table, port, group, group_desc
+
+struct ofp_flow_stats_entry {
+ uint16_t length;
+ uint8_t table_id;
+ uint8_t pad;
+ uint32_t duration_sec;
+ uint32_t duration_nsec;
+ uint16_t priority;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint8_t[6] pad2;
+ uint64_t cookie;
+ uint64_t packet_count;
+ uint64_t byte_count;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_table_stats_entry {
+ uint8_t table_id;
+ uint8_t[7] pad;
+ of_table_name_t name;
+ of_wc_bmap_t wildcards;
+ of_match_bmap_t match;
+ uint32_t instructions;
+ uint32_t write_actions;
+ uint32_t apply_actions;
+ uint32_t config;
+ uint32_t max_entries;
+ uint32_t active_count;
+ uint64_t lookup_count;
+ uint64_t matched_count;
+};
+
+struct ofp_port_stats_entry {
+ of_port_no_t port_no;
+ uint8_t[4] pad;
+ uint64_t rx_packets;
+ uint64_t tx_packets;
+ uint64_t rx_bytes;
+ uint64_t tx_bytes;
+ uint64_t rx_dropped;
+ uint64_t tx_dropped;
+ uint64_t rx_errors;
+ uint64_t tx_errors;
+ uint64_t rx_frame_err;
+ uint64_t rx_over_err;
+ uint64_t rx_crc_err;
+ uint64_t collisions;
+};
+
+struct ofp_queue_stats_entry {
+ of_port_no_t port_no;
+ uint32_t queue_id;
+ uint64_t tx_bytes;
+ uint64_t tx_packets;
+ uint64_t tx_errors;
+};
+
+struct ofp_bucket_counter {
+ uint64_t packet_count;
+ uint64_t byte_count;
+};
+
+struct ofp_group_stats_entry {
+ uint16_t length;
+ uint8_t[2] pad;
+ uint32_t group_id;
+ uint32_t ref_count;
+ uint8_t[4] pad2;
+ uint64_t packet_count;
+ uint64_t byte_count;
+ list(of_bucket_counter_t) bucket_stats;
+};
+
+struct ofp_group_desc_stats_entry {
+ uint16_t length;
+ uint8_t type;
+ uint8_t pad;
+ uint32_t group_id;
+ list(of_bucket_t) buckets;
+};
+
+// STATS: Desc, flow, agg, table, port, queue, group, group_desc, experi
+
+struct ofp_desc_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+};
+
+struct ofp_desc_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ of_desc_str_t mfr_desc;
+ of_desc_str_t hw_desc;
+ of_desc_str_t sw_desc;
+ of_serial_num_t serial_num;
+ of_desc_str_t dp_desc;
+};
+
+struct ofp_flow_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint8_t table_id;
+ uint8_t[3] pad;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint8_t[4] pad2;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ of_match_t match;
+};
+
+struct ofp_flow_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_flow_stats_entry_t) entries;
+};
+
+struct ofp_aggregate_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint8_t table_id;
+ uint8_t[3] pad;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint8_t[4] pad2;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ of_match_t match;
+};
+
+struct ofp_aggregate_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint64_t packet_count;
+ uint64_t byte_count;
+ uint32_t flow_count;
+ uint8_t[4] pad;
+};
+
+struct ofp_table_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+};
+
+struct ofp_table_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_table_stats_entry_t) entries;
+};
+
+struct ofp_port_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ of_port_no_t port_no;
+ uint8_t[4] pad;
+};
+
+struct ofp_port_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_port_stats_entry_t) entries;
+};
+
+struct ofp_queue_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ of_port_no_t port_no;
+ uint32_t queue_id;
+};
+
+struct ofp_queue_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_queue_stats_entry_t) entries;
+};
+
+struct ofp_group_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint32_t group_id;
+ uint8_t[4] pad;
+};
+
+struct ofp_group_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_group_stats_entry_t) entries;
+};
+
+struct ofp_group_desc_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+};
+
+struct ofp_group_desc_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_group_desc_stats_entry_t) entries;
+};
+
+struct ofp_experimenter_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint32_t experimenter;
+ uint8_t[4] pad;
+ of_octets_t data;
+};
+
+struct ofp_experimenter_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint32_t experimenter;
+ uint8_t[4] pad;
+ of_octets_t data;
+};
+
+// END OF STATS OBJECTS
+
+struct ofp_queue_prop {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_queue_prop_min_rate {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ uint16_t rate;
+ uint8_t[6] pad;
+};
+
+struct ofp_packet_queue {
+ uint32_t queue_id;
+ uint16_t len;
+ uint8_t[2] pad;
+ list(of_queue_prop_t) properties;
+};
+
+struct ofp_queue_get_config_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_port_no_t port;
+ uint8_t[4] pad;
+};
+
+struct ofp_queue_get_config_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_port_no_t port;
+ uint8_t[4] pad;
+ list(of_packet_queue_t) queues;
+};
diff --git a/openflow_input/standard-1.2 b/openflow_input/standard-1.2
new file mode 100644
index 0000000..0961abd
--- /dev/null
+++ b/openflow_input/standard-1.2
@@ -0,0 +1,958 @@
+// Copyright 2013, Big Switch Networks, Inc.
+//
+// LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
+// the following special exception:
+//
+// LOXI Exception
+//
+// As a special exception to the terms of the EPL, you may distribute libraries
+// generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
+// that copyright and licensing notices generated by LoxiGen are not altered or removed
+// from the LoxiGen Libraries and the notice provided below is (i) included in
+// the LoxiGen Libraries, if distributed in source code form and (ii) included in any
+// documentation for the LoxiGen Libraries, if distributed in binary form.
+//
+// Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
+//
+// You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
+// a copy of the EPL at:
+//
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// EPL for the specific language governing permissions and limitations
+// under the EPL.
+
+#version 3
+
+struct ofp_header {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_hello {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_echo_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_octets_t data;
+};
+
+struct ofp_echo_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_octets_t data;
+};
+
+struct ofp_experimenter {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter;
+ uint32_t subtype;
+ of_octets_t data;
+};
+
+struct ofp_barrier_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_barrier_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_get_config_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_get_config_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t flags;
+ uint16_t miss_send_len;
+};
+
+struct ofp_set_config {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t flags;
+ uint16_t miss_send_len;
+};
+
+struct ofp_table_mod {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint8_t table_id;
+ uint8_t[3] pad;
+ uint32_t config;
+};
+
+struct ofp_port_desc {
+ of_port_no_t port_no;
+ uint8_t[4] pad;
+ of_mac_addr_t hw_addr;
+ uint8_t[2] pad2;
+ of_port_name_t name;
+ uint32_t config;
+ uint32_t state;
+ uint32_t curr;
+ uint32_t advertised;
+ uint32_t supported;
+ uint32_t peer;
+ uint32_t curr_speed;
+ uint32_t max_speed;
+};
+
+struct ofp_features_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_features_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t datapath_id;
+ uint32_t n_buffers;
+ uint8_t n_tables;
+ uint8_t[3] pad;
+ uint32_t capabilities;
+ uint32_t reserved;
+ list(of_port_desc_t) ports;
+};
+
+struct ofp_port_status {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint8_t reason;
+ uint8_t[7] pad;
+ of_port_desc_t desc;
+};
+
+struct ofp_port_mod {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_port_no_t port_no;
+ uint8_t[4] pad;
+ of_mac_addr_t hw_addr;
+ uint8_t[2] pad2;
+ uint32_t config;
+ uint32_t mask;
+ uint32_t advertise;
+ uint8_t[4] pad3;
+};
+
+struct ofp_match_v3 {
+ uint16_t type;
+ uint16_t length;
+ list(of_oxm_t) oxm_list;
+};
+
+struct ofp_oxm_experimenter_header {
+ uint32_t oxm_header;
+ uint32_t experimenter;
+ of_octets_t data;
+};
+
+struct ofp_action_output {
+ uint16_t type;
+ uint16_t len;
+ of_port_no_t port;
+ uint16_t max_len;
+ uint8_t[6] pad;
+};
+
+struct ofp_action_copy_ttl_out {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_copy_ttl_in {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_set_mpls_ttl {
+ uint16_t type;
+ uint16_t len;
+ uint8_t mpls_ttl;
+ uint8_t[3] pad;
+};
+
+struct ofp_action_dec_mpls_ttl {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_push_vlan {
+ uint16_t type;
+ uint16_t len;
+ uint16_t ethertype;
+ uint8_t[2] pad;
+};
+
+struct ofp_action_pop_vlan {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_push_mpls {
+ uint16_t type;
+ uint16_t len;
+ uint16_t ethertype;
+ uint8_t[2] pad;
+};
+
+struct ofp_action_pop_mpls {
+ uint16_t type;
+ uint16_t len;
+ uint16_t ethertype;
+ uint8_t[2] pad;
+};
+
+struct ofp_action_set_queue {
+ uint16_t type;
+ uint16_t len;
+ uint32_t queue_id;
+};
+
+struct ofp_action_group {
+ uint16_t type;
+ uint16_t len;
+ uint32_t group_id;
+};
+
+struct ofp_action_set_nw_ttl {
+ uint16_t type;
+ uint16_t len;
+ uint8_t nw_ttl;
+ uint8_t[3] pad;
+};
+
+struct ofp_action_dec_nw_ttl {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_set_field {
+ uint16_t type;
+ uint16_t len;
+ of_octets_t field;
+};
+
+struct ofp_action_experimenter {
+ uint16_t type;
+ uint16_t len;
+ uint32_t experimenter;
+ of_octets_t data;
+};
+
+struct ofp_action {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_instruction {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_instruction_goto_table {
+ uint16_t type;
+ uint16_t len;
+ uint8_t table_id;
+ uint8_t[3] pad;
+};
+
+struct ofp_instruction_write_metadata {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ uint64_t metadata;
+ uint64_t metadata_mask;
+};
+
+struct ofp_instruction_write_actions {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ list(of_action_t) actions;
+};
+
+struct ofp_instruction_apply_actions {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ list(of_action_t) actions;
+};
+
+struct ofp_instruction_clear_actions {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_instruction_experimenter {
+ uint16_t type;
+ uint16_t len;
+ uint32_t experimenter;
+ of_octets_t data;
+};
+
+struct ofp_flow_add {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ uint8_t table_id;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint16_t flags;
+ uint8_t[2] pad;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_flow_modify {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ uint8_t table_id;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint16_t flags;
+ uint8_t[2] pad;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_flow_modify_strict {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ uint8_t table_id;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint16_t flags;
+ uint8_t[2] pad;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_flow_delete {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ uint8_t table_id;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint16_t flags;
+ uint8_t[2] pad;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_flow_delete_strict {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ uint8_t table_id;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint16_t flags;
+ uint8_t[2] pad;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_bucket {
+ uint16_t len;
+ uint16_t weight;
+ of_port_no_t watch_port;
+ uint32_t watch_group;
+ uint8_t[4] pad;
+ list(of_action_t) actions;
+};
+
+struct ofp_group_mod {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t command;
+ uint8_t group_type;
+ uint8_t pad;
+ uint32_t group_id;
+ list(of_bucket_t) buckets;
+};
+
+struct ofp_packet_out {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t buffer_id;
+ of_port_no_t in_port;
+ uint16_t actions_len;
+ uint8_t[6] pad;
+ list(of_action_t) actions;
+ of_octets_t data;
+};
+
+struct ofp_packet_in {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t buffer_id;
+ uint16_t total_len;
+ uint8_t reason;
+ uint8_t table_id;
+ of_match_t match;
+ uint8_t[2] pad;
+ of_octets_t data; /* FIXME: Ensure total_len gets updated */
+};
+
+struct ofp_flow_removed {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint16_t priority;
+ uint8_t reason;
+ uint8_t table_id;
+ uint32_t duration_sec;
+ uint32_t duration_nsec;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint64_t packet_count;
+ uint64_t byte_count;
+ of_match_t match;
+};
+
+struct ofp_error_msg {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t err_type;
+ uint16_t code;
+ of_octets_t data;
+};
+
+// struct ofp_error_experimenter_msg {
+// uint8_t version;
+// uint8_t type;
+// uint16_t length;
+// uint32_t xid;
+// uint16_t err_type;
+// uint16_t subtype;
+// uint32_t experimenter;
+// of_octets_t data;
+//};
+
+// STATS ENTRIES: flow, table, port, queue, group stats, group desc stats
+// FIXME: Verify disambiguation w/ length in object and entry
+
+struct ofp_flow_stats_entry {
+ uint16_t length;
+ uint8_t table_id;
+ uint8_t pad;
+ uint32_t duration_sec;
+ uint32_t duration_nsec;
+ uint16_t priority;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint8_t[6] pad2;
+ uint64_t cookie;
+ uint64_t packet_count;
+ uint64_t byte_count;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_table_stats_entry {
+ uint8_t table_id;
+ uint8_t[7] pad;
+ of_table_name_t name;
+ of_match_bmap_t match;
+ of_wc_bmap_t wildcards;
+ uint32_t write_actions;
+ uint32_t apply_actions;
+ uint64_t write_setfields;
+ uint64_t apply_setfields;
+ uint64_t metadata_match;
+ uint64_t metadata_write;
+ uint32_t instructions;
+ uint32_t config;
+ uint32_t max_entries;
+ uint32_t active_count;
+ uint64_t lookup_count;
+ uint64_t matched_count;
+};
+
+struct ofp_port_stats_entry {
+ of_port_no_t port_no;
+ uint8_t[4] pad;
+ uint64_t rx_packets;
+ uint64_t tx_packets;
+ uint64_t rx_bytes;
+ uint64_t tx_bytes;
+ uint64_t rx_dropped;
+ uint64_t tx_dropped;
+ uint64_t rx_errors;
+ uint64_t tx_errors;
+ uint64_t rx_frame_err;
+ uint64_t rx_over_err;
+ uint64_t rx_crc_err;
+ uint64_t collisions;
+};
+
+struct ofp_queue_stats_entry {
+ of_port_no_t port_no;
+ uint32_t queue_id;
+ uint64_t tx_bytes;
+ uint64_t tx_packets;
+ uint64_t tx_errors;
+};
+
+struct ofp_bucket_counter {
+ uint64_t packet_count;
+ uint64_t byte_count;
+};
+
+struct ofp_group_stats_entry {
+ uint16_t length;
+ uint8_t[2] pad;
+ uint32_t group_id;
+ uint32_t ref_count;
+ uint8_t[4] pad2;
+ uint64_t packet_count;
+ uint64_t byte_count;
+ list(of_bucket_counter_t) bucket_stats;
+};
+
+struct ofp_group_desc_stats_entry {
+ uint16_t length;
+ uint8_t type;
+ uint8_t pad;
+ uint32_t group_id;
+ list(of_bucket_t) buckets;
+};
+
+// STATS:
+// Desc, flow, agg, table, port, queue, group, group_desc, group_feat, experi
+
+struct ofp_desc_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+};
+
+struct ofp_desc_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ of_desc_str_t mfr_desc;
+ of_desc_str_t hw_desc;
+ of_desc_str_t sw_desc;
+ of_serial_num_t serial_num;
+ of_desc_str_t dp_desc;
+};
+
+struct ofp_flow_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint8_t table_id;
+ uint8_t[3] pad;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint8_t[4] pad2;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ of_match_t match;
+};
+
+struct ofp_flow_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_flow_stats_entry_t) entries;
+};
+
+struct ofp_aggregate_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint8_t table_id;
+ uint8_t[3] pad;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint8_t[4] pad2;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ of_match_t match;
+};
+
+struct ofp_aggregate_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint64_t packet_count;
+ uint64_t byte_count;
+ uint32_t flow_count;
+ uint8_t[4] pad;
+};
+
+struct ofp_table_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+};
+
+struct ofp_table_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_table_stats_entry_t) entries;
+};
+
+struct ofp_port_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ of_port_no_t port_no;
+ uint8_t[4] pad;
+};
+
+struct ofp_port_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_port_stats_entry_t) entries;
+};
+
+struct ofp_queue_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ of_port_no_t port_no;
+ uint32_t queue_id;
+};
+
+struct ofp_queue_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_queue_stats_entry_t) entries;
+};
+
+struct ofp_group_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint32_t group_id;
+ uint8_t[4] pad;
+};
+
+struct ofp_group_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_group_stats_entry_t) entries;
+};
+
+struct ofp_group_desc_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+};
+
+struct ofp_group_desc_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_group_desc_stats_entry_t) entries;
+};
+
+struct ofp_group_features_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+};
+
+struct ofp_group_features_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint32_t types;
+ uint32_t capabilities;
+ uint32_t max_groups_all;
+ uint32_t max_groups_select;
+ uint32_t max_groups_indirect;
+ uint32_t max_groups_ff;
+ uint32_t actions_all;
+ uint32_t actions_select;
+ uint32_t actions_indirect;
+ uint32_t actions_ff;
+};
+
+struct ofp_experimenter_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint32_t experimenter;
+ uint32_t subtype;
+ of_octets_t data;
+};
+
+struct ofp_experimenter_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint32_t experimenter;
+ uint32_t subtype;
+ of_octets_t data;
+};
+
+// END OF STATS OBJECTS
+
+struct ofp_queue_prop {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_queue_prop_min_rate {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ uint16_t rate;
+ uint8_t[6] pad;
+};
+
+struct ofp_queue_prop_max_rate {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ uint16_t rate;
+ uint8_t[6] pad;
+};
+
+struct ofp_queue_prop_experimenter {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ uint32_t experimenter;
+ uint8_t[4] pad;
+ of_octets_t data;
+};
+
+struct ofp_packet_queue {
+ uint32_t queue_id;
+ of_port_no_t port;
+ uint16_t len;
+ uint8_t[6] pad;
+ list(of_queue_prop_t) properties;
+};
+
+struct ofp_queue_get_config_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_port_no_t port;
+ uint8_t[4] pad;
+};
+
+struct ofp_queue_get_config_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_port_no_t port;
+ uint8_t[4] pad;
+ list(of_packet_queue_t) queues;
+};
+
+struct ofp_role_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t role;
+ uint8_t[4] pad;
+ uint64_t generation_id;
+};
+
+struct ofp_role_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_octets_t data;
+};
diff --git a/openflow_input/standard-1.3 b/openflow_input/standard-1.3
new file mode 100644
index 0000000..258ec01
--- /dev/null
+++ b/openflow_input/standard-1.3
@@ -0,0 +1,1319 @@
+// Copyright 2013, Big Switch Networks, Inc.
+//
+// LoxiGen is licensed under the Eclipse Public License, version 1.0 (EPL), with
+// the following special exception:
+//
+// LOXI Exception
+//
+// As a special exception to the terms of the EPL, you may distribute libraries
+// generated by LoxiGen (LoxiGen Libraries) under the terms of your choice, provided
+// that copyright and licensing notices generated by LoxiGen are not altered or removed
+// from the LoxiGen Libraries and the notice provided below is (i) included in
+// the LoxiGen Libraries, if distributed in source code form and (ii) included in any
+// documentation for the LoxiGen Libraries, if distributed in binary form.
+//
+// Notice: "Copyright 2013, Big Switch Networks, Inc. This library was generated by the LoxiGen Compiler."
+//
+// You may not use this file except in compliance with the EPL or LOXI Exception. You may obtain
+// a copy of the EPL at:
+//
+// http://www.eclipse.org/legal/epl-v10.html
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// EPL for the specific language governing permissions and limitations
+// under the EPL.
+
+#version 4
+
+struct ofp_header {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+// Special structures used for managing scalar list elements
+struct ofp_uint32 {
+ uint32_t value;
+};
+
+// Special structures used for managing scalar list elements
+struct ofp_uint8 {
+ uint8_t value;
+};
+
+struct ofp_hello_elem {
+ uint16_t type;
+ uint16_t length;
+};
+
+struct ofp_hello_elem_versionbitmap {
+ uint16_t type;
+ uint16_t length;
+ list(of_uint32_t) bitmaps;
+};
+
+struct ofp_hello {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ list(of_hello_elem_t) elements;
+};
+
+struct ofp_echo_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_octets_t data;
+};
+
+struct ofp_echo_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_octets_t data;
+};
+
+struct ofp_experimenter {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter;
+ uint32_t subtype;
+ of_octets_t data;
+};
+
+struct ofp_barrier_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_barrier_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_get_config_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_get_config_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t flags;
+ uint16_t miss_send_len;
+};
+
+struct ofp_set_config {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t flags;
+ uint16_t miss_send_len;
+};
+
+struct ofp_table_mod {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint8_t table_id;
+ uint8_t[3] pad;
+ uint32_t config;
+};
+
+struct ofp_port_desc {
+ of_port_no_t port_no;
+ uint8_t[4] pad;
+ of_mac_addr_t hw_addr;
+ uint8_t[2] pad2;
+ of_port_name_t name;
+ uint32_t config;
+ uint32_t state;
+ uint32_t curr;
+ uint32_t advertised;
+ uint32_t supported;
+ uint32_t peer;
+ uint32_t curr_speed;
+ uint32_t max_speed;
+};
+
+struct ofp_features_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+};
+
+struct ofp_features_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t datapath_id;
+ uint32_t n_buffers;
+ uint8_t n_tables;
+ uint8_t auxiliary_id;
+ uint8_t[2] pad;
+ uint32_t capabilities;
+ uint32_t reserved;
+};
+
+struct ofp_port_status {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint8_t reason;
+ uint8_t[7] pad;
+ of_port_desc_t desc;
+};
+
+struct ofp_port_mod {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_port_no_t port_no;
+ uint8_t[4] pad;
+ of_mac_addr_t hw_addr;
+ uint8_t[2] pad2;
+ uint32_t config;
+ uint32_t mask;
+ uint32_t advertise;
+ uint8_t[4] pad3;
+};
+
+// FIXME Does this need to be v4?
+struct ofp_match_v3 {
+ uint16_t type;
+ uint16_t length;
+ list(of_oxm_t) oxm_list;
+};
+
+struct ofp_oxm_experimenter_header {
+ uint32_t oxm_header;
+ uint32_t experimenter;
+ of_octets_t data;
+};
+
+// This looks like an action header, but is standalone. See
+// ofp_table_features_prop_actions
+struct ofp_action_id {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_output {
+ uint16_t type;
+ uint16_t len;
+ of_port_no_t port;
+ uint16_t max_len;
+ uint8_t[6] pad;
+};
+
+struct ofp_action_copy_ttl_out {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_copy_ttl_in {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_set_mpls_ttl {
+ uint16_t type;
+ uint16_t len;
+ uint8_t mpls_ttl;
+ uint8_t[3] pad;
+};
+
+struct ofp_action_dec_mpls_ttl {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_push_vlan {
+ uint16_t type;
+ uint16_t len;
+ uint16_t ethertype;
+ uint8_t[2] pad;
+};
+
+struct ofp_action_pop_vlan {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_push_mpls {
+ uint16_t type;
+ uint16_t len;
+ uint16_t ethertype;
+ uint8_t[2] pad;
+};
+
+struct ofp_action_pop_mpls {
+ uint16_t type;
+ uint16_t len;
+ uint16_t ethertype;
+ uint8_t[2] pad;
+};
+
+struct ofp_action_set_queue {
+ uint16_t type;
+ uint16_t len;
+ uint32_t queue_id;
+};
+
+struct ofp_action_group {
+ uint16_t type;
+ uint16_t len;
+ uint32_t group_id;
+};
+
+struct ofp_action_set_nw_ttl {
+ uint16_t type;
+ uint16_t len;
+ uint8_t nw_ttl;
+ uint8_t[3] pad;
+};
+
+struct ofp_action_dec_nw_ttl {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_set_field {
+ uint16_t type;
+ uint16_t len;
+ of_octets_t field;
+};
+
+struct ofp_action_experimenter {
+ uint16_t type;
+ uint16_t len;
+ uint32_t experimenter;
+ of_octets_t data;
+};
+
+struct ofp_action_pop_pbb {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_action_push_pbb {
+ uint16_t type;
+ uint16_t len;
+ uint16_t ethertype;
+ uint8_t[2] pad;
+};
+
+struct ofp_action {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_instruction {
+ uint16_t type;
+ uint16_t len;
+};
+
+struct ofp_instruction_goto_table {
+ uint16_t type;
+ uint16_t len;
+ uint8_t table_id;
+ uint8_t[3] pad;
+};
+
+struct ofp_instruction_write_metadata {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ uint64_t metadata;
+ uint64_t metadata_mask;
+};
+
+struct ofp_instruction_write_actions {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ list(of_action_t) actions;
+};
+
+struct ofp_instruction_apply_actions {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ list(of_action_t) actions;
+};
+
+struct ofp_instruction_clear_actions {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_instruction_meter {
+ uint16_t type;
+ uint16_t len;
+ uint32_t meter_id;
+};
+
+struct ofp_instruction_experimenter {
+ uint16_t type;
+ uint16_t len;
+ uint32_t experimenter;
+ of_octets_t data;
+};
+
+struct ofp_flow_add {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ uint8_t table_id;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint16_t flags;
+ uint8_t[2] pad;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_flow_modify {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ uint8_t table_id;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint16_t flags;
+ uint8_t[2] pad;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_flow_modify_strict {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ uint8_t table_id;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint16_t flags;
+ uint8_t[2] pad;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_flow_delete {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ uint8_t table_id;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint16_t flags;
+ uint8_t[2] pad;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_flow_delete_strict {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ uint8_t table_id;
+ of_fm_cmd_t _command;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint16_t priority;
+ uint32_t buffer_id;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint16_t flags;
+ uint8_t[2] pad;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+struct ofp_bucket {
+ uint16_t len;
+ uint16_t weight;
+ of_port_no_t watch_port;
+ uint32_t watch_group;
+ uint8_t[4] pad;
+ list(of_action_t) actions;
+};
+
+struct ofp_group_mod {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t command;
+ uint8_t group_type;
+ uint8_t pad;
+ uint32_t group_id;
+ list(of_bucket_t) buckets;
+};
+
+struct ofp_packet_out {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t buffer_id;
+ of_port_no_t in_port;
+ uint16_t actions_len;
+ uint8_t[6] pad;
+ list(of_action_t) actions;
+ of_octets_t data;
+};
+
+struct ofp_packet_in {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t buffer_id;
+ uint16_t total_len;
+ uint8_t reason;
+ uint8_t table_id;
+ uint64_t cookie;
+ of_match_t match;
+ uint8_t[2] pad;
+ of_octets_t data; /* FIXME: Ensure total_len gets updated */
+};
+
+struct ofp_flow_removed {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint64_t cookie;
+ uint16_t priority;
+ uint8_t reason;
+ uint8_t table_id;
+ uint32_t duration_sec;
+ uint32_t duration_nsec;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint64_t packet_count;
+ uint64_t byte_count;
+ of_match_t match;
+};
+
+struct ofp_meter_band {
+ uint16_t type;
+ uint16_t len;
+// uint32_t rate; // These are excluded b/c this is the header
+// uint32_t burst_size; // These are excluded b/c this is the header
+};
+
+struct ofp_meter_band_drop {
+ uint16_t type;
+ uint16_t len;
+ uint32_t rate;
+ uint32_t burst_size;
+ uint8_t[4] pad;
+};
+
+struct ofp_meter_band_dscp_remark {
+ uint16_t type;
+ uint16_t len;
+ uint32_t rate;
+ uint32_t burst_size;
+ uint8_t prec_level;
+ uint8_t[3] pad;
+};
+
+struct ofp_meter_band_experimenter {
+ uint16_t type;
+ uint16_t len;
+ uint32_t rate;
+ uint32_t burst_size;
+ uint32_t experimenter;
+};
+
+struct ofp_meter_mod {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t command;
+ uint16_t flags;
+ uint32_t meter_id;
+ list(of_meter_band_t) meters;
+};
+
+struct ofp_error_msg {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t err_type;
+ uint16_t code;
+ of_octets_t data;
+};
+
+//struct ofp_error_experimenter_msg {
+// uint8_t version;
+// uint8_t type;
+// uint16_t length;
+// uint32_t xid;
+// uint16_t err_type;
+// uint16_t subtype;
+// uint32_t experimenter;
+// of_octets_t data;
+//};
+
+// STATS ENTRIES: flow, table, port, queue, group stats, group desc stats
+
+struct ofp_flow_stats_entry {
+ uint16_t length;
+ uint8_t table_id;
+ uint8_t pad;
+ uint32_t duration_sec;
+ uint32_t duration_nsec;
+ uint16_t priority;
+ uint16_t idle_timeout;
+ uint16_t hard_timeout;
+ uint8_t[6] pad2;
+ uint64_t cookie;
+ uint64_t packet_count;
+ uint64_t byte_count;
+ of_match_t match;
+ list(of_instruction_t) instructions;
+};
+
+
+struct ofp_table_stats_entry {
+ uint8_t table_id;
+ uint8_t[3] pad;
+ uint32_t active_count;
+ uint64_t lookup_count;
+ uint64_t matched_count;
+};
+
+struct ofp_port_stats_entry {
+ of_port_no_t port_no;
+ uint8_t[4] pad;
+ uint64_t rx_packets;
+ uint64_t tx_packets;
+ uint64_t rx_bytes;
+ uint64_t tx_bytes;
+ uint64_t rx_dropped;
+ uint64_t tx_dropped;
+ uint64_t rx_errors;
+ uint64_t tx_errors;
+ uint64_t rx_frame_err;
+ uint64_t rx_over_err;
+ uint64_t rx_crc_err;
+ uint64_t collisions;
+ uint32_t duration_sec;
+ uint32_t duration_nsec;
+};
+
+struct ofp_queue_stats_entry {
+ of_port_no_t port_no;
+ uint32_t queue_id;
+ uint64_t tx_bytes;
+ uint64_t tx_packets;
+ uint64_t tx_errors;
+ uint32_t duration_sec;
+ uint32_t duration_nsec;
+};
+
+struct ofp_bucket_counter {
+ uint64_t packet_count;
+ uint64_t byte_count;
+};
+
+struct ofp_group_stats_entry {
+ uint16_t length;
+ uint8_t[2] pad;
+ uint32_t group_id;
+ uint32_t ref_count;
+ uint8_t[4] pad;
+ uint64_t packet_count;
+ uint64_t byte_count;
+ uint32_t duration_sec;
+ uint32_t duration_nsec;
+ list(of_bucket_counter_t) bucket_stats;
+};
+
+struct ofp_group_desc_stats_entry {
+ uint16_t length;
+ uint8_t type;
+ uint8_t pad;
+ uint32_t group_id;
+ list(of_bucket_t) buckets;
+};
+
+// STATS:
+// Desc, flow, agg, table, port, queue, group, group_desc, group_feat, experi
+
+struct ofp_desc_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+};
+
+struct ofp_desc_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ of_desc_str_t mfr_desc;
+ of_desc_str_t hw_desc;
+ of_desc_str_t sw_desc;
+ of_serial_num_t serial_num;
+ of_desc_str_t dp_desc;
+};
+
+struct ofp_flow_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint8_t table_id;
+ uint8_t[3] pad;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint8_t[4] pad2;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ of_match_t match;
+};
+
+struct ofp_flow_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_flow_stats_entry_t) entries;
+};
+
+struct ofp_aggregate_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint8_t table_id;
+ uint8_t[3] pad;
+ of_port_no_t out_port;
+ uint32_t out_group;
+ uint8_t[4] pad2;
+ uint64_t cookie;
+ uint64_t cookie_mask;
+ of_match_t match;
+};
+
+struct ofp_aggregate_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint64_t packet_count;
+ uint64_t byte_count;
+ uint32_t flow_count;
+ uint8_t[4] pad;
+};
+
+// FIXME: These are padded to 8 byte align beyond the length indicated
+
+struct ofp_table_feature_prop {
+ uint16_t type;
+ uint16_t length;
+};
+
+struct ofp_table_feature_prop_instructions {
+ uint16_t type;
+ uint16_t length;
+ // FIXME Check if instruction_t is right for ids here
+ list(of_instruction_t) instruction_ids;
+};
+
+struct ofp_table_feature_prop_instructions_miss {
+ uint16_t type;
+ uint16_t length;
+ list(of_instruction_t) instruction_ids;
+};
+
+struct ofp_table_feature_prop_next_tables {
+ uint16_t type;
+ uint16_t length;
+ list(of_uint8_t) next_table_ids;
+};
+
+struct ofp_table_feature_prop_next_tables_miss {
+ uint16_t type;
+ uint16_t length;
+ list(of_uint8_t) next_table_ids;
+};
+
+struct ofp_table_feature_prop_write_actions {
+ uint16_t type;
+ uint16_t length;
+ list(of_action_id_t) action_ids;
+};
+
+struct ofp_table_feature_prop_write_actions_miss {
+ uint16_t type;
+ uint16_t length;
+ list(of_action_id_t) action_ids;
+};
+
+struct ofp_table_feature_prop_apply_actions {
+ uint16_t type;
+ uint16_t length;
+ list(of_action_id_t) action_ids;
+};
+
+struct ofp_table_feature_prop_apply_actions_miss {
+ uint16_t type;
+ uint16_t length;
+ list(of_action_id_t) action_ids;
+};
+
+struct ofp_table_feature_prop_match {
+ uint16_t type;
+ uint16_t length;
+ list(of_uint32_t) oxm_ids;
+};
+
+struct ofp_table_feature_prop_wildcards {
+ uint16_t type;
+ uint16_t length;
+ list(of_uint32_t) oxm_ids;
+};
+
+struct ofp_table_feature_prop_write_setfield {
+ uint16_t type;
+ uint16_t length;
+ list(of_uint32_t) oxm_ids;
+};
+
+struct ofp_table_feature_prop_write_setfield_miss {
+ uint16_t type;
+ uint16_t length;
+ list(of_uint32_t) oxm_ids;
+};
+
+struct ofp_table_feature_prop_apply_setfield {
+ uint16_t type;
+ uint16_t length;
+ list(of_uint32_t) oxm_ids;
+};
+
+struct ofp_table_feature_prop_apply_setfield_miss {
+ uint16_t type;
+ uint16_t length;
+ list(of_uint32_t) oxm_ids;
+};
+
+struct ofp_table_feature_prop_experimenter {
+ uint16_t type;
+ uint16_t length;
+ uint32_t experimenter;
+ uint32_t subtype;
+ of_octets_t experimenter_data;
+};
+
+// Not yet supported
+// struct ofp_table_feature_prop_experimenter_miss {
+// uint16_t type;
+// uint16_t length;
+// uint32_t experimenter;
+// uint32_t subtype;
+// of_octets_t experimenter_data;
+// };
+
+struct ofp_table_features {
+ uint16_t length;
+ uint8_t table_id;
+ uint8_t[5] pad;
+ of_table_name_t name;
+ uint64_t metadata_match;
+ uint64_t metadata_write;
+ uint32_t config;
+ uint32_t max_entries;
+ list(of_table_feature_prop_t) properties;
+};
+
+struct ofp_meter_features {
+ uint32_t max_meter;
+ uint32_t band_types;
+ uint32_t capabilities;
+ uint8_t max_bands;
+ uint8_t max_color;
+ uint8_t[2] pad;
+};
+
+struct ofp_port_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ of_port_no_t port_no;
+ uint8_t[4] pad;
+};
+
+struct ofp_port_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_port_stats_entry_t) entries;
+};
+
+struct ofp_queue_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ of_port_no_t port_no;
+ uint32_t queue_id;
+};
+
+struct ofp_queue_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_queue_stats_entry_t) entries;
+};
+
+struct ofp_group_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint32_t group_id;
+ uint8_t[4] pad;
+};
+
+struct ofp_group_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_group_stats_entry_t) entries;
+};
+
+struct ofp_group_desc_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+};
+
+struct ofp_group_desc_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_group_desc_stats_entry_t) entries;
+};
+
+struct ofp_group_features_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+};
+
+struct ofp_group_features_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint32_t types;
+ uint32_t capabilities;
+ uint32_t max_groups_all;
+ uint32_t max_groups_select;
+ uint32_t max_groups_indirect;
+ uint32_t max_groups_ff;
+ uint32_t actions_all;
+ uint32_t actions_select;
+ uint32_t actions_indirect;
+ uint32_t actions_ff;
+};
+
+struct ofp_meter_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint32_t meter_id;
+ uint8_t[4] pad;
+};
+
+struct ofp_meter_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_meter_stats_t) entries;
+};
+
+struct ofp_meter_config_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ uint32_t meter_id;
+ uint8_t[4] pad;
+};
+
+struct ofp_meter_config_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_meter_band_t) entries;
+};
+
+// FIXME stats added to get things working
+struct ofp_meter_features_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+};
+
+// FIXME stats added to get things working
+struct ofp_meter_features_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ of_meter_features_t features;
+};
+
+// FIXME stats added to get things working
+struct ofp_table_features_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_table_features_t) entries;
+};
+
+// FIXME stats added to get things working
+struct ofp_table_features_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_table_features_t) entries;
+};
+
+// FIXME stats added to get things working
+struct ofp_port_desc_stats_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+};
+
+// FIXME stats added to get things working
+struct ofp_port_desc_stats_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type;
+ uint16_t flags;
+ uint8_t[4] pad;
+ list(of_port_desc_t) entries;
+};
+
+struct ofp_meter_band_stats {
+ uint64_t packet_band_count;
+ uint64_t byte_band_count;
+};
+
+struct ofp_meter_stats {
+ uint32_t meter_id;
+ uint16_t len;
+ uint8_t[6] pad;
+ uint32_t flow_count;
+ uint64_t packet_in_count;
+ uint64_t byte_in_count;
+ uint32_t duration_sec;
+ uint32_t duration_nsec;
+ list(of_meter_band_stats_t) band_stats;
+};
+
+struct ofp_meter_config {
+ uint16_t length;
+ uint16_t flags;
+ uint32_t meter_id;
+ list(of_meter_band_t) entries;
+};
+
+struct ofp_experimenter_multipart_header {
+ uint32_t experimenter;
+ uint32_t subtype;
+};
+
+// END OF STATS OBJECTS
+
+struct ofp_queue_prop {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+};
+
+struct ofp_queue_prop_min_rate {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ uint16_t rate;
+ uint8_t[6] pad;
+};
+
+struct ofp_queue_prop_max_rate {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ uint16_t rate;
+ uint8_t[6] pad;
+};
+
+struct ofp_queue_prop_experimenter {
+ uint16_t type;
+ uint16_t len;
+ uint8_t[4] pad;
+ uint32_t experimenter;
+ uint8_t[4] pad;
+ of_octets_t data;
+};
+
+struct ofp_packet_queue {
+ uint32_t queue_id;
+ of_port_no_t port;
+ uint16_t len;
+ uint8_t[6] pad;
+ list(of_queue_prop_t) properties;
+};
+
+struct ofp_queue_get_config_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_port_no_t port;
+ uint8_t[4] pad;
+};
+
+struct ofp_queue_get_config_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_port_no_t port;
+ uint8_t[4] pad;
+ list(of_packet_queue_t) queues;
+};
+
+struct ofp_role_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t role;
+ uint8_t[4] pad;
+ uint64_t generation_id;
+};
+
+struct ofp_role_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ of_octets_t data;
+};
+
+////////////////////////////////////////////////////////////////
+// FIXME understand async; where do bitmasks live?
+// Determine bitmap type for masks below.
+// DOCUMENT masks where uint32_t[0] is interest for equal/master
+// while uint32_t[1] is interest for slave
+////////////////////////////////////////////////////////////////
+
+struct ofp_async_get_request {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t packet_in_mask_equal_master;
+ uint32_t packet_in_mask_slave;
+ uint32_t port_status_mask_equal_master;
+ uint32_t port_status_mask_slave;
+ uint32_t flow_removed_mask_equal_master;
+ uint32_t flow_removed_mask_slave;
+};
+
+struct ofp_async_get_reply {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t packet_in_mask_equal_master;
+ uint32_t packet_in_mask_slave;
+ uint32_t port_status_mask_equal_master;
+ uint32_t port_status_mask_slave;
+ uint32_t flow_removed_mask_equal_master;
+ uint32_t flow_removed_mask_slave;
+};
+
+struct ofp_async_set {
+ uint8_t version;
+ uint8_t type;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t packet_in_mask_equal_master;
+ uint32_t packet_in_mask_slave;
+ uint32_t port_status_mask_equal_master;
+ uint32_t port_status_mask_slave;
+ uint32_t flow_removed_mask_equal_master;
+ uint32_t flow_removed_mask_slave;
+};