import pyloxi @ 56db3af912fd38fe3789e7629a823788b94f463d
diff --git a/src/python/loxi/of10/const.py b/src/python/loxi/of10/const.py
index e269071..3b9a177 100644
--- a/src/python/loxi/of10/const.py
+++ b/src/python/loxi/of10/const.py
@@ -1,17 +1,6 @@
-#
-# Copyright 2012, 2013, Big Switch Networks, Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# 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
-# License for the specific language governing permissions and limitations
-# under the License.
+# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
+# Copyright (c) 2011, 2012 Open Networking Foundation
+# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
 
 # Automatically generated by LOXI from template const.py
 # Do not modify
@@ -24,18 +13,18 @@
 OFP_MAX_PORT_NAME_LEN = 16
 OFP_MAX_TABLE_NAME_LEN = 32
 SERIAL_NUM_LEN = 32
-OFPFW_ICMP_TYPE = (1 << 6)
-OFPFW_ICMP_CODE = (1 << 7)
+OFPFW_ICMP_TYPE = 64
 OFP_DEFAULT_MISS_SEND_LEN = 128
+OFPFW_ICMP_CODE = 128
 DESC_STR_LEN = 256
-OFP_DL_TYPE_NOT_ETH_TYPE = 0x05ff
-OFP_DL_TYPE_ETH2_CUTOFF = 0x0600
+OFP_DL_TYPE_NOT_ETH_TYPE = 1535
+OFP_DL_TYPE_ETH2_CUTOFF = 1536
 OFP_TCP_PORT = 6633
 OFP_SSL_PORT = 6633
-OFP_DEFAULT_PRIORITY = 0x8000
-OFPQ_MIN_RATE_UNCFG = 0xffff
-OFP_VLAN_NONE = 0xffff
-OFPQ_ALL = 0xffffffff
+OFP_DEFAULT_PRIORITY = 32768
+OFP_VLAN_NONE = 65535
+OFPQ_MIN_RATE_UNCFG = 65535
+OFPQ_ALL = 4294967295
 
 # Identifiers from group ofp_action_type
 OFPAT_OUTPUT = 0
@@ -50,7 +39,7 @@
 OFPAT_SET_TP_SRC = 9
 OFPAT_SET_TP_DST = 10
 OFPAT_ENQUEUE = 11
-OFPAT_VENDOR = 0xffff
+OFPAT_VENDOR = 65535
 
 ofp_action_type_map = {
     0: 'OFPAT_OUTPUT',
@@ -65,7 +54,7 @@
     9: 'OFPAT_SET_TP_SRC',
     10: 'OFPAT_SET_TP_DST',
     11: 'OFPAT_ENQUEUE',
-    0xffff: 'OFPAT_VENDOR',
+    65535: 'OFPAT_VENDOR',
 }
 
 # Identifiers from group ofp_bad_action_code
@@ -115,24 +104,24 @@
 }
 
 # Identifiers from group ofp_capabilities
-OFPC_FLOW_STATS = 1 << 0
-OFPC_TABLE_STATS = 1 << 1
-OFPC_PORT_STATS = 1 << 2
-OFPC_STP = 1 << 3
-OFPC_RESERVED = 1 << 4
-OFPC_IP_REASM = 1 << 5
-OFPC_QUEUE_STATS = 1 << 6
-OFPC_ARP_MATCH_IP = 1 << 7
+OFPC_FLOW_STATS = 1
+OFPC_TABLE_STATS = 2
+OFPC_PORT_STATS = 4
+OFPC_STP = 8
+OFPC_RESERVED = 16
+OFPC_IP_REASM = 32
+OFPC_QUEUE_STATS = 64
+OFPC_ARP_MATCH_IP = 128
 
 ofp_capabilities_map = {
-    1 << 0: 'OFPC_FLOW_STATS',
-    1 << 1: 'OFPC_TABLE_STATS',
-    1 << 2: 'OFPC_PORT_STATS',
-    1 << 3: 'OFPC_STP',
-    1 << 4: 'OFPC_RESERVED',
-    1 << 5: 'OFPC_IP_REASM',
-    1 << 6: 'OFPC_QUEUE_STATS',
-    1 << 7: 'OFPC_ARP_MATCH_IP',
+    1: 'OFPC_FLOW_STATS',
+    2: 'OFPC_TABLE_STATS',
+    4: 'OFPC_PORT_STATS',
+    8: 'OFPC_STP',
+    16: 'OFPC_RESERVED',
+    32: 'OFPC_IP_REASM',
+    64: 'OFPC_QUEUE_STATS',
+    128: 'OFPC_ARP_MATCH_IP',
 }
 
 # Identifiers from group ofp_config_flags
