openflow_input: add all enums
diff --git a/openflow_input/standard-1.0 b/openflow_input/standard-1.0
index 943d840..c191b89 100644
--- a/openflow_input/standard-1.0
+++ b/openflow_input/standard-1.0
@@ -24,9 +24,278 @@
 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 // EPL for the specific language governing permissions and limitations
 // under the EPL.
+//
+// Also derived from the OpenFlow header files which have these copyrights:
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
 
 #version 1
 
+enum macro_definitions {
+    OFP_MAX_TABLE_NAME_LEN = 32,
+    OFP_MAX_PORT_NAME_LEN = 16,
+
+    OFP_TCP_PORT = 6633,
+    OFP_SSL_PORT = 6633,
+
+    OFP_ETH_ALEN = 6,
+
+    OFP_DEFAULT_MISS_SEND_LEN = 128,
+
+    OFP_VLAN_NONE = 0xffff,
+
+    OFPFW_ICMP_TYPE = 0x40,
+    OFPFW_ICMP_CODE = 0x80,
+
+    OFP_DL_TYPE_ETH2_CUTOFF = 0x600,
+    OFP_DL_TYPE_NOT_ETH_TYPE = 0x5ff,
+
+    OFP_FLOW_PERMANENT = 0,
+
+    OFP_DEFAULT_PRIORITY = 0x8000,
+
+    DESC_STR_LEN = 256,
+    SERIAL_NUM_LEN = 32,
+
+    OFPQ_ALL = 0xffffffff,
+    OFPQ_MIN_RATE_UNCFG = 0xffff,
+};
+
+enum ofp_type {
+    OFPT_HELLO = 0,
+    OFPT_ERROR = 1,
+    OFPT_ECHO_REQUEST = 2,
+    OFPT_ECHO_REPLY = 3,
+    OFPT_VENDOR = 4,
+    OFPT_FEATURES_REQUEST = 5,
+    OFPT_FEATURES_REPLY = 6,
+    OFPT_GET_CONFIG_REQUEST = 7,
+    OFPT_GET_CONFIG_REPLY = 8,
+    OFPT_SET_CONFIG = 9,
+    OFPT_PACKET_IN = 10,
+    OFPT_FLOW_REMOVED = 11,
+    OFPT_PORT_STATUS = 12,
+    OFPT_PACKET_OUT = 13,
+    OFPT_FLOW_MOD = 14,
+    OFPT_PORT_MOD = 15,
+    OFPT_STATS_REQUEST = 16,
+    OFPT_STATS_REPLY = 17,
+    OFPT_BARRIER_REQUEST = 18,
+    OFPT_BARRIER_REPLY = 19,
+    OFPT_QUEUE_GET_CONFIG_REQUEST = 20,
+    OFPT_QUEUE_GET_CONFIG_REPLY = 21,
+};
+
+enum ofp_port_config {
+    OFPPC_PORT_DOWN = 0x1,
+    OFPPC_NO_STP = 0x2,
+    OFPPC_NO_RECV = 0x4,
+    OFPPC_NO_RECV_STP = 0x8,
+    OFPPC_NO_FLOOD = 0x10,
+    OFPPC_NO_FWD = 0x20,
+    OFPPC_NO_PACKET_IN = 0x40,
+};
+
+enum ofp_port_state {
+    OFPPS_STP_LISTEN = 0,
+    OFPPS_LINK_DOWN = 1,
+    OFPPS_STP_LEARN = 0x100,
+    OFPPS_STP_FORWARD = 0x200,
+    OFPPS_STP_BLOCK = 0x300,
+    OFPPS_STP_MASK = 0x300,
+};
+
+enum ofp_port {
+    OFPP_MAX = 0xffffff00,
+    OFPP_IN_PORT = 0xfffffff8,
+    OFPP_TABLE = 0xfffffff9,
+    OFPP_NORMAL = 0xfffffffa,
+    OFPP_FLOOD = 0xfffffffb,
+    OFPP_ALL = 0xfffffffc,
+    OFPP_CONTROLLER = 0xfffffffd,
+    OFPP_LOCAL = 0xfffffffe,
+    OFPP_NONE = 0xffffffff,
+};
+
+enum ofp_port_features {
+    OFPPF_10MB_HD = 0x1,
+    OFPPF_10MB_FD = 0x2,
+    OFPPF_100MB_HD = 0x4,
+    OFPPF_100MB_FD = 0x8,
+    OFPPF_1GB_HD = 0x10,
+    OFPPF_1GB_FD = 0x20,
+    OFPPF_10GB_FD = 0x40,
+    OFPPF_COPPER = 0x80,
+    OFPPF_FIBER = 0x100,
+    OFPPF_AUTONEG = 0x200,
+    OFPPF_PAUSE = 0x400,
+    OFPPF_PAUSE_ASYM = 0x800,
+};
+
+enum ofp_queue_properties {
+    OFPQT_NONE = 0,
+    OFPQT_MIN_RATE = 1,
+};
+
+enum ofp_flow_wildcards {
+    OFPFW_IN_PORT = 0x1,
+    OFPFW_DL_VLAN = 0x2,
+    OFPFW_DL_SRC = 0x4,
+    OFPFW_NW_DST_BITS = 0x6,
+    OFPFW_NW_SRC_BITS = 0x6,
+    OFPFW_NW_SRC_SHIFT = 0x8,
+    OFPFW_DL_DST = 0x8,
+    OFPFW_NW_DST_SHIFT = 0xe,
+    OFPFW_DL_TYPE = 0x10,
+    OFPFW_NW_PROTO = 0x20,
+    OFPFW_TP_SRC = 0x40,
+    OFPFW_TP_DST = 0x80,
+    OFPFW_NW_SRC_ALL = 0x2000,
+    OFPFW_NW_SRC_MASK = 0x3f00,
+    OFPFW_NW_DST_ALL = 0x80000,
+    OFPFW_NW_DST_MASK = 0xfc000,
+    OFPFW_DL_VLAN_PCP = 0x100000,
+    OFPFW_NW_TOS = 0x200000,
+    OFPFW_ALL = 0x3fffff,
+};
+
+enum ofp_action_type {
+    OFPAT_OUTPUT = 0,
+    OFPAT_SET_VLAN_VID = 1,
+    OFPAT_SET_VLAN_PCP = 2,
+    OFPAT_STRIP_VLAN = 3,
+    OFPAT_SET_DL_SRC = 4,
+    OFPAT_SET_DL_DST = 5,
+    OFPAT_SET_NW_SRC = 6,
+    OFPAT_SET_NW_DST = 7,
+    OFPAT_SET_NW_TOS = 8,
+    OFPAT_SET_TP_SRC = 9,
+    OFPAT_SET_TP_DST = 10,
+    OFPAT_ENQUEUE = 11,
+    OFPAT_VENDOR = 0xffff,
+};
+
+enum ofp_capabilities {
+    OFPC_FLOW_STATS = 0x1,
+    OFPC_TABLE_STATS = 0x2,
+    OFPC_PORT_STATS = 0x4,
+    OFPC_STP = 0x8,
+    OFPC_RESERVED = 0x10,
+    OFPC_IP_REASM = 0x20,
+    OFPC_QUEUE_STATS = 0x40,
+    OFPC_ARP_MATCH_IP = 0x80,
+};
+
+enum ofp_config_flags {
+    OFPC_FRAG_NORMAL = 0x0,
+    OFPC_FRAG_DROP = 0x1,
+    OFPC_FRAG_REASM = 0x2,
+    OFPC_FRAG_MASK = 0x3,
+};
+
+enum ofp_flow_mod_command {
+    OFPFC_ADD = 0,
+    OFPFC_MODIFY = 1,
+    OFPFC_MODIFY_STRICT = 2,
+    OFPFC_DELETE = 3,
+    OFPFC_DELETE_STRICT = 4,
+};
+
+enum ofp_flow_mod_flags {
+    OFPFF_SEND_FLOW_REM = 0x1,
+    OFPFF_CHECK_OVERLAP = 0x2,
+    OFPFF_EMERG = 0x4,
+};
+
+enum ofp_stats_reply_flags {
+    OFPSF_REPLY_MORE = 0x1,
+};
+
+enum ofp_stats_types {
+    OFPST_DESC = 0,
+    OFPST_FLOW = 1,
+    OFPST_AGGREGATE = 2,
+    OFPST_TABLE = 3,
+    OFPST_PORT = 4,
+    OFPST_QUEUE = 5,
+    OFPST_VENDOR = 0xffff,
+};
+
+enum ofp_packet_in_reason {
+    OFPR_NO_MATCH = 0,
+    OFPR_ACTION = 1,
+};
+
+enum ofp_flow_removed_reason {
+    OFPRR_IDLE_TIMEOUT = 0,
+    OFPRR_HARD_TIMEOUT = 1,
+    OFPRR_DELETE = 2,
+};
+
+enum ofp_port_reason {
+    OFPPR_ADD = 0,
+    OFPPR_DELETE = 1,
+    OFPPR_MODIFY = 2,
+};
+
+enum ofp_error_type {
+    OFPET_HELLO_FAILED = 0,
+    OFPET_BAD_REQUEST = 1,
+    OFPET_BAD_ACTION = 2,
+    OFPET_FLOW_MOD_FAILED = 3,
+    OFPET_PORT_MOD_FAILED = 4,
+    OFPET_QUEUE_OP_FAILED = 5,
+};
+
+enum ofp_hello_failed_code {
+    OFPHFC_INCOMPATIBLE = 0,
+    OFPHFC_EPERM = 1,
+};
+
+enum ofp_bad_request_code {
+    OFPBRC_BAD_VERSION = 0,
+    OFPBRC_BAD_TYPE = 1,
+    OFPBRC_BAD_STAT = 2,
+    OFPBRC_BAD_VENDOR = 3,
+    OFPBRC_BAD_SUBTYPE = 4,
+    OFPBRC_EPERM = 5,
+    OFPBRC_BAD_LEN = 6,
+    OFPBRC_BUFFER_EMPTY = 7,
+    OFPBRC_BUFFER_UNKNOWN = 8,
+};
+
+enum ofp_bad_action_code {
+    OFPBAC_BAD_TYPE = 0,
+    OFPBAC_BAD_LEN = 1,
+    OFPBAC_BAD_VENDOR = 2,
+    OFPBAC_BAD_VENDOR_TYPE = 3,
+    OFPBAC_BAD_OUT_PORT = 4,
+    OFPBAC_BAD_ARGUMENT = 5,
+    OFPBAC_EPERM = 6,
+    OFPBAC_TOO_MANY = 7,
+    OFPBAC_BAD_QUEUE = 8,
+};
+
+enum ofp_flow_mod_failed_code {
+    OFPFMFC_ALL_TABLES_FULL = 0,
+    OFPFMFC_OVERLAP = 1,
+    OFPFMFC_EPERM = 2,
+    OFPFMFC_BAD_EMERG_TIMEOUT = 3,
+    OFPFMFC_BAD_COMMAND = 4,
+    OFPFMFC_UNSUPPORTED = 5,
+};
+
+enum ofp_port_mod_failed_code {
+    OFPPMFC_BAD_PORT = 0,
+    OFPPMFC_BAD_HW_ADDR = 1,
+};
+
+enum ofp_queue_op_failed_code {
+    OFPQOFC_BAD_PORT = 0,
+    OFPQOFC_BAD_QUEUE = 1,
+    OFPQOFC_EPERM = 2,
+};
+
 struct ofp_header {
     uint8_t version;
     uint8_t type;
diff --git a/openflow_input/standard-1.1 b/openflow_input/standard-1.1
index 66a4425..1c551d2 100644
--- a/openflow_input/standard-1.1
+++ b/openflow_input/standard-1.1
@@ -24,9 +24,389 @@
 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 // EPL for the specific language governing permissions and limitations
 // under the EPL.
+//
+// Also derived from the OpenFlow header files which have these copyrights:
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
 
 #version 2
 
+enum macro_definitions {
+    OFP_MAX_TABLE_NAME_LEN = 32,
+    OFP_MAX_PORT_NAME_LEN = 16,
+
+    OFP_TCP_PORT = 6633,
+    OFP_SSL_PORT = 6633,
+
+    OFP_ETH_ALEN = 6,
+
+    OFP_DEFAULT_MISS_SEND_LEN = 128,
+
+    OFPFW_ICMP_TYPE = 0x40,
+    OFPFW_ICMP_CODE = 0x80,
+
+    OFP_DL_TYPE_ETH2_CUTOFF = 0x600,
+    OFP_DL_TYPE_NOT_ETH_TYPE = 0x5ff,
+
+    OFP_VLAN_NONE = 0,
+
+    OFPMT_STANDARD_LENGTH = 88,
+
+    OFP_FLOW_PERMANENT = 0,
+
+    OFP_DEFAULT_PRIORITY = 0x8000,
+
+    DESC_STR_LEN = 256,
+    SERIAL_NUM_LEN = 32,
+
+    OFPQ_ALL = 0xffffffff,
+    OFPQ_MIN_RATE_UNCFG = 0xffff,
+};
+
+enum ofp_port {
+    OFPP_MAX = 0xffffff00,
+    OFPP_IN_PORT = 0xfffffff8,
+    OFPP_TABLE = 0xfffffff9,
+    OFPP_NORMAL = 0xfffffffa,
+    OFPP_FLOOD = 0xfffffffb,
+    OFPP_ALL = 0xfffffffc,
+    OFPP_CONTROLLER = 0xfffffffd,
+    OFPP_LOCAL = 0xfffffffe,
+};
+
+enum ofp_port_no {
+    OFPP_ANY = 0xffffffff,
+};
+
+enum ofp_type {
+    OFPT_HELLO = 0,
+    OFPT_ERROR = 1,
+    OFPT_ECHO_REQUEST = 2,
+    OFPT_ECHO_REPLY = 3,
+    OFPT_EXPERIMENTER = 4,
+    OFPT_FEATURES_REQUEST = 5,
+    OFPT_FEATURES_REPLY = 6,
+    OFPT_GET_CONFIG_REQUEST = 7,
+    OFPT_GET_CONFIG_REPLY = 8,
+    OFPT_SET_CONFIG = 9,
+    OFPT_PACKET_IN = 10,
+    OFPT_FLOW_REMOVED = 11,
+    OFPT_PORT_STATUS = 12,
+    OFPT_PACKET_OUT = 13,
+    OFPT_FLOW_MOD = 14,
+    OFPT_GROUP_MOD = 15,
+    OFPT_PORT_MOD = 16,
+    OFPT_TABLE_MOD = 17,
+    OFPT_STATS_REQUEST = 18,
+    OFPT_STATS_REPLY = 19,
+    OFPT_BARRIER_REQUEST = 20,
+    OFPT_BARRIER_REPLY = 21,
+    OFPT_QUEUE_GET_CONFIG_REQUEST = 22,
+    OFPT_QUEUE_GET_CONFIG_REPLY = 23,
+};
+
+enum ofp_config_flags {
+    OFPC_FRAG_NORMAL = 0,
+    OFPC_FRAG_DROP = 1,
+    OFPC_FRAG_REASM = 2,
+    OFPC_FRAG_MASK = 3,
+    OFPC_INVALID_TTL_TO_CONTROLLER = 4,
+};
+
+enum ofp_table_config {
+    OFPTC_TABLE_MISS_CONTROLLER = 0,
+    OFPTC_TABLE_MISS_CONTINUE = 1,
+    OFPTC_TABLE_MISS_DROP = 2,
+    OFPTC_TABLE_MISS_MASK = 3,
+};
+
+enum ofp_capabilities {
+    OFPC_FLOW_STATS = 0x1,
+    OFPC_TABLE_STATS = 0x2,
+    OFPC_PORT_STATS = 0x4,
+    OFPC_GROUP_STATS = 0x8,
+    OFPC_IP_REASM = 0x20,
+    OFPC_QUEUE_STATS = 0x40,
+    OFPC_ARP_MATCH_IP = 0x80,
+};
+
+enum ofp_port_config {
+    OFPPC_PORT_DOWN = 0x1,
+    OFPPC_NO_RECV = 0x4,
+    OFPPC_NO_FWD = 0x20,
+    OFPPC_NO_PACKET_IN = 0x40,
+};
+
+enum ofp_port_state {
+    OFPPS_LINK_DOWN = 0x1,
+    OFPPS_BLOCKED = 0x2,
+    OFPPS_LIVE = 0x4,
+};
+
+enum ofp_port_features {
+    OFPPF_10MB_HD = 0x1,
+    OFPPF_10MB_FD = 0x2,
+    OFPPF_100MB_HD = 0x4,
+    OFPPF_100MB_FD = 0x8,
+    OFPPF_1GB_HD = 0x10,
+    OFPPF_1GB_FD = 0x20,
+    OFPPF_10GB_FD = 0x40,
+    OFPPF_40GB_FD = 0x80,
+    OFPPF_100GB_FD = 0x100,
+    OFPPF_1TB_FD = 0x200,
+    OFPPF_OTHER = 0x400,
+    OFPPF_COPPER = 0x800,
+    OFPPF_FIBER = 0x1000,
+    OFPPF_AUTONEG = 0x2000,
+    OFPPF_PAUSE = 0x4000,
+    OFPPF_PAUSE_ASYM = 0x8000,
+};
+
+enum ofp_port_reason {
+    OFPPR_ADD = 0,
+    OFPPR_DELETE = 1,
+    OFPPR_MODIFY = 2,
+};
+
+enum ofp_packet_in_reason {
+    OFPR_NO_MATCH = 0,
+    OFPR_ACTION = 1,
+};
+
+enum ofp_action_type {
+    OFPAT_OUTPUT = 0,
+    OFPAT_SET_VLAN_VID = 1,
+    OFPAT_SET_VLAN_PCP = 2,
+    OFPAT_SET_DL_SRC = 3,
+    OFPAT_SET_DL_DST = 4,
+    OFPAT_SET_NW_SRC = 5,
+    OFPAT_SET_NW_DST = 6,
+    OFPAT_SET_NW_TOS = 7,
+    OFPAT_SET_NW_ECN = 8,
+    OFPAT_SET_TP_SRC = 9,
+    OFPAT_SET_TP_DST = 10,
+    OFPAT_COPY_TTL_OUT = 11,
+    OFPAT_COPY_TTL_IN = 12,
+    OFPAT_SET_MPLS_LABEL = 13,
+    OFPAT_SET_MPLS_TC = 14,
+    OFPAT_SET_MPLS_TTL = 15,
+    OFPAT_DEC_MPLS_TTL = 16,
+    OFPAT_PUSH_VLAN = 17,
+    OFPAT_POP_VLAN = 18,
+    OFPAT_PUSH_MPLS = 19,
+    OFPAT_POP_MPLS = 20,
+    OFPAT_SET_QUEUE = 21,
+    OFPAT_GROUP = 22,
+    OFPAT_SET_NW_TTL = 23,
+    OFPAT_DEC_NW_TTL = 24,
+    OFPAT_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_flow_mod_command {
+    OFPFC_ADD = 0,
+    OFPFC_MODIFY = 1,
+    OFPFC_MODIFY_STRICT = 2,
+    OFPFC_DELETE = 3,
+    OFPFC_DELETE_STRICT = 4,
+};
+
+enum ofp_group_mod_command {
+    OFPGC_ADD = 0,
+    OFPGC_MODIFY = 1,
+    OFPGC_DELETE = 2,
+};
+
+enum ofp_flow_wildcards {
+    OFPFW_IN_PORT = 0x1,
+    OFPFW_DL_VLAN = 0x2,
+    OFPFW_DL_VLAN_PCP = 0x4,
+    OFPFW_DL_TYPE = 0x8,
+    OFPFW_NW_TOS = 0x10,
+    OFPFW_NW_PROTO = 0x20,
+    OFPFW_TP_SRC = 0x40,
+    OFPFW_TP_DST = 0x80,
+    OFPFW_MPLS_LABEL = 0x100,
+    OFPFW_MPLS_TC = 0x200,
+    OFPFW_ALL = 0x3ff,
+};
+
+enum ofp_vlan_id {
+    OFPVID_ANY = 0xfffe,
+    OFPVID_NONE = 0xffff,
+};
+
+enum ofp_match_type {
+    OFPMT_STANDARD = 0,
+};
+
+enum ofp_instruction_type {
+    OFPIT_GOTO_TABLE = 0x1,
+    OFPIT_WRITE_METADATA = 0x2,
+    OFPIT_WRITE_ACTIONS = 0x3,
+    OFPIT_APPLY_ACTIONS = 0x4,
+    OFPIT_CLEAR_ACTIONS = 0x5,
+    OFPIT_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_flow_mod_flags {
+    OFPFF_SEND_FLOW_REM = 0x1,
+    OFPFF_CHECK_OVERLAP = 0x2,
+};
+
+enum ofp_group {
+    OFPG_MAX = 0xffffff00,
+    OFPG_ALL = 0xfffffffc,
+    OFPG_ANY = 0xffffffff,
+};
+
+enum ofp_group_type {
+    OFPGT_ALL = 0,
+    OFPGT_SELECT = 1,
+    OFPGT_INDIRECT = 2,
+    OFPGT_FF = 3,
+};
+
+enum ofp_flow_removed_reason {
+    OFPRR_IDLE_TIMEOUT = 0,
+    OFPRR_HARD_TIMEOUT = 1,
+    OFPRR_DELETE = 2,
+    OFPRR_GROUP_DELETE = 3,
+};
+
+enum ofp_error_type {
+    OFPET_HELLO_FAILED = 0,
+    OFPET_BAD_REQUEST = 1,
+    OFPET_BAD_ACTION = 2,
+    OFPET_BAD_INSTRUCTION = 3,
+    OFPET_BAD_MATCH = 4,
+    OFPET_FLOW_MOD_FAILED = 5,
+    OFPET_GROUP_MOD_FAILED = 6,
+    OFPET_PORT_MOD_FAILED = 7,
+    OFPET_TABLE_MOD_FAILED = 8,
+    OFPET_QUEUE_OP_FAILED = 9,
+    OFPET_SWITCH_CONFIG_FAILED = 10,
+};
+
+enum ofp_hello_failed_code {
+    OFPHFC_INCOMPATIBLE = 0,
+    OFPHFC_EPERM = 1,
+};
+
+enum ofp_bad_request_code {
+    OFPBRC_BAD_VERSION = 0,
+    OFPBRC_BAD_TYPE = 1,
+    OFPBRC_BAD_STAT = 2,
+    OFPBRC_BAD_EXPERIMENTER = 3,
+    OFPBRC_BAD_SUBTYPE = 4,
+    OFPBRC_EPERM = 5,
+    OFPBRC_BAD_LEN = 6,
+    OFPBRC_BUFFER_EMPTY = 7,
+    OFPBRC_BUFFER_UNKNOWN = 8,
+    OFPBRC_BAD_TABLE_ID = 9,
+};
+
+enum ofp_bad_action_code {
+    OFPBAC_BAD_TYPE = 0,
+    OFPBAC_BAD_LEN = 1,
+    OFPBAC_BAD_EXPERIMENTER = 2,
+    OFPBAC_BAD_EXPERIMENTER_TYPE = 3,
+    OFPBAC_BAD_OUT_PORT = 4,
+    OFPBAC_BAD_ARGUMENT = 5,
+    OFPBAC_EPERM = 6,
+    OFPBAC_TOO_MANY = 7,
+    OFPBAC_BAD_QUEUE = 8,
+    OFPBAC_BAD_OUT_GROUP = 9,
+    OFPBAC_MATCH_INCONSISTENT = 10,
+    OFPBAC_UNSUPPORTED_ORDER = 11,
+    OFPBAC_BAD_TAG = 12,
+};
+
+enum ofp_bad_instruction_code {
+    OFPBIC_UNKNOWN_INST = 0,
+    OFPBIC_UNSUP_INST = 1,
+    OFPBIC_BAD_TABLE_ID = 2,
+    OFPBIC_UNSUP_METADATA = 3,
+    OFPBIC_UNSUP_METADATA_MASK = 4,
+    OFPBIC_UNSUP_EXP_INST = 5,
+};
+
+enum ofp_bad_match_code {
+    OFPBMC_BAD_TYPE = 0,
+    OFPBMC_BAD_LEN = 1,
+    OFPBMC_BAD_TAG = 2,
+    OFPBMC_BAD_DL_ADDR_MASK = 3,
+    OFPBMC_BAD_NW_ADDR_MASK = 4,
+    OFPBMC_BAD_WILDCARDS = 5,
+    OFPBMC_BAD_FIELD = 6,
+    OFPBMC_BAD_VALUE = 7,
+};
+
+enum ofp_flow_mod_failed_code {
+    OFPFMFC_UNKNOWN = 0,
+    OFPFMFC_TABLE_FULL = 1,
+    OFPFMFC_BAD_TABLE_ID = 2,
+    OFPFMFC_OVERLAP = 3,
+    OFPFMFC_EPERM = 4,
+    OFPFMFC_BAD_TIMEOUT = 5,
+    OFPFMFC_BAD_COMMAND = 6,
+};
+
+enum ofp_group_mod_failed_code {
+    OFPGMFC_GROUP_EXISTS = 0,
+    OFPGMFC_INVALID_GROUP = 1,
+    OFPGMFC_WEIGHT_UNSUPPORTED = 2,
+    OFPGMFC_OUT_OF_GROUPS = 3,
+    OFPGMFC_OUT_OF_BUCKETS = 4,
+    OFPGMFC_CHAINING_UNSUPPORTED = 5,
+    OFPGMFC_WATCH_UNSUPPORTED = 6,
+    OFPGMFC_LOOP = 7,
+    OFPGMFC_UNKNOWN_GROUP = 8,
+};
+
+enum ofp_port_mod_failed_code {
+    OFPPMFC_BAD_PORT = 0,
+    OFPPMFC_BAD_HW_ADDR = 1,
+    OFPPMFC_BAD_CONFIG = 2,
+    OFPPMFC_BAD_ADVERTISE = 3,
+};
+
+enum ofp_table_mod_failed_code {
+    OFPTMFC_BAD_TABLE = 0,
+    OFPTMFC_BAD_CONFIG = 1,
+};
+
+enum ofp_queue_op_failed_code {
+    OFPQOFC_BAD_PORT = 0,
+    OFPQOFC_BAD_QUEUE = 1,
+    OFPQOFC_EPERM = 2,
+};
+
+enum ofp_switch_config_failed_code {
+    OFPSCFC_BAD_FLAGS = 0,
+    OFPSCFC_BAD_LEN = 1,
+};
+
+enum ofp_stats_types {
+    OFPST_DESC = 0,
+    OFPST_FLOW = 1,
+    OFPST_AGGREGATE = 2,
+    OFPST_TABLE = 3,
+    OFPST_PORT = 4,
+    OFPST_QUEUE = 5,
+    OFPST_GROUP = 6,
+    OFPST_GROUP_DESC = 7,
+    OFPST_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_stats_reply_flags {
+    OFPSF_REPLY_MORE = 0x1,
+};
+
+enum ofp_queue_properties {
+    OFPQT_NONE = 0,
+    OFPQT_MIN_RATE = 1,
+};
+
 struct ofp_header {
     uint8_t version;
     uint8_t type;
diff --git a/openflow_input/standard-1.2 b/openflow_input/standard-1.2
index 0961abd..0d48c43 100644
--- a/openflow_input/standard-1.2
+++ b/openflow_input/standard-1.2
@@ -24,9 +24,429 @@
 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 // EPL for the specific language governing permissions and limitations
 // under the EPL.
+//
+// Also derived from the OpenFlow header files which have these copyrights:
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
 
 #version 3
 
+enum macro_definitions {
+    OFP_MAX_TABLE_NAME_LEN = 32,
+    OFP_MAX_PORT_NAME_LEN = 16,
+
+    OFP_TCP_PORT = 6633,
+    OFP_SSL_PORT = 6633,
+
+    OFP_ETH_ALEN = 6,
+
+    OFP_DEFAULT_MISS_SEND_LEN = 128,
+
+    OFP_VLAN_NONE = 0,
+
+    OFP_FLOW_PERMANENT = 0,
+
+    OFP_DEFAULT_PRIORITY = 0x8000,
+
+    OFP_NO_BUFFER = 0xffffffff,
+
+    DESC_STR_LEN = 256,
+    SERIAL_NUM_LEN = 32,
+
+    OFPQ_ALL = 0xffffffff,
+
+    OFPQ_MIN_RATE_UNCFG = 0xffff,
+    OFPQ_MAX_RATE_UNCFG = 0xffff,
+};
+
+enum ofp_port {
+    OFPP_MAX = 0xffffff00,
+    OFPP_IN_PORT = 0xfffffff8,
+    OFPP_TABLE = 0xfffffff9,
+    OFPP_NORMAL = 0xfffffffa,
+    OFPP_FLOOD = 0xfffffffb,
+    OFPP_ALL = 0xfffffffc,
+    OFPP_CONTROLLER = 0xfffffffd,
+    OFPP_LOCAL = 0xfffffffe,
+};
+
+enum ofp_port_no {
+    OFPP_ANY = 0xffffffff,
+};
+
+enum ofp_type {
+    OFPT_HELLO = 0,
+    OFPT_ERROR = 1,
+    OFPT_ECHO_REQUEST = 2,
+    OFPT_ECHO_REPLY = 3,
+    OFPT_EXPERIMENTER = 4,
+    OFPT_FEATURES_REQUEST = 5,
+    OFPT_FEATURES_REPLY = 6,
+    OFPT_GET_CONFIG_REQUEST = 7,
+    OFPT_GET_CONFIG_REPLY = 8,
+    OFPT_SET_CONFIG = 9,
+    OFPT_PACKET_IN = 10,
+    OFPT_FLOW_REMOVED = 11,
+    OFPT_PORT_STATUS = 12,
+    OFPT_PACKET_OUT = 13,
+    OFPT_FLOW_MOD = 14,
+    OFPT_GROUP_MOD = 15,
+    OFPT_PORT_MOD = 16,
+    OFPT_TABLE_MOD = 17,
+    OFPT_STATS_REQUEST = 18,
+    OFPT_STATS_REPLY = 19,
+    OFPT_BARRIER_REQUEST = 20,
+    OFPT_BARRIER_REPLY = 21,
+    OFPT_QUEUE_GET_CONFIG_REQUEST = 22,
+    OFPT_QUEUE_GET_CONFIG_REPLY = 23,
+    OFPT_ROLE_REQUEST = 24,
+    OFPT_ROLE_REPLY = 25,
+};
+
+enum ofp_config_flags {
+    OFPC_FRAG_NORMAL = 0,
+    OFPC_FRAG_DROP = 1,
+    OFPC_FRAG_REASM = 2,
+    OFPC_FRAG_MASK = 3,
+    OFPC_INVALID_TTL_TO_CONTROLLER = 4,
+};
+
+enum ofp_table_config {
+    OFPTC_TABLE_MISS_CONTROLLER = 0,
+    OFPTC_TABLE_MISS_CONTINUE = 1,
+    OFPTC_TABLE_MISS_DROP = 2,
+    OFPTC_TABLE_MISS_MASK = 3,
+};
+
+enum ofp_table {
+    OFPTT_MAX = 0xfe,
+    OFPTT_ALL = 0xff,
+};
+
+enum ofp_capabilities {
+    OFPC_FLOW_STATS = 0x1,
+    OFPC_TABLE_STATS = 0x2,
+    OFPC_PORT_STATS = 0x4,
+    OFPC_GROUP_STATS = 0x8,
+    OFPC_IP_REASM = 0x20,
+    OFPC_QUEUE_STATS = 0x40,
+    OFPC_PORT_BLOCKED = 0x100,
+};
+
+enum ofp_port_config {
+    OFPPC_PORT_DOWN = 0x1,
+    OFPPC_NO_RECV = 0x4,
+    OFPPC_NO_FWD = 0x20,
+    OFPPC_NO_PACKET_IN = 0x40,
+};
+
+enum ofp_port_state {
+    OFPPS_LINK_DOWN = 0x1,
+    OFPPS_BLOCKED = 0x2,
+    OFPPS_LIVE = 0x4,
+};
+
+enum ofp_port_features {
+    OFPPF_10MB_HD = 0x1,
+    OFPPF_10MB_FD = 0x2,
+    OFPPF_100MB_HD = 0x4,
+    OFPPF_100MB_FD = 0x8,
+    OFPPF_1GB_HD = 0x10,
+    OFPPF_1GB_FD = 0x20,
+    OFPPF_10GB_FD = 0x40,
+    OFPPF_40GB_FD = 0x80,
+    OFPPF_100GB_FD = 0x100,
+    OFPPF_1TB_FD = 0x200,
+    OFPPF_OTHER = 0x400,
+    OFPPF_COPPER = 0x800,
+    OFPPF_FIBER = 0x1000,
+    OFPPF_AUTONEG = 0x2000,
+    OFPPF_PAUSE = 0x4000,
+    OFPPF_PAUSE_ASYM = 0x8000,
+};
+
+enum ofp_port_reason {
+    OFPPR_ADD = 0,
+    OFPPR_DELETE = 1,
+    OFPPR_MODIFY = 2,
+};
+
+enum ofp_match_type {
+    OFPMT_STANDARD = 0,
+    OFPMT_OXM = 1,
+};
+
+enum ofp_oxm_class {
+    OFPXMC_NXM_0 = 0,
+    OFPXMC_NXM_1 = 1,
+    OFPXMC_OPENFLOW_BASIC = 0x8000,
+    OFPXMC_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_vlan_id {
+    OFPVID_NONE = 0,
+    OFPVID_PRESENT = 0x1000,
+};
+
+enum ofp_action_type {
+    OFPAT_OUTPUT = 0,
+    OFPAT_COPY_TTL_OUT = 0xb,
+    OFPAT_COPY_TTL_IN = 0xc,
+    OFPAT_SET_MPLS_TTL = 0xf,
+    OFPAT_DEC_MPLS_TTL = 0x10,
+    OFPAT_PUSH_VLAN = 0x11,
+    OFPAT_POP_VLAN = 0x12,
+    OFPAT_PUSH_MPLS = 0x13,
+    OFPAT_POP_MPLS = 0x14,
+    OFPAT_SET_QUEUE = 0x15,
+    OFPAT_GROUP = 0x16,
+    OFPAT_SET_NW_TTL = 0x17,
+    OFPAT_DEC_NW_TTL = 0x18,
+    OFPAT_SET_FIELD = 0x19,
+    OFPAT_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_controller_max_len {
+    OFPCML_MAX = 0xffe5,
+    OFPCML_NO_BUFFER = 0xffff,
+};
+
+enum ofp_instruction_type {
+    OFPIT_GOTO_TABLE = 0x1,
+    OFPIT_WRITE_METADATA = 0x2,
+    OFPIT_WRITE_ACTIONS = 0x3,
+    OFPIT_APPLY_ACTIONS = 0x4,
+    OFPIT_CLEAR_ACTIONS = 0x5,
+    OFPIT_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_flow_mod_command {
+    OFPFC_ADD = 0,
+    OFPFC_MODIFY = 1,
+    OFPFC_MODIFY_STRICT = 2,
+    OFPFC_DELETE = 3,
+    OFPFC_DELETE_STRICT = 4,
+};
+
+enum ofp_flow_mod_flags {
+    OFPFF_SEND_FLOW_REM = 0x1,
+    OFPFF_CHECK_OVERLAP = 0x2,
+    OFPFF_RESET_COUNTS = 0x4,
+};
+
+enum ofp_group {
+    OFPG_MAX = 0xffffff00,
+    OFPG_ALL = 0xfffffffc,
+    OFPG_ANY = 0xffffffff,
+};
+
+enum ofp_group_mod_command {
+    OFPGC_ADD = 0,
+    OFPGC_MODIFY = 1,
+    OFPGC_DELETE = 2,
+};
+
+enum ofp_group_type {
+    OFPGT_ALL = 0,
+    OFPGT_SELECT = 1,
+    OFPGT_INDIRECT = 2,
+    OFPGT_FF = 3,
+};
+
+enum ofp_packet_in_reason {
+    OFPR_NO_MATCH = 0,
+    OFPR_ACTION = 1,
+    OFPR_INVALID_TTL = 2,
+};
+
+enum ofp_flow_removed_reason {
+    OFPRR_IDLE_TIMEOUT = 0,
+    OFPRR_HARD_TIMEOUT = 1,
+    OFPRR_DELETE = 2,
+    OFPRR_GROUP_DELETE = 3,
+};
+
+enum ofp_error_type {
+    OFPET_HELLO_FAILED = 0,
+    OFPET_BAD_REQUEST = 1,
+    OFPET_BAD_ACTION = 2,
+    OFPET_BAD_INSTRUCTION = 3,
+    OFPET_BAD_MATCH = 4,
+    OFPET_FLOW_MOD_FAILED = 5,
+    OFPET_GROUP_MOD_FAILED = 6,
+    OFPET_PORT_MOD_FAILED = 7,
+    OFPET_TABLE_MOD_FAILED = 8,
+    OFPET_QUEUE_OP_FAILED = 9,
+    OFPET_SWITCH_CONFIG_FAILED = 10,
+    OFPET_ROLE_REQUEST_FAILED = 11,
+    OFPET_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_hello_failed_code {
+    OFPHFC_INCOMPATIBLE = 0,
+    OFPHFC_EPERM = 1,
+};
+
+enum ofp_bad_request_code {
+    OFPBRC_BAD_VERSION = 0,
+    OFPBRC_BAD_TYPE = 1,
+    OFPBRC_BAD_STAT = 2,
+    OFPBRC_BAD_EXPERIMENTER = 3,
+    OFPBRC_BAD_EXP_TYPE = 4,
+    OFPBRC_EPERM = 5,
+    OFPBRC_BAD_LEN = 6,
+    OFPBRC_BUFFER_EMPTY = 7,
+    OFPBRC_BUFFER_UNKNOWN = 8,
+    OFPBRC_BAD_TABLE_ID = 9,
+    OFPBRC_IS_SLAVE = 10,
+    OFPBRC_BAD_PORT = 11,
+    OFPBRC_BAD_PACKET = 12,
+};
+
+enum ofp_bad_action_code {
+    OFPBAC_BAD_TYPE = 0,
+    OFPBAC_BAD_LEN = 1,
+    OFPBAC_BAD_EXPERIMENTER = 2,
+    OFPBAC_BAD_EXP_TYPE = 3,
+    OFPBAC_BAD_OUT_PORT = 4,
+    OFPBAC_BAD_ARGUMENT = 5,
+    OFPBAC_EPERM = 6,
+    OFPBAC_TOO_MANY = 7,
+    OFPBAC_BAD_QUEUE = 8,
+    OFPBAC_BAD_OUT_GROUP = 9,
+    OFPBAC_MATCH_INCONSISTENT = 10,
+    OFPBAC_UNSUPPORTED_ORDER = 11,
+    OFPBAC_BAD_TAG = 12,
+    OFPBAC_BAD_SET_TYPE = 13,
+    OFPBAC_BAD_SET_LEN = 14,
+    OFPBAC_BAD_SET_ARGUMENT = 15,
+};
+
+enum ofp_bad_instruction_code {
+    OFPBIC_UNKNOWN_INST = 0,
+    OFPBIC_UNSUP_INST = 1,
+    OFPBIC_BAD_TABLE_ID = 2,
+    OFPBIC_UNSUP_METADATA = 3,
+    OFPBIC_UNSUP_METADATA_MASK = 4,
+    OFPBIC_BAD_EXPERIMENTER = 5,
+    OFPBIC_BAD_EXP_TYPE = 6,
+    OFPBIC_BAD_LEN = 7,
+    OFPBIC_EPERM = 8,
+};
+
+enum ofp_bad_match_code {
+    OFPBMC_BAD_TYPE = 0,
+    OFPBMC_BAD_LEN = 1,
+    OFPBMC_BAD_TAG = 2,
+    OFPBMC_BAD_DL_ADDR_MASK = 3,
+    OFPBMC_BAD_NW_ADDR_MASK = 4,
+    OFPBMC_BAD_WILDCARDS = 5,
+    OFPBMC_BAD_FIELD = 6,
+    OFPBMC_BAD_VALUE = 7,
+    OFPBMC_BAD_MASK = 8,
+    OFPBMC_BAD_PREREQ = 9,
+    OFPBMC_DUP_FIELD = 10,
+    OFPBMC_EPERM = 11,
+};
+
+enum ofp_flow_mod_failed_code {
+    OFPFMFC_UNKNOWN = 0,
+    OFPFMFC_TABLE_FULL = 1,
+    OFPFMFC_BAD_TABLE_ID = 2,
+    OFPFMFC_OVERLAP = 3,
+    OFPFMFC_EPERM = 4,
+    OFPFMFC_BAD_TIMEOUT = 5,
+    OFPFMFC_BAD_COMMAND = 6,
+    OFPFMFC_BAD_FLAGS = 7,
+};
+
+enum ofp_group_mod_failed_code {
+    OFPGMFC_GROUP_EXISTS = 0,
+    OFPGMFC_INVALID_GROUP = 1,
+    OFPGMFC_WEIGHT_UNSUPPORTED = 2,
+    OFPGMFC_OUT_OF_GROUPS = 3,
+    OFPGMFC_OUT_OF_BUCKETS = 4,
+    OFPGMFC_CHAINING_UNSUPPORTED = 5,
+    OFPGMFC_WATCH_UNSUPPORTED = 6,
+    OFPGMFC_LOOP = 7,
+    OFPGMFC_UNKNOWN_GROUP = 8,
+    OFPGMFC_CHAINED_GROUP = 9,
+    OFPGMFC_BAD_TYPE = 10,
+    OFPGMFC_BAD_COMMAND = 11,
+    OFPGMFC_BAD_BUCKET = 12,
+    OFPGMFC_BAD_WATCH = 13,
+    OFPGMFC_EPERM = 14,
+};
+
+enum ofp_port_mod_failed_code {
+    OFPPMFC_BAD_PORT = 0,
+    OFPPMFC_BAD_HW_ADDR = 1,
+    OFPPMFC_BAD_CONFIG = 2,
+    OFPPMFC_BAD_ADVERTISE = 3,
+    OFPPMFC_EPERM = 4,
+};
+
+enum ofp_table_mod_failed_code {
+    OFPTMFC_BAD_TABLE = 0,
+    OFPTMFC_BAD_CONFIG = 1,
+    OFPTMFC_EPERM = 2,
+};
+
+enum ofp_queue_op_failed_code {
+    OFPQOFC_BAD_PORT = 0,
+    OFPQOFC_BAD_QUEUE = 1,
+    OFPQOFC_EPERM = 2,
+};
+
+enum ofp_switch_config_failed_code {
+    OFPSCFC_BAD_FLAGS = 0,
+    OFPSCFC_BAD_LEN = 1,
+    OFPSCFC_EPERM = 2,
+};
+
+enum ofp_role_request_failed_code {
+    OFPRRFC_STALE = 0,
+    OFPRRFC_UNSUP = 1,
+    OFPRRFC_BAD_ROLE = 2,
+};
+
+enum ofp_stats_types {
+    OFPST_DESC = 0,
+    OFPST_FLOW = 1,
+    OFPST_AGGREGATE = 2,
+    OFPST_TABLE = 3,
+    OFPST_PORT = 4,
+    OFPST_QUEUE = 5,
+    OFPST_GROUP = 6,
+    OFPST_GROUP_DESC = 7,
+    OFPST_GROUP_FEATURES = 8,
+    OFPST_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_stats_reply_flags {
+    OFPSF_REPLY_MORE = 0x1,
+};
+
+enum ofp_group_capabilities {
+    OFPGFC_SELECT_WEIGHT = 0x1,
+    OFPGFC_SELECT_LIVENESS = 0x2,
+    OFPGFC_CHAINING = 0x4,
+    OFPGFC_CHAINING_CHECKS = 0x8,
+};
+
+enum ofp_queue_properties {
+    OFPQT_MIN_RATE = 0x1,
+    OFPQT_MAX_RATE = 0x2,
+    OFPQT_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_controller_role {
+    OFPCR_ROLE_NOCHANGE = 0,
+    OFPCR_ROLE_EQUAL = 1,
+    OFPCR_ROLE_MASTER = 2,
+    OFPCR_ROLE_SLAVE = 3,
+};
+
 struct ofp_header {
     uint8_t version;
     uint8_t type;
diff --git a/openflow_input/standard-1.3 b/openflow_input/standard-1.3
index 258ec01..bf7503b 100644
--- a/openflow_input/standard-1.3
+++ b/openflow_input/standard-1.3
@@ -24,9 +24,526 @@
 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 // EPL for the specific language governing permissions and limitations
 // under the EPL.
+//
+// Also derived from the OpenFlow header files which have these copyrights:
+// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+// Copyright (c) 2011, 2012 Open Networking Foundation
 
 #version 4
 
+enum macro_definitions {
+    OFP_MAX_TABLE_NAME_LEN = 32,
+    OFP_MAX_PORT_NAME_LEN = 16,
+
+    OFP_TCP_PORT = 6633,
+    OFP_SSL_PORT = 6633,
+
+    OFP_ETH_ALEN = 6,
+
+    OFP_DEFAULT_MISS_SEND_LEN = 128,
+
+    OFP_VLAN_NONE = 0,
+
+    OFP_FLOW_PERMANENT = 0,
+
+    OFP_DEFAULT_PRIORITY = 0x8000,
+
+    OFP_NO_BUFFER = 0xffffffff,
+
+    DESC_STR_LEN = 256,
+    SERIAL_NUM_LEN = 32,
+
+    OFPQ_ALL = 0xffffffff,
+    OFPQ_MAX_RATE_UNCFG = 0xffff,
+    OFPQ_MIN_RATE_UNCFG = 0xffff,
+};
+
+enum ofp_port_no {
+    OFPP_ANY = 0xffffffff,
+};
+
+enum ofp_port {
+    OFPP_MAX = 0xffffff00,
+    OFPP_IN_PORT = 0xfffffff8,
+    OFPP_TABLE = 0xfffffff9,
+    OFPP_NORMAL = 0xfffffffa,
+    OFPP_FLOOD = 0xfffffffb,
+    OFPP_ALL = 0xfffffffc,
+    OFPP_CONTROLLER = 0xfffffffd,
+    OFPP_LOCAL = 0xfffffffe,
+};
+
+enum ofp_type {
+    OFPT_HELLO = 0,
+    OFPT_ERROR = 1,
+    OFPT_ECHO_REQUEST = 2,
+    OFPT_ECHO_REPLY = 3,
+    OFPT_EXPERIMENTER = 4,
+    OFPT_FEATURES_REQUEST = 5,
+    OFPT_FEATURES_REPLY = 6,
+    OFPT_GET_CONFIG_REQUEST = 7,
+    OFPT_GET_CONFIG_REPLY = 8,
+    OFPT_SET_CONFIG = 9,
+    OFPT_PACKET_IN = 10,
+    OFPT_FLOW_REMOVED = 11,
+    OFPT_PORT_STATUS = 12,
+    OFPT_PACKET_OUT = 13,
+    OFPT_FLOW_MOD = 14,
+    OFPT_GROUP_MOD = 15,
+    OFPT_PORT_MOD = 16,
+    OFPT_TABLE_MOD = 17,
+    OFPT_MULTIPART_REQUEST = 18,
+    OFPT_MULTIPART_REPLY = 19,
+    OFPT_BARRIER_REQUEST = 20,
+    OFPT_BARRIER_REPLY = 21,
+    OFPT_QUEUE_GET_CONFIG_REQUEST = 22,
+    OFPT_QUEUE_GET_CONFIG_REPLY = 23,
+    OFPT_ROLE_REQUEST = 24,
+    OFPT_ROLE_REPLY = 25,
+    OFPT_GET_ASYNC_REQUEST = 26,
+    OFPT_GET_ASYNC_REPLY = 27,
+    OFPT_SET_ASYNC = 28,
+    OFPT_METER_MOD = 29,
+};
+
+enum ofp_config_flags {
+    OFPC_FRAG_NORMAL = 0,
+    OFPC_FRAG_DROP = 1,
+    OFPC_FRAG_REASM = 2,
+    OFPC_FRAG_MASK = 3,
+};
+
+enum ofp_table_config {
+    OFPTC_DEPRECATED_MASK = 0x3,
+};
+
+enum ofp_table {
+    OFPTT_MAX = 0xfe,
+    OFPTT_ALL = 0xff,
+};
+
+enum ofp_capabilities {
+    OFPC_FLOW_STATS = 0x1,
+    OFPC_TABLE_STATS = 0x2,
+    OFPC_PORT_STATS = 0x4,
+    OFPC_GROUP_STATS = 0x8,
+    OFPC_IP_REASM = 0x20,
+    OFPC_QUEUE_STATS = 0x40,
+    OFPC_PORT_BLOCKED = 0x100,
+};
+
+enum ofp_port_config {
+    OFPPC_PORT_DOWN = 0x1,
+    OFPPC_NO_RECV = 0x4,
+    OFPPC_NO_FWD = 0x20,
+    OFPPC_NO_PACKET_IN = 0x40,
+};
+
+enum ofp_port_state {
+    OFPPS_LINK_DOWN = 0x1,
+    OFPPS_BLOCKED = 0x2,
+    OFPPS_LIVE = 0x4,
+};
+
+enum ofp_port_features {
+    OFPPF_10MB_HD = 0x1,
+    OFPPF_10MB_FD = 0x2,
+    OFPPF_100MB_HD = 0x4,
+    OFPPF_100MB_FD = 0x8,
+    OFPPF_1GB_HD = 0x10,
+    OFPPF_1GB_FD = 0x20,
+    OFPPF_10GB_FD = 0x40,
+    OFPPF_40GB_FD = 0x80,
+    OFPPF_100GB_FD = 0x100,
+    OFPPF_1TB_FD = 0x200,
+    OFPPF_OTHER = 0x400,
+    OFPPF_COPPER = 0x800,
+    OFPPF_FIBER = 0x1000,
+    OFPPF_AUTONEG = 0x2000,
+    OFPPF_PAUSE = 0x4000,
+    OFPPF_PAUSE_ASYM = 0x8000,
+};
+
+enum ofp_port_reason {
+    OFPPR_ADD = 0,
+    OFPPR_DELETE = 1,
+    OFPPR_MODIFY = 2,
+};
+
+enum ofp_match_type {
+    OFPMT_STANDARD = 0,
+    OFPMT_OXM = 1,
+};
+
+enum ofp_oxm_class {
+    OFPXMC_NXM_0 = 0,
+    OFPXMC_NXM_1 = 1,
+    OFPXMC_OPENFLOW_BASIC = 0x8000,
+    OFPXMC_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_vlan_id {
+    OFPVID_NONE = 0,
+    OFPVID_PRESENT = 0x1000,
+};
+
+enum ofp_ipv6exthdr_flags {
+    OFPIEH_NONEXT = 0x1,
+    OFPIEH_ESP = 0x2,
+    OFPIEH_AUTH = 0x4,
+    OFPIEH_DEST = 0x8,
+    OFPIEH_FRAG = 0x10,
+    OFPIEH_ROUTER = 0x20,
+    OFPIEH_HOP = 0x40,
+    OFPIEH_UNREP = 0x80,
+    OFPIEH_UNSEQ = 0x100,
+};
+
+enum ofp_action_type {
+    OFPAT_OUTPUT = 0,
+    OFPAT_COPY_TTL_OUT = 0xb,
+    OFPAT_COPY_TTL_IN = 0xc,
+    OFPAT_SET_MPLS_TTL = 0xf,
+    OFPAT_DEC_MPLS_TTL = 0x10,
+    OFPAT_PUSH_VLAN = 0x11,
+    OFPAT_POP_VLAN = 0x12,
+    OFPAT_PUSH_MPLS = 0x13,
+    OFPAT_POP_MPLS = 0x14,
+    OFPAT_SET_QUEUE = 0x15,
+    OFPAT_GROUP = 0x16,
+    OFPAT_SET_NW_TTL = 0x17,
+    OFPAT_DEC_NW_TTL = 0x18,
+    OFPAT_SET_FIELD = 0x19,
+    OFPAT_PUSH_PBB = 0x1a,
+    OFPAT_POP_PBB = 0x1b,
+    OFPAT_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_controller_max_len {
+    OFPCML_MAX = 0xffe5,
+    OFPCML_NO_BUFFER = 0xffff,
+};
+
+enum ofp_instruction_type {
+    OFPIT_GOTO_TABLE = 0x1,
+    OFPIT_WRITE_METADATA = 0x2,
+    OFPIT_WRITE_ACTIONS = 0x3,
+    OFPIT_APPLY_ACTIONS = 0x4,
+    OFPIT_CLEAR_ACTIONS = 0x5,
+    OFPIT_METER = 0x6,
+    OFPIT_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_flow_mod_command {
+    OFPFC_ADD = 0,
+    OFPFC_MODIFY = 1,
+    OFPFC_MODIFY_STRICT = 2,
+    OFPFC_DELETE = 3,
+    OFPFC_DELETE_STRICT = 4,
+};
+
+enum ofp_flow_mod_flags {
+    OFPFF_SEND_FLOW_REM = 0x1,
+    OFPFF_CHECK_OVERLAP = 0x2,
+    OFPFF_RESET_COUNTS = 0x4,
+    OFPFF_NO_PKT_COUNTS = 0x8,
+    OFPFF_NO_BYT_COUNTS = 0x10,
+};
+
+enum ofp_group {
+    OFPG_MAX = 0xffffff00,
+    OFPG_ALL = 0xfffffffc,
+    OFPG_ANY = 0xffffffff,
+};
+
+enum ofp_group_mod_command {
+    OFPGC_ADD = 0,
+    OFPGC_MODIFY = 1,
+    OFPGC_DELETE = 2,
+};
+
+enum ofp_group_type {
+    OFPGT_ALL = 0,
+    OFPGT_SELECT = 1,
+    OFPGT_INDIRECT = 2,
+    OFPGT_FF = 3,
+};
+
+enum ofp_packet_in_reason {
+    OFPR_NO_MATCH = 0,
+    OFPR_ACTION = 1,
+    OFPR_INVALID_TTL = 2,
+};
+
+enum ofp_flow_removed_reason {
+    OFPRR_IDLE_TIMEOUT = 0,
+    OFPRR_HARD_TIMEOUT = 1,
+    OFPRR_DELETE = 2,
+    OFPRR_GROUP_DELETE = 3,
+};
+
+enum ofp_meter {
+    OFPM_MAX = 0xffff0000,
+    OFPM_SLOWPATH = 0xfffffffd,
+    OFPM_CONTROLLER = 0xfffffffe,
+    OFPM_ALL = 0xffffffff,
+};
+
+enum ofp_meter_band_type {
+    OFPMBT_DROP = 0x1,
+    OFPMBT_DSCP_REMARK = 0x2,
+    OFPMBT_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_meter_mod_command {
+    OFPMC_ADD = 0,
+    OFPMC_MODIFY = 1,
+    OFPMC_DELETE = 2,
+};
+
+enum ofp_meter_flags {
+    OFPMF_KBPS = 0x1,
+    OFPMF_PKTPS = 0x2,
+    OFPMF_BURST = 0x4,
+    OFPMF_STATS = 0x8,
+};
+
+enum ofp_error_type {
+    OFPET_HELLO_FAILED = 0,
+    OFPET_BAD_REQUEST = 1,
+    OFPET_BAD_ACTION = 2,
+    OFPET_BAD_INSTRUCTION = 3,
+    OFPET_BAD_MATCH = 4,
+    OFPET_FLOW_MOD_FAILED = 5,
+    OFPET_GROUP_MOD_FAILED = 6,
+    OFPET_PORT_MOD_FAILED = 7,
+    OFPET_TABLE_MOD_FAILED = 8,
+    OFPET_QUEUE_OP_FAILED = 9,
+    OFPET_SWITCH_CONFIG_FAILED = 10,
+    OFPET_ROLE_REQUEST_FAILED = 11,
+    OFPET_METER_MOD_FAILED = 12,
+    OFPET_TABLE_FEATURES_FAILED = 13,
+    OFPET_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_hello_failed_code {
+    OFPHFC_INCOMPATIBLE = 0,
+    OFPHFC_EPERM = 1,
+};
+
+enum ofp_bad_request_code {
+    OFPBRC_BAD_VERSION = 0,
+    OFPBRC_BAD_TYPE = 1,
+    OFPBRC_BAD_MULTIPART = 2,
+    OFPBRC_BAD_EXPERIMENTER = 3,
+    OFPBRC_BAD_EXP_TYPE = 4,
+    OFPBRC_EPERM = 5,
+    OFPBRC_BAD_LEN = 6,
+    OFPBRC_BUFFER_EMPTY = 7,
+    OFPBRC_BUFFER_UNKNOWN = 8,
+    OFPBRC_BAD_TABLE_ID = 9,
+    OFPBRC_IS_SLAVE = 10,
+    OFPBRC_BAD_PORT = 11,
+    OFPBRC_BAD_PACKET = 12,
+    OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13,
+};
+
+enum ofp_bad_action_code {
+    OFPBAC_BAD_TYPE = 0,
+    OFPBAC_BAD_LEN = 1,
+    OFPBAC_BAD_EXPERIMENTER = 2,
+    OFPBAC_BAD_EXP_TYPE = 3,
+    OFPBAC_BAD_OUT_PORT = 4,
+    OFPBAC_BAD_ARGUMENT = 5,
+    OFPBAC_EPERM = 6,
+    OFPBAC_TOO_MANY = 7,
+    OFPBAC_BAD_QUEUE = 8,
+    OFPBAC_BAD_OUT_GROUP = 9,
+    OFPBAC_MATCH_INCONSISTENT = 10,
+    OFPBAC_UNSUPPORTED_ORDER = 11,
+    OFPBAC_BAD_TAG = 12,
+    OFPBAC_BAD_SET_TYPE = 13,
+    OFPBAC_BAD_SET_LEN = 14,
+    OFPBAC_BAD_SET_ARGUMENT = 15,
+};
+
+enum ofp_bad_instruction_code {
+    OFPBIC_UNKNOWN_INST = 0,
+    OFPBIC_UNSUP_INST = 1,
+    OFPBIC_BAD_TABLE_ID = 2,
+    OFPBIC_UNSUP_METADATA = 3,
+    OFPBIC_UNSUP_METADATA_MASK = 4,
+    OFPBIC_BAD_EXPERIMENTER = 5,
+    OFPBIC_BAD_EXP_TYPE = 6,
+    OFPBIC_BAD_LEN = 7,
+    OFPBIC_EPERM = 8,
+};
+
+enum ofp_bad_match_code {
+    OFPBMC_BAD_TYPE = 0,
+    OFPBMC_BAD_LEN = 1,
+    OFPBMC_BAD_TAG = 2,
+    OFPBMC_BAD_DL_ADDR_MASK = 3,
+    OFPBMC_BAD_NW_ADDR_MASK = 4,
+    OFPBMC_BAD_WILDCARDS = 5,
+    OFPBMC_BAD_FIELD = 6,
+    OFPBMC_BAD_VALUE = 7,
+    OFPBMC_BAD_MASK = 8,
+    OFPBMC_BAD_PREREQ = 9,
+    OFPBMC_DUP_FIELD = 10,
+    OFPBMC_EPERM = 11,
+};
+
+enum ofp_flow_mod_failed_code {
+    OFPFMFC_UNKNOWN = 0,
+    OFPFMFC_TABLE_FULL = 1,
+    OFPFMFC_BAD_TABLE_ID = 2,
+    OFPFMFC_OVERLAP = 3,
+    OFPFMFC_EPERM = 4,
+    OFPFMFC_BAD_TIMEOUT = 5,
+    OFPFMFC_BAD_COMMAND = 6,
+    OFPFMFC_BAD_FLAGS = 7,
+};
+
+enum ofp_group_mod_failed_code {
+    OFPGMFC_GROUP_EXISTS = 0,
+    OFPGMFC_INVALID_GROUP = 1,
+    OFPGMFC_WEIGHT_UNSUPPORTED = 2,
+    OFPGMFC_OUT_OF_GROUPS = 3,
+    OFPGMFC_OUT_OF_BUCKETS = 4,
+    OFPGMFC_CHAINING_UNSUPPORTED = 5,
+    OFPGMFC_WATCH_UNSUPPORTED = 6,
+    OFPGMFC_LOOP = 7,
+    OFPGMFC_UNKNOWN_GROUP = 8,
+    OFPGMFC_CHAINED_GROUP = 9,
+    OFPGMFC_BAD_TYPE = 10,
+    OFPGMFC_BAD_COMMAND = 11,
+    OFPGMFC_BAD_BUCKET = 12,
+    OFPGMFC_BAD_WATCH = 13,
+    OFPGMFC_EPERM = 14,
+};
+
+enum ofp_port_mod_failed_code {
+    OFPPMFC_BAD_PORT = 0,
+    OFPPMFC_BAD_HW_ADDR = 1,
+    OFPPMFC_BAD_CONFIG = 2,
+    OFPPMFC_BAD_ADVERTISE = 3,
+    OFPPMFC_EPERM = 4,
+};
+
+enum ofp_table_mod_failed_code {
+    OFPTMFC_BAD_TABLE = 0,
+    OFPTMFC_BAD_CONFIG = 1,
+    OFPTMFC_EPERM = 2,
+};
+
+enum ofp_queue_op_failed_code {
+    OFPQOFC_BAD_PORT = 0,
+    OFPQOFC_BAD_QUEUE = 1,
+    OFPQOFC_EPERM = 2,
+};
+
+enum ofp_switch_config_failed_code {
+    OFPSCFC_BAD_FLAGS = 0,
+    OFPSCFC_BAD_LEN = 1,
+    OFPSCFC_EPERM = 2,
+};
+
+enum ofp_role_request_failed_code {
+    OFPRRFC_STALE = 0,
+    OFPRRFC_UNSUP = 1,
+    OFPRRFC_BAD_ROLE = 2,
+};
+
+enum ofp_meter_mod_failed_code {
+    OFPMMFC_UNKNOWN = 0,
+    OFPMMFC_METER_EXISTS = 1,
+    OFPMMFC_INVALID_METER = 2,
+    OFPMMFC_UNKNOWN_METER = 3,
+    OFPMMFC_BAD_COMMAND = 4,
+    OFPMMFC_BAD_FLAGS = 5,
+    OFPMMFC_BAD_RATE = 6,
+    OFPMMFC_BAD_BURST = 7,
+    OFPMMFC_BAD_BAND = 8,
+    OFPMMFC_BAD_BAND_VALUE = 9,
+    OFPMMFC_OUT_OF_METERS = 10,
+    OFPMMFC_OUT_OF_BANDS = 11,
+};
+
+enum ofp_table_features_failed_code {
+    OFPTFFC_BAD_TABLE = 0,
+    OFPTFFC_BAD_METADATA = 1,
+    OFPTFFC_BAD_TYPE = 2,
+    OFPTFFC_BAD_LEN = 3,
+    OFPTFFC_BAD_ARGUMENT = 4,
+    OFPTFFC_EPERM = 5,
+};
+
+enum ofp_multipart_types {
+    OFPMP_DESC = 0,
+    OFPMP_FLOW = 1,
+    OFPMP_AGGREGATE = 2,
+    OFPMP_TABLE = 3,
+    OFPMP_PORT_STATS = 4,
+    OFPMP_QUEUE = 5,
+    OFPMP_GROUP = 6,
+    OFPMP_GROUP_DESC = 7,
+    OFPMP_GROUP_FEATURES = 8,
+    OFPMP_METER = 9,
+    OFPMP_METER_CONFIG = 10,
+    OFPMP_METER_FEATURES = 11,
+    OFPMP_TABLE_FEATURES = 12,
+    OFPMP_PORT_DESC = 13,
+    OFPMP_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_multipart_request_flags {
+    OFPMPF_REQ_MORE = 0x1,
+};
+
+enum ofp_multipart_reply_flags {
+    OFPMPF_REPLY_MORE = 0x1,
+};
+
+enum ofp_table_feature_prop_type {
+    OFPTFPT_INSTRUCTIONS = 0,
+    OFPTFPT_INSTRUCTIONS_MISS = 1,
+    OFPTFPT_NEXT_TABLES = 2,
+    OFPTFPT_NEXT_TABLES_MISS = 3,
+    OFPTFPT_WRITE_ACTIONS = 4,
+    OFPTFPT_WRITE_ACTIONS_MISS = 5,
+    OFPTFPT_APPLY_ACTIONS = 6,
+    OFPTFPT_APPLY_ACTIONS_MISS = 7,
+    OFPTFPT_MATCH = 8,
+    OFPTFPT_WILDCARDS = 0xa,
+    OFPTFPT_WRITE_SETFIELD = 0xc,
+    OFPTFPT_WRITE_SETFIELD_MISS = 0xd,
+    OFPTFPT_APPLY_SETFIELD = 0xe,
+    OFPTFPT_APPLY_SETFIELD_MISS = 0xf,
+    OFPTFPT_EXPERIMENTER = 0xfffe,
+    OFPTFPT_EXPERIMENTER_MISS = 0xffff,
+};
+
+enum ofp_group_capabilities {
+    OFPGFC_SELECT_WEIGHT = 0x1,
+    OFPGFC_SELECT_LIVENESS = 0x2,
+    OFPGFC_CHAINING = 0x4,
+    OFPGFC_CHAINING_CHECKS = 0x8,
+};
+
+enum ofp_queue_properties {
+    OFPQT_MIN_RATE = 0x1,
+    OFPQT_MAX_RATE = 0x2,
+    OFPQT_EXPERIMENTER = 0xffff,
+};
+
+enum ofp_controller_role {
+    OFPCR_ROLE_NOCHANGE = 0,
+    OFPCR_ROLE_EQUAL = 1,
+    OFPCR_ROLE_MASTER = 2,
+    OFPCR_ROLE_SLAVE = 3,
+};
+
 struct ofp_header {
     uint8_t version;
     uint8_t type;