@@ -198,14 +187,14 @@
 }
 
 # Identifiers from group ofp_flow_mod_flags
-OFPFF_SEND_FLOW_REM = 1 << 0
-OFPFF_CHECK_OVERLAP = 1 << 1
-OFPFF_EMERG = 1 << 2
+OFPFF_SEND_FLOW_REM = 1
+OFPFF_CHECK_OVERLAP = 2
+OFPFF_EMERG = 4
 
 ofp_flow_mod_flags_map = {
-    1 << 0: 'OFPFF_SEND_FLOW_REM',
-    1 << 1: 'OFPFF_CHECK_OVERLAP',
-    1 << 2: 'OFPFF_EMERG',
+    1: 'OFPFF_SEND_FLOW_REM',
+    2: 'OFPFF_CHECK_OVERLAP',
+    4: 'OFPFF_EMERG',
 }
 
 # Identifiers from group ofp_flow_removed_reason
@@ -220,37 +209,37 @@
 }
 
 # Identifiers from group ofp_flow_wildcards
-OFPFW_IN_PORT = 1 << 0
-OFPFW_DL_VLAN = 1 << 1
-OFPFW_DL_SRC = 1 << 2
+OFPFW_IN_PORT = 1
+OFPFW_DL_VLAN = 2
+OFPFW_DL_SRC = 4
 OFPFW_NW_DST_BITS = 6
 OFPFW_NW_SRC_BITS = 6
 OFPFW_NW_SRC_SHIFT = 8
-OFPFW_DL_DST = 1 << 3
+OFPFW_DL_DST = 8
 OFPFW_NW_DST_SHIFT = 14
-OFPFW_DL_TYPE = 1 << 4
-OFPFW_NW_PROTO = 1 << 5
-OFPFW_TP_SRC = 1 << 6
-OFPFW_TP_DST = 1 << 7
-OFPFW_NW_SRC_ALL = 32 << (8)
-OFPFW_NW_SRC_MASK = ((1 << (6)) - 1) << (8)
-OFPFW_NW_DST_ALL = 32 << (14)
-OFPFW_NW_DST_MASK = ((1 << (6)) - 1) << (14)
-OFPFW_DL_VLAN_PCP = 1 << 20
-OFPFW_NW_TOS = 1 << 21
-OFPFW_ALL = ((1 << 22) - 1)
+OFPFW_DL_TYPE = 16
+OFPFW_NW_PROTO = 32
+OFPFW_TP_SRC = 64
+OFPFW_TP_DST = 128
+OFPFW_NW_SRC_ALL = 8192
+OFPFW_NW_SRC_MASK = 16128
+OFPFW_NW_DST_ALL = 524288
+OFPFW_NW_DST_MASK = 1032192
+OFPFW_DL_VLAN_PCP = 1048576
+OFPFW_NW_TOS = 2097152
+OFPFW_ALL = 4194303
 
 ofp_flow_wildcards_map = {
-    1 << 0: 'OFPFW_IN_PORT',
-    1 << 1: 'OFPFW_DL_VLAN',
-    1 << 2: 'OFPFW_DL_SRC',
-    1 << 3: 'OFPFW_DL_DST',
-    1 << 4: 'OFPFW_DL_TYPE',
-    1 << 5: 'OFPFW_NW_PROTO',
-    1 << 6: 'OFPFW_TP_SRC',
-    1 << 7: 'OFPFW_TP_DST',
-    1 << 20: 'OFPFW_DL_VLAN_PCP',
-    1 << 21: 'OFPFW_NW_TOS',
+    1: 'OFPFW_IN_PORT',
+    2: 'OFPFW_DL_VLAN',
+    4: 'OFPFW_DL_SRC',
+    8: 'OFPFW_DL_DST',
+    16: 'OFPFW_DL_TYPE',
+    32: 'OFPFW_NW_PROTO',
+    64: 'OFPFW_TP_SRC',
+    128: 'OFPFW_TP_DST',
+    1048576: 'OFPFW_DL_VLAN_PCP',
+    2097152: 'OFPFW_NW_TOS',
 }
 
 # Identifiers from group ofp_hello_failed_code
@@ -262,6 +251,17 @@
     1: 'OFPHFC_EPERM',
 }
 
+# Identifiers from group ofp_nicira_controller_role
+NX_ROLE_OTHER = 0
+NX_ROLE_MASTER = 1
+NX_ROLE_SLAVE = 2
+
+ofp_nicira_controller_role_map = {
+    0: 'NX_ROLE_OTHER',
+    1: 'NX_ROLE_MASTER',
+    2: 'NX_ROLE_SLAVE',
+}
+
 # Identifiers from group ofp_packet_in_reason
 OFPR_NO_MATCH = 0
 OFPR_ACTION = 1
@@ -295,51 +295,51 @@
 }
 
 # Identifiers from group ofp_port_config
-OFPPC_PORT_DOWN = 1 << 0
-OFPPC_NO_STP = 1 << 1
-OFPPC_NO_RECV = 1 << 2
-OFPPC_NO_RECV_STP = 1 << 3
-OFPPC_NO_FLOOD = 1 << 4
-OFPPC_NO_FWD = 1 << 5
-OFPPC_NO_PACKET_IN = 1 << 6
+OFPPC_PORT_DOWN = 1
+OFPPC_NO_STP = 2
+OFPPC_NO_RECV = 4
+OFPPC_NO_RECV_STP = 8
+OFPPC_NO_FLOOD = 16
+OFPPC_NO_FWD = 32
+OFPPC_NO_PACKET_IN = 64
 
 ofp_port_config_map = {
-    1 << 0: 'OFPPC_PORT_DOWN',
-    1 << 1: 'OFPPC_NO_STP',
-    1 << 2: 'OFPPC_NO_RECV',
-    1 << 3: 'OFPPC_NO_RECV_STP',
-    1 << 4: 'OFPPC_NO_FLOOD',
-    1 << 5: 'OFPPC_NO_FWD',
-    1 << 6: 'OFPPC_NO_PACKET_IN',
+    1: 'OFPPC_PORT_DOWN',
+    2: 'OFPPC_NO_STP',
+    4: 'OFPPC_NO_RECV',
+    8: 'OFPPC_NO_RECV_STP',
+    16: 'OFPPC_NO_FLOOD',
+    32: 'OFPPC_NO_FWD',
+    64: 'OFPPC_NO_PACKET_IN',
 }
 
 # Identifiers from group ofp_port_features
-OFPPF_10MB_HD = 1 << 0
-OFPPF_10MB_FD = 1 << 1
-OFPPF_100MB_HD = 1 << 2
-OFPPF_100MB_FD = 1 << 3
-OFPPF_1GB_HD = 1 << 4
-OFPPF_1GB_FD = 1 << 5
-OFPPF_10GB_FD = 1 << 6
-OFPPF_COPPER = 1 << 7
-OFPPF_FIBER = 1 << 8
-OFPPF_AUTONEG = 1 << 9
-OFPPF_PAUSE = 1 << 10
-OFPPF_PAUSE_ASYM = 1 << 11
+OFPPF_10MB_HD = 1
+OFPPF_10MB_FD = 2
+OFPPF_100MB_HD = 4
+OFPPF_100MB_FD = 8
+OFPPF_1GB_HD = 16
+OFPPF_1GB_FD = 32
+OFPPF_10GB_FD = 64
+OFPPF_COPPER = 128
+OFPPF_FIBER = 256
+OFPPF_AUTONEG = 512
+OFPPF_PAUSE = 1024
+OFPPF_PAUSE_ASYM = 2048
 
 ofp_port_features_map = {
-    1 << 0: 'OFPPF_10MB_HD',
-    1 << 1: 'OFPPF_10MB_FD',
-    1 << 2: 'OFPPF_100MB_HD',
-    1 << 3: 'OFPPF_100MB_FD',
-    1 << 4: 'OFPPF_1GB_HD',
-    1 << 5: 'OFPPF_1GB_FD',
-    1 << 6: 'OFPPF_10GB_FD',
-    1 << 7: 'OFPPF_COPPER',
-    1 << 8: 'OFPPF_FIBER',
-    1 << 9: 'OFPPF_AUTONEG',
-    1 << 10: 'OFPPF_PAUSE',
-    1 << 11: 'OFPPF_PAUSE_ASYM',
+    1: 'OFPPF_10MB_HD',
+    2: 'OFPPF_10MB_FD',
+    4: 'OFPPF_100MB_HD',
+    8: 'OFPPF_100MB_FD',
+    16: 'OFPPF_1GB_HD',
+    32: 'OFPPF_1GB_FD',
+    64: 'OFPPF_10GB_FD',
+    128: 'OFPPF_COPPER',
+    256: 'OFPPF_FIBER',
+    512: 'OFPPF_AUTONEG',
+    1024: 'OFPPF_PAUSE',
+    2048: 'OFPPF_PAUSE_ASYM',
 }
 
 # Identifiers from group ofp_port_mod_failed_code
@@ -363,20 +363,20 @@
 }
 
 # Identifiers from group ofp_port_state
-OFPPS_STP_LISTEN = 0 << 8
-OFPPS_LINK_DOWN = 1 << 0
-OFPPS_STP_LEARN = 1 << 8
-OFPPS_STP_FORWARD = 2 << 8
-OFPPS_STP_BLOCK = 3 << 8
-OFPPS_STP_MASK = 3 << 8
+OFPPS_STP_LISTEN = 0
+OFPPS_LINK_DOWN = 1
+OFPPS_STP_LEARN = 256
+OFPPS_STP_FORWARD = 512
+OFPPS_STP_BLOCK = 768
+OFPPS_STP_MASK = 768
 
 ofp_port_state_map = {
-    0 << 8: 'OFPPS_STP_LISTEN',
-    1 << 0: 'OFPPS_LINK_DOWN',
-    1 << 8: 'OFPPS_STP_LEARN',
-    2 << 8: 'OFPPS_STP_FORWARD',
-    3 << 8: 'OFPPS_STP_BLOCK',
-    3 << 8: 'OFPPS_STP_MASK',
+    0: 'OFPPS_STP_LISTEN',
+    1: 'OFPPS_LINK_DOWN',
+    256: 'OFPPS_STP_LEARN',
+    512: 'OFPPS_STP_FORWARD',
+    768: 'OFPPS_STP_BLOCK',
+    768: 'OFPPS_STP_MASK',
 }
 
 # Identifiers from group ofp_queue_op_failed_code
@@ -400,10 +400,10 @@
 }
 
 # Identifiers from group ofp_stats_reply_flags
-OFPSF_REPLY_MORE = 1 << 0
+OFPSF_REPLY_MORE = 1
 
 ofp_stats_reply_flags_map = {
-    1 << 0: 'OFPSF_REPLY_MORE',
+    1: 'OFPSF_REPLY_MORE',
 }
 
 # Identifiers from group ofp_stats_types
@@ -413,7 +413,7 @@
 OFPST_TABLE = 3
 OFPST_PORT = 4
 OFPST_QUEUE = 5
-OFPST_VENDOR = 0xffff
+OFPST_VENDOR = 65535
 
 ofp_stats_types_map = {
     0: 'OFPST_DESC',
@@ -422,7 +422,7 @@
     3: 'OFPST_TABLE',
     4: 'OFPST_PORT',
     5: 'OFPST_QUEUE',
-    0xffff: 'OFPST_VENDOR',
+    65535: 'OFPST_VENDOR',
 }
 
 # Identifiers from group ofp_type