Merge into master from pull request #87:
Improvements and bug fixes to OF 1.0 match support + BSN mirror dest config flag (https://github.com/floodlight/loxigen/pull/87)
diff --git a/c_gen/c_match.py b/c_gen/c_match.py
index e15688e..3dff5a5 100644
--- a/c_gen/c_match.py
+++ b/c_gen/c_match.py
@@ -602,8 +602,8 @@
 
     /* For each active member, add an OXM entry to the list */
 """)
-    # @fixme Would like to generate the list in some reasonable order
-    for key, entry in match.of_match_members.items():
+    for key in match.match_keys_sorted:
+        entry = match.of_match_members[key]
         out.write("""\
     if (OF_MATCH_MASK_%(ku)s_ACTIVE_TEST(src)) {
         if (!OF_MATCH_MASK_%(ku)s_EXACT_TEST(src)) {
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java
index 5df7012..34d6946 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchField.java
@@ -11,9 +11,9 @@
 import org.projectfloodlight.openflow.types.IpEcn;
 import org.projectfloodlight.openflow.types.IpProtocol;
 import org.projectfloodlight.openflow.types.MacAddress;
+import org.projectfloodlight.openflow.types.OFBitMask128;
 import org.projectfloodlight.openflow.types.OFMetadata;
 import org.projectfloodlight.openflow.types.OFPort;
-import org.projectfloodlight.openflow.types.OFBitMask128;
 import org.projectfloodlight.openflow.types.OFValueType;
 import org.projectfloodlight.openflow.types.TransportPort;
 import org.projectfloodlight.openflow.types.U32;
@@ -81,35 +81,35 @@
 
     public final static MatchField<TransportPort> TCP_SRC = new MatchField<TransportPort>(
             "tcp_src", MatchFields.TCP_SRC,
-            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_TCP));
+            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.TCP));
 
     public final static MatchField<TransportPort> TCP_DST = new MatchField<TransportPort>(
             "tcp_dst", MatchFields.TCP_DST,
-            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_TCP));
+            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.TCP));
 
     public final static MatchField<TransportPort> UDP_SRC = new MatchField<TransportPort>(
             "udp_src", MatchFields.UDP_SRC,
-            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_UDP));
+            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.UDP));
 
     public final static MatchField<TransportPort> UDP_DST = new MatchField<TransportPort>(
             "udp_dst", MatchFields.UDP_DST,
-            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_UDP));
+            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.UDP));
 
     public final static MatchField<TransportPort> SCTP_SRC = new MatchField<TransportPort>(
             "sctp_src", MatchFields.SCTP_SRC,
-            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_SCTP));
+            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.SCTP));
 
     public final static MatchField<TransportPort> SCTP_DST = new MatchField<TransportPort>(
             "sctp_dst", MatchFields.SCTP_DST,
-            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_SCTP));
+            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.SCTP));
 
     public final static MatchField<ICMPv4Type> ICMPV4_TYPE = new MatchField<ICMPv4Type>(
             "icmpv4_src", MatchFields.ICMPV4_TYPE,
-            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_ICMP));
+            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.ICMP));
 
     public final static MatchField<ICMPv4Code> ICMPV4_CODE = new MatchField<ICMPv4Code>(
             "icmpv4_dst", MatchFields.ICMPV4_CODE,
-            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_ICMP));
+            new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.ICMP));
 
     public final static MatchField<ArpOpcode> ARP_OP = new MatchField<ArpOpcode>(
             "arp_op", MatchFields.ARP_OP,
@@ -145,11 +145,11 @@
 
     public final static MatchField<U8> ICMPV6_TYPE =
             new MatchField<U8>("icmpv6_type", MatchFields.ICMPV6_TYPE,
-                    new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_IPv6_ICMP));
+                    new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IPv6_ICMP));
 
     public final static MatchField<U8> ICMPV6_CODE =
             new MatchField<U8>("icmpv6_code", MatchFields.ICMPV6_CODE,
-                    new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IP_PROTO_IPv6_ICMP));
+                    new Prerequisite<IpProtocol>(MatchField.IP_PROTO, IpProtocol.IPv6_ICMP));
 
     public final static MatchField<IPv6Address> IPV6_ND_TARGET =
             new MatchField<IPv6Address>("ipv6_nd_target", MatchFields.IPV6_ND_TARGET,
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ArpOpcode.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ArpOpcode.java
index 2a33a0e..c8999b8 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ArpOpcode.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ArpOpcode.java
@@ -8,57 +8,57 @@
 
     final static int LENGTH = 2;
 
-    private static final int ARP_OPCODE_VAL_REQUEST   = 1;
-    private static final int ARP_OPCODE_VAL_REPLY = 2;
-    private static final int ARP_OPCODE_VAL_REQUEST_REVERSE   = 3;
-    private static final int ARP_OPCODE_VAL_REPLY_REVERSE = 4;
-    private static final int ARP_OPCODE_VAL_DRARP_REQUEST = 5;
-    private static final int ARP_OPCODE_VAL_DRARP_REPLY   = 6;
-    private static final int ARP_OPCODE_VAL_DRARP_ERROR   = 7;
-    private static final int ARP_OPCODE_VAL_INARP_REQUEST = 8;
-    private static final int ARP_OPCODE_VAL_INARP_REPLY   = 9;
-    private static final int ARP_OPCODE_VAL_ARP_NAK   = 10;
-    private static final int ARP_OPCODE_VAL_MARS_REQUEST  = 11;
-    private static final int ARP_OPCODE_VAL_MARS_MULTI    = 12;
-    private static final int ARP_OPCODE_VAL_MARS_MSERV    = 13;
-    private static final int ARP_OPCODE_VAL_MARS_JOIN = 14;
-    private static final int ARP_OPCODE_VAL_MARS_LEAVE    = 15;
-    private static final int ARP_OPCODE_VAL_MARS_NAK  = 16;
-    private static final int ARP_OPCODE_VAL_MARS_UNSERV   = 17;
-    private static final int ARP_OPCODE_VAL_MARS_SJOIN    = 18;
-    private static final int ARP_OPCODE_VAL_MARS_SLEAVE   = 19;
-    private static final int ARP_OPCODE_VAL_MARS_GROUPLIST_REQUEST    = 20;
-    private static final int ARP_OPCODE_VAL_MARS_GROUPLIST_REPLY  = 21;
-    private static final int ARP_OPCODE_VAL_MARS_REDIRECT_MAP = 22;
-    private static final int ARP_OPCODE_VAL_MAPOS_UNARP   = 23;
-    private static final int ARP_OPCODE_VAL_OP_EXP1   = 24;
-    private static final int ARP_OPCODE_VAL_OP_EXP2   = 25;
+    private static final int VAL_REQUEST   = 1;
+    private static final int VAL_REPLY = 2;
+    private static final int VAL_REQUEST_REVERSE   = 3;
+    private static final int VAL_REPLY_REVERSE = 4;
+    private static final int VAL_DRARP_REQUEST = 5;
+    private static final int VAL_DRARP_REPLY   = 6;
+    private static final int VAL_DRARP_ERROR   = 7;
+    private static final int VAL_INARP_REQUEST = 8;
+    private static final int VAL_INARP_REPLY   = 9;
+    private static final int VAL_ARP_NAK   = 10;
+    private static final int VAL_MARS_REQUEST  = 11;
+    private static final int VAL_MARS_MULTI    = 12;
+    private static final int VAL_MARS_MSERV    = 13;
+    private static final int VAL_MARS_JOIN = 14;
+    private static final int VAL_MARS_LEAVE    = 15;
+    private static final int VAL_MARS_NAK  = 16;
+    private static final int VAL_MARS_UNSERV   = 17;
+    private static final int VAL_MARS_SJOIN    = 18;
+    private static final int VAL_MARS_SLEAVE   = 19;
+    private static final int VAL_MARS_GROUPLIST_REQUEST    = 20;
+    private static final int VAL_MARS_GROUPLIST_REPLY  = 21;
+    private static final int VAL_MARS_REDIRECT_MAP = 22;
+    private static final int VAL_MAPOS_UNARP   = 23;
+    private static final int VAL_OP_EXP1   = 24;
+    private static final int VAL_OP_EXP2   = 25;
 
-    public static final ArpOpcode ARP_OPCODE_REQUEST  = new ArpOpcode(ARP_OPCODE_VAL_REQUEST);
-    public static final ArpOpcode ARP_OPCODE_REPLY    = new ArpOpcode(ARP_OPCODE_VAL_REPLY);
-    public static final ArpOpcode ARP_OPCODE_REQUEST_REVERSE  = new ArpOpcode(ARP_OPCODE_VAL_REQUEST_REVERSE);
-    public static final ArpOpcode ARP_OPCODE_REPLY_REVERSE    = new ArpOpcode(ARP_OPCODE_VAL_REPLY_REVERSE);
-    public static final ArpOpcode ARP_OPCODE_DRARP_REQUEST    = new ArpOpcode(ARP_OPCODE_VAL_DRARP_REQUEST);
-    public static final ArpOpcode ARP_OPCODE_DRARP_REPLY  = new ArpOpcode(ARP_OPCODE_VAL_DRARP_REPLY);
-    public static final ArpOpcode ARP_OPCODE_DRARP_ERROR  = new ArpOpcode(ARP_OPCODE_VAL_DRARP_ERROR);
-    public static final ArpOpcode ARP_OPCODE_INARP_REQUEST    = new ArpOpcode(ARP_OPCODE_VAL_INARP_REQUEST);
-    public static final ArpOpcode ARP_OPCODE_INARP_REPLY  = new ArpOpcode(ARP_OPCODE_VAL_INARP_REPLY);
-    public static final ArpOpcode ARP_OPCODE_ARP_NAK  = new ArpOpcode(ARP_OPCODE_VAL_ARP_NAK);
-    public static final ArpOpcode ARP_OPCODE_MARS_REQUEST = new ArpOpcode(ARP_OPCODE_VAL_MARS_REQUEST);
-    public static final ArpOpcode ARP_OPCODE_MARS_MULTI   = new ArpOpcode(ARP_OPCODE_VAL_MARS_MULTI);
-    public static final ArpOpcode ARP_OPCODE_MARS_MSERV   = new ArpOpcode(ARP_OPCODE_VAL_MARS_MSERV);
-    public static final ArpOpcode ARP_OPCODE_MARS_JOIN    = new ArpOpcode(ARP_OPCODE_VAL_MARS_JOIN);
-    public static final ArpOpcode ARP_OPCODE_MARS_LEAVE   = new ArpOpcode(ARP_OPCODE_VAL_MARS_LEAVE);
-    public static final ArpOpcode ARP_OPCODE_MARS_NAK = new ArpOpcode(ARP_OPCODE_VAL_MARS_NAK);
-    public static final ArpOpcode ARP_OPCODE_MARS_UNSERV  = new ArpOpcode(ARP_OPCODE_VAL_MARS_UNSERV);
-    public static final ArpOpcode ARP_OPCODE_MARS_SJOIN   = new ArpOpcode(ARP_OPCODE_VAL_MARS_SJOIN);
-    public static final ArpOpcode ARP_OPCODE_MARS_SLEAVE  = new ArpOpcode(ARP_OPCODE_VAL_MARS_SLEAVE);
-    public static final ArpOpcode ARP_OPCODE_MARS_GROUPLIST_REQUEST   = new ArpOpcode(ARP_OPCODE_VAL_MARS_GROUPLIST_REQUEST);
-    public static final ArpOpcode ARP_OPCODE_MARS_GROUPLIST_REPLY = new ArpOpcode(ARP_OPCODE_VAL_MARS_GROUPLIST_REPLY);
-    public static final ArpOpcode ARP_OPCODE_MARS_REDIRECT_MAP    = new ArpOpcode(ARP_OPCODE_VAL_MARS_REDIRECT_MAP);
-    public static final ArpOpcode ARP_OPCODE_MAPOS_UNARP  = new ArpOpcode(ARP_OPCODE_VAL_MAPOS_UNARP);
-    public static final ArpOpcode ARP_OPCODE_OP_EXP1  = new ArpOpcode(ARP_OPCODE_VAL_OP_EXP1);
-    public static final ArpOpcode ARP_OPCODE_OP_EXP2  = new ArpOpcode(ARP_OPCODE_VAL_OP_EXP2);
+    public static final ArpOpcode REQUEST  = new ArpOpcode(VAL_REQUEST);
+    public static final ArpOpcode REPLY    = new ArpOpcode(VAL_REPLY);
+    public static final ArpOpcode REQUEST_REVERSE  = new ArpOpcode(VAL_REQUEST_REVERSE);
+    public static final ArpOpcode REPLY_REVERSE    = new ArpOpcode(VAL_REPLY_REVERSE);
+    public static final ArpOpcode DRARP_REQUEST    = new ArpOpcode(VAL_DRARP_REQUEST);
+    public static final ArpOpcode DRARP_REPLY  = new ArpOpcode(VAL_DRARP_REPLY);
+    public static final ArpOpcode DRARP_ERROR  = new ArpOpcode(VAL_DRARP_ERROR);
+    public static final ArpOpcode INARP_REQUEST    = new ArpOpcode(VAL_INARP_REQUEST);
+    public static final ArpOpcode INARP_REPLY  = new ArpOpcode(VAL_INARP_REPLY);
+    public static final ArpOpcode ARP_NAK  = new ArpOpcode(VAL_ARP_NAK);
+    public static final ArpOpcode MARS_REQUEST = new ArpOpcode(VAL_MARS_REQUEST);
+    public static final ArpOpcode MARS_MULTI   = new ArpOpcode(VAL_MARS_MULTI);
+    public static final ArpOpcode MARS_MSERV   = new ArpOpcode(VAL_MARS_MSERV);
+    public static final ArpOpcode MARS_JOIN    = new ArpOpcode(VAL_MARS_JOIN);
+    public static final ArpOpcode MARS_LEAVE   = new ArpOpcode(VAL_MARS_LEAVE);
+    public static final ArpOpcode MARS_NAK = new ArpOpcode(VAL_MARS_NAK);
+    public static final ArpOpcode MARS_UNSERV  = new ArpOpcode(VAL_MARS_UNSERV);
+    public static final ArpOpcode MARS_SJOIN   = new ArpOpcode(VAL_MARS_SJOIN);
+    public static final ArpOpcode MARS_SLEAVE  = new ArpOpcode(VAL_MARS_SLEAVE);
+    public static final ArpOpcode MARS_GROUPLIST_REQUEST   = new ArpOpcode(VAL_MARS_GROUPLIST_REQUEST);
+    public static final ArpOpcode MARS_GROUPLIST_REPLY = new ArpOpcode(VAL_MARS_GROUPLIST_REPLY);
+    public static final ArpOpcode MARS_REDIRECT_MAP    = new ArpOpcode(VAL_MARS_REDIRECT_MAP);
+    public static final ArpOpcode MAPOS_UNARP  = new ArpOpcode(VAL_MAPOS_UNARP);
+    public static final ArpOpcode OP_EXP1  = new ArpOpcode(VAL_OP_EXP1);
+    public static final ArpOpcode OP_EXP2  = new ArpOpcode(VAL_OP_EXP2);
 
     private static final int MIN_OPCODE = 0;
     private static final int MAX_OPCODE = 0xFFFF;
@@ -90,56 +90,56 @@
         switch (opcode) {
             case NONE_VAL:
                 return NONE;
-            case ARP_OPCODE_VAL_REQUEST:
-                return ARP_OPCODE_REQUEST;
-            case ARP_OPCODE_VAL_REPLY:
-                return ARP_OPCODE_REPLY;
-            case ARP_OPCODE_VAL_REQUEST_REVERSE:
-                return ARP_OPCODE_REQUEST_REVERSE;
-            case ARP_OPCODE_VAL_REPLY_REVERSE:
-                return ARP_OPCODE_REPLY_REVERSE;
-            case ARP_OPCODE_VAL_DRARP_REQUEST:
-                return ARP_OPCODE_DRARP_REQUEST;
-            case ARP_OPCODE_VAL_DRARP_REPLY:
-                return ARP_OPCODE_DRARP_REPLY;
-            case ARP_OPCODE_VAL_DRARP_ERROR:
-                return ARP_OPCODE_DRARP_ERROR;
-            case ARP_OPCODE_VAL_INARP_REQUEST:
-                return ARP_OPCODE_INARP_REQUEST;
-            case ARP_OPCODE_VAL_INARP_REPLY:
-                return ARP_OPCODE_INARP_REPLY;
-            case ARP_OPCODE_VAL_ARP_NAK:
-                return ARP_OPCODE_ARP_NAK;
-            case ARP_OPCODE_VAL_MARS_REQUEST:
-                return ARP_OPCODE_MARS_REQUEST;
-            case ARP_OPCODE_VAL_MARS_MULTI:
-                return ARP_OPCODE_MARS_MULTI;
-            case ARP_OPCODE_VAL_MARS_MSERV:
-                return ARP_OPCODE_MARS_MSERV;
-            case ARP_OPCODE_VAL_MARS_JOIN:
-                return ARP_OPCODE_MARS_JOIN;
-            case ARP_OPCODE_VAL_MARS_LEAVE:
-                return ARP_OPCODE_MARS_LEAVE;
-            case ARP_OPCODE_VAL_MARS_NAK:
-                return ARP_OPCODE_MARS_NAK;
-            case ARP_OPCODE_VAL_MARS_UNSERV:
-                return ARP_OPCODE_MARS_UNSERV;
-            case ARP_OPCODE_VAL_MARS_SJOIN:
-                return ARP_OPCODE_MARS_SJOIN;
-            case ARP_OPCODE_VAL_MARS_SLEAVE:
-                return ARP_OPCODE_MARS_SLEAVE;
-            case ARP_OPCODE_VAL_MARS_GROUPLIST_REQUEST:
-                return ARP_OPCODE_MARS_GROUPLIST_REQUEST;
-            case ARP_OPCODE_VAL_MARS_GROUPLIST_REPLY:
-                return ARP_OPCODE_MARS_GROUPLIST_REPLY;
-            case ARP_OPCODE_VAL_MARS_REDIRECT_MAP:
-                return ARP_OPCODE_MARS_REDIRECT_MAP;
-            case ARP_OPCODE_VAL_MAPOS_UNARP:
-                return ARP_OPCODE_MAPOS_UNARP;
-            case ARP_OPCODE_VAL_OP_EXP1:
-                return ARP_OPCODE_OP_EXP1;
-            case ARP_OPCODE_VAL_OP_EXP2:
-                return ARP_OPCODE_OP_EXP2;
+            case VAL_REQUEST:
+                return REQUEST;
+            case VAL_REPLY:
+                return REPLY;
+            case VAL_REQUEST_REVERSE:
+                return REQUEST_REVERSE;
+            case VAL_REPLY_REVERSE:
+                return REPLY_REVERSE;
+            case VAL_DRARP_REQUEST:
+                return DRARP_REQUEST;
+            case VAL_DRARP_REPLY:
+                return DRARP_REPLY;
+            case VAL_DRARP_ERROR:
+                return DRARP_ERROR;
+            case VAL_INARP_REQUEST:
+                return INARP_REQUEST;
+            case VAL_INARP_REPLY:
+                return INARP_REPLY;
+            case VAL_ARP_NAK:
+                return ARP_NAK;
+            case VAL_MARS_REQUEST:
+                return MARS_REQUEST;
+            case VAL_MARS_MULTI:
+                return MARS_MULTI;
+            case VAL_MARS_MSERV:
+                return MARS_MSERV;
+            case VAL_MARS_JOIN:
+                return MARS_JOIN;
+            case VAL_MARS_LEAVE:
+                return MARS_LEAVE;
+            case VAL_MARS_NAK:
+                return MARS_NAK;
+            case VAL_MARS_UNSERV:
+                return MARS_UNSERV;
+            case VAL_MARS_SJOIN:
+                return MARS_SJOIN;
+            case VAL_MARS_SLEAVE:
+                return MARS_SLEAVE;
+            case VAL_MARS_GROUPLIST_REQUEST:
+                return MARS_GROUPLIST_REQUEST;
+            case VAL_MARS_GROUPLIST_REPLY:
+                return MARS_GROUPLIST_REPLY;
+            case VAL_MARS_REDIRECT_MAP:
+                return MARS_REDIRECT_MAP;
+            case VAL_MAPOS_UNARP:
+                return MAPOS_UNARP;
+            case VAL_OP_EXP1:
+                return OP_EXP1;
+            case VAL_OP_EXP2:
+                return OP_EXP2;
             default:
                 return new ArpOpcode(opcode);
         }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Type.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Type.java
index 594aaec..bfd0d99 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Type.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Type.java
@@ -7,66 +7,66 @@
 public class ICMPv4Type implements OFValueType<ICMPv4Type> {
     final static int LENGTH = 1;
 
-    private static final short ICMPV4_TYPE_VAL_ECHO_REPLY    = 0;
-    private static final short ICMPV4_TYPE_VAL_DESTINATION_UNREACHABLE   = 3;
-    private static final short ICMPV4_TYPE_VAL_SOURCE_QUENCH = 4;
-    private static final short ICMPV4_TYPE_VAL_REDIRECT  = 5;
-    private static final short ICMPV4_TYPE_VAL_ALTERNATE_HOST_ADDRESS    = 6;
-    private static final short ICMPV4_TYPE_VAL_ECHO  = 8;
-    private static final short ICMPV4_TYPE_VAL_ROUTER_ADVERTISEMENT  = 9;
-    private static final short ICMPV4_TYPE_VAL_ROUTER_SOLICITATION   = 10;
-    private static final short ICMPV4_TYPE_VAL_TIME_EXCEEDED = 11;
-    private static final short ICMPV4_TYPE_VAL_PARAMETER_PROBLEM = 12;
-    private static final short ICMPV4_TYPE_VAL_TIMESTAMP = 13;
-    private static final short ICMPV4_TYPE_VAL_TIMESTAMP_REPLY   = 14;
-    private static final short ICMPV4_TYPE_VAL_INFORMATION_REQUEST   = 15;
-    private static final short ICMPV4_TYPE_VAL_INFORMATION_REPLY = 16;
-    private static final short ICMPV4_TYPE_VAL_ADDRESS_MASK_REQUEST  = 17;
-    private static final short ICMPV4_TYPE_VAL_ADDRESS_MASK_REPLY    = 18;
-    private static final short ICMPV4_TYPE_VAL_TRACEROUTE    = 30;
-    private static final short ICMPV4_TYPE_VAL_DATAGRAM_CONVERSION_ERROR = 31;
-    private static final short ICMPV4_TYPE_VAL_MOBILE_HOST_REDIRECT  = 32;
-    private static final short ICMPV4_TYPE_VAL_IPV6_WHERE_ARE_YOU    = 33;
-    private static final short ICMPV4_TYPE_VAL_IPV6_I_AM_HERE    = 34;
-    private static final short ICMPV4_TYPE_VAL_MOBILE_REGISTRATION_REQUEST   = 35;
-    private static final short ICMPV4_TYPE_VAL_MOBILE_REGISTRATION_REPLY = 36;
-    private static final short ICMPV4_TYPE_VAL_DOMAIN_NAME_REQUEST   = 37;
-    private static final short ICMPV4_TYPE_VAL_DOMAIN_NAME_REPLY = 38;
-    private static final short ICMPV4_TYPE_VAL_SKIP  = 39;
-    private static final short ICMPV4_TYPE_VAL_PHOTURIS  = 40;
-    private static final short ICMPV4_TYPE_VAL_EXPERIMENTAL_MOBILITY = 41;
+    private static final short VAL_ECHO_REPLY    = 0;
+    private static final short VAL_DESTINATION_UNREACHABLE   = 3;
+    private static final short VAL_SOURCE_QUENCH = 4;
+    private static final short VAL_REDIRECT  = 5;
+    private static final short VAL_ALTERNATE_HOST_ADDRESS    = 6;
+    private static final short VAL_ECHO  = 8;
+    private static final short VAL_ROUTER_ADVERTISEMENT  = 9;
+    private static final short VAL_ROUTER_SOLICITATION   = 10;
+    private static final short VAL_TIME_EXCEEDED = 11;
+    private static final short VAL_PARAMETER_PROBLEM = 12;
+    private static final short VAL_TIMESTAMP = 13;
+    private static final short VAL_TIMESTAMP_REPLY   = 14;
+    private static final short VAL_INFORMATION_REQUEST   = 15;
+    private static final short VAL_INFORMATION_REPLY = 16;
+    private static final short VAL_ADDRESS_MASK_REQUEST  = 17;
+    private static final short VAL_ADDRESS_MASK_REPLY    = 18;
+    private static final short VAL_TRACEROUTE    = 30;
+    private static final short VAL_DATAGRAM_CONVERSION_ERROR = 31;
+    private static final short VAL_MOBILE_HOST_REDIRECT  = 32;
+    private static final short VAL_IPV6_WHERE_ARE_YOU    = 33;
+    private static final short VAL_IPV6_I_AM_HERE    = 34;
+    private static final short VAL_MOBILE_REGISTRATION_REQUEST   = 35;
+    private static final short VAL_MOBILE_REGISTRATION_REPLY = 36;
+    private static final short VAL_DOMAIN_NAME_REQUEST   = 37;
+    private static final short VAL_DOMAIN_NAME_REPLY = 38;
+    private static final short VAL_SKIP  = 39;
+    private static final short VAL_PHOTURIS  = 40;
+    private static final short VAL_EXPERIMENTAL_MOBILITY = 41;
 
-    public static final ICMPv4Type ICMPV4_TYPE_ECHO_REPLY   = new ICMPv4Type(ICMPV4_TYPE_VAL_ECHO_REPLY);
-    public static final ICMPv4Type ICMPV4_TYPE_DESTINATION_UNREACHABLE  = new ICMPv4Type(ICMPV4_TYPE_VAL_DESTINATION_UNREACHABLE);
-    public static final ICMPv4Type ICMPV4_TYPE_SOURCE_QUENCH    = new ICMPv4Type(ICMPV4_TYPE_VAL_SOURCE_QUENCH);
-    public static final ICMPv4Type ICMPV4_TYPE_REDIRECT = new ICMPv4Type(ICMPV4_TYPE_VAL_REDIRECT);
-    public static final ICMPv4Type ICMPV4_TYPE_ALTERNATE_HOST_ADDRESS   = new ICMPv4Type(ICMPV4_TYPE_VAL_ALTERNATE_HOST_ADDRESS);
-    public static final ICMPv4Type ICMPV4_TYPE_ECHO = new ICMPv4Type(ICMPV4_TYPE_VAL_ECHO);
-    public static final ICMPv4Type ICMPV4_TYPE_ROUTER_ADVERTISEMENT = new ICMPv4Type(ICMPV4_TYPE_VAL_ROUTER_ADVERTISEMENT);
-    public static final ICMPv4Type ICMPV4_TYPE_ROUTER_SOLICITATION  = new ICMPv4Type(ICMPV4_TYPE_VAL_ROUTER_SOLICITATION);
-    public static final ICMPv4Type ICMPV4_TYPE_TIME_EXCEEDED    = new ICMPv4Type(ICMPV4_TYPE_VAL_TIME_EXCEEDED);
-    public static final ICMPv4Type ICMPV4_TYPE_PARAMETER_PROBLEM    = new ICMPv4Type(ICMPV4_TYPE_VAL_PARAMETER_PROBLEM);
-    public static final ICMPv4Type ICMPV4_TYPE_TIMESTAMP    = new ICMPv4Type(ICMPV4_TYPE_VAL_TIMESTAMP);
-    public static final ICMPv4Type ICMPV4_TYPE_TIMESTAMP_REPLY  = new ICMPv4Type(ICMPV4_TYPE_VAL_TIMESTAMP_REPLY);
-    public static final ICMPv4Type ICMPV4_TYPE_INFORMATION_REQUEST  = new ICMPv4Type(ICMPV4_TYPE_VAL_INFORMATION_REQUEST);
-    public static final ICMPv4Type ICMPV4_TYPE_INFORMATION_REPLY    = new ICMPv4Type(ICMPV4_TYPE_VAL_INFORMATION_REPLY);
-    public static final ICMPv4Type ICMPV4_TYPE_ADDRESS_MASK_REQUEST = new ICMPv4Type(ICMPV4_TYPE_VAL_ADDRESS_MASK_REQUEST);
-    public static final ICMPv4Type ICMPV4_TYPE_ADDRESS_MASK_REPLY   = new ICMPv4Type(ICMPV4_TYPE_VAL_ADDRESS_MASK_REPLY);
-    public static final ICMPv4Type ICMPV4_TYPE_TRACEROUTE   = new ICMPv4Type(ICMPV4_TYPE_VAL_TRACEROUTE);
-    public static final ICMPv4Type ICMPV4_TYPE_DATAGRAM_CONVERSION_ERROR    = new ICMPv4Type(ICMPV4_TYPE_VAL_DATAGRAM_CONVERSION_ERROR);
-    public static final ICMPv4Type ICMPV4_TYPE_MOBILE_HOST_REDIRECT = new ICMPv4Type(ICMPV4_TYPE_VAL_MOBILE_HOST_REDIRECT);
-    public static final ICMPv4Type ICMPV4_TYPE_IPV6_WHERE_ARE_YOU  = new ICMPv4Type(ICMPV4_TYPE_VAL_IPV6_WHERE_ARE_YOU);
-    public static final ICMPv4Type ICMPV4_TYPE_IPV6_I_AM_HERE = new ICMPv4Type(ICMPV4_TYPE_VAL_IPV6_I_AM_HERE);
-    public static final ICMPv4Type ICMPV4_TYPE_MOBILE_REGISTRATION_REQUEST  = new ICMPv4Type(ICMPV4_TYPE_VAL_MOBILE_REGISTRATION_REQUEST);
-    public static final ICMPv4Type ICMPV4_TYPE_MOBILE_REGISTRATION_REPLY    = new ICMPv4Type(ICMPV4_TYPE_VAL_MOBILE_REGISTRATION_REPLY);
-    public static final ICMPv4Type ICMPV4_TYPE_DOMAIN_NAME_REQUEST  = new ICMPv4Type(ICMPV4_TYPE_VAL_DOMAIN_NAME_REQUEST);
-    public static final ICMPv4Type ICMPV4_TYPE_DOMAIN_NAME_REPLY    = new ICMPv4Type(ICMPV4_TYPE_VAL_DOMAIN_NAME_REPLY);
-    public static final ICMPv4Type ICMPV4_TYPE_SKIP = new ICMPv4Type(ICMPV4_TYPE_VAL_SKIP);
-    public static final ICMPv4Type ICMPV4_TYPE_PHOTURIS = new ICMPv4Type(ICMPV4_TYPE_VAL_PHOTURIS);
-    public static final ICMPv4Type ICMPV4_TYPE_EXPERIMENTAL_MOBILITY    = new ICMPv4Type(ICMPV4_TYPE_VAL_EXPERIMENTAL_MOBILITY);
+    public static final ICMPv4Type ECHO_REPLY   = new ICMPv4Type(VAL_ECHO_REPLY);
+    public static final ICMPv4Type DESTINATION_UNREACHABLE  = new ICMPv4Type(VAL_DESTINATION_UNREACHABLE);
+    public static final ICMPv4Type SOURCE_QUENCH    = new ICMPv4Type(VAL_SOURCE_QUENCH);
+    public static final ICMPv4Type REDIRECT = new ICMPv4Type(VAL_REDIRECT);
+    public static final ICMPv4Type ALTERNATE_HOST_ADDRESS   = new ICMPv4Type(VAL_ALTERNATE_HOST_ADDRESS);
+    public static final ICMPv4Type ECHO = new ICMPv4Type(VAL_ECHO);
+    public static final ICMPv4Type ROUTER_ADVERTISEMENT = new ICMPv4Type(VAL_ROUTER_ADVERTISEMENT);
+    public static final ICMPv4Type ROUTER_SOLICITATION  = new ICMPv4Type(VAL_ROUTER_SOLICITATION);
+    public static final ICMPv4Type TIME_EXCEEDED    = new ICMPv4Type(VAL_TIME_EXCEEDED);
+    public static final ICMPv4Type PARAMETER_PROBLEM    = new ICMPv4Type(VAL_PARAMETER_PROBLEM);
+    public static final ICMPv4Type TIMESTAMP    = new ICMPv4Type(VAL_TIMESTAMP);
+    public static final ICMPv4Type TIMESTAMP_REPLY  = new ICMPv4Type(VAL_TIMESTAMP_REPLY);
+    public static final ICMPv4Type INFORMATION_REQUEST  = new ICMPv4Type(VAL_INFORMATION_REQUEST);
+    public static final ICMPv4Type INFORMATION_REPLY    = new ICMPv4Type(VAL_INFORMATION_REPLY);
+    public static final ICMPv4Type ADDRESS_MASK_REQUEST = new ICMPv4Type(VAL_ADDRESS_MASK_REQUEST);
+    public static final ICMPv4Type ADDRESS_MASK_REPLY   = new ICMPv4Type(VAL_ADDRESS_MASK_REPLY);
+    public static final ICMPv4Type TRACEROUTE   = new ICMPv4Type(VAL_TRACEROUTE);
+    public static final ICMPv4Type DATAGRAM_CONVERSION_ERROR    = new ICMPv4Type(VAL_DATAGRAM_CONVERSION_ERROR);
+    public static final ICMPv4Type MOBILE_HOST_REDIRECT = new ICMPv4Type(VAL_MOBILE_HOST_REDIRECT);
+    public static final ICMPv4Type IPV6_WHERE_ARE_YOU  = new ICMPv4Type(VAL_IPV6_WHERE_ARE_YOU);
+    public static final ICMPv4Type IPV6_I_AM_HERE = new ICMPv4Type(VAL_IPV6_I_AM_HERE);
+    public static final ICMPv4Type MOBILE_REGISTRATION_REQUEST  = new ICMPv4Type(VAL_MOBILE_REGISTRATION_REQUEST);
+    public static final ICMPv4Type MOBILE_REGISTRATION_REPLY    = new ICMPv4Type(VAL_MOBILE_REGISTRATION_REPLY);
+    public static final ICMPv4Type DOMAIN_NAME_REQUEST  = new ICMPv4Type(VAL_DOMAIN_NAME_REQUEST);
+    public static final ICMPv4Type DOMAIN_NAME_REPLY    = new ICMPv4Type(VAL_DOMAIN_NAME_REPLY);
+    public static final ICMPv4Type SKIP = new ICMPv4Type(VAL_SKIP);
+    public static final ICMPv4Type PHOTURIS = new ICMPv4Type(VAL_PHOTURIS);
+    public static final ICMPv4Type EXPERIMENTAL_MOBILITY    = new ICMPv4Type(VAL_EXPERIMENTAL_MOBILITY);
 
-    // HACK alert - we're disapproriating ICMPV4_TYPE_ECHO_REPLY (value 0) as 'none' as well
-    public static final ICMPv4Type NONE   = ICMPV4_TYPE_ECHO_REPLY;
+    // HACK alert - we're disapproriating ECHO_REPLY (value 0) as 'none' as well
+    public static final ICMPv4Type NONE   = ECHO_REPLY;
 
     public static final ICMPv4Type NO_MASK = new ICMPv4Type((short)0xFFFF);
     public static final ICMPv4Type FULL_MASK = new ICMPv4Type((short)0x0000);
@@ -84,62 +84,62 @@
         if (type < MIN_TYPE || type > MAX_TYPE)
             throw new IllegalArgumentException("Invalid ICMPv4 type: " + type);
         switch (type) {
-            case ICMPV4_TYPE_VAL_ECHO_REPLY:
-                return ICMPV4_TYPE_ECHO_REPLY;
-            case ICMPV4_TYPE_VAL_DESTINATION_UNREACHABLE:
-                return ICMPV4_TYPE_DESTINATION_UNREACHABLE;
-            case ICMPV4_TYPE_VAL_SOURCE_QUENCH:
-                return ICMPV4_TYPE_SOURCE_QUENCH;
-            case ICMPV4_TYPE_VAL_REDIRECT:
-                return ICMPV4_TYPE_REDIRECT;
-            case ICMPV4_TYPE_VAL_ALTERNATE_HOST_ADDRESS:
-                return ICMPV4_TYPE_ALTERNATE_HOST_ADDRESS;
-            case ICMPV4_TYPE_VAL_ECHO:
-                return ICMPV4_TYPE_ECHO;
-            case ICMPV4_TYPE_VAL_ROUTER_ADVERTISEMENT:
-                return ICMPV4_TYPE_ROUTER_ADVERTISEMENT;
-            case ICMPV4_TYPE_VAL_ROUTER_SOLICITATION:
-                return ICMPV4_TYPE_ROUTER_SOLICITATION;
-            case ICMPV4_TYPE_VAL_TIME_EXCEEDED:
-                return ICMPV4_TYPE_TIME_EXCEEDED;
-            case ICMPV4_TYPE_VAL_PARAMETER_PROBLEM:
-                return ICMPV4_TYPE_PARAMETER_PROBLEM;
-            case ICMPV4_TYPE_VAL_TIMESTAMP:
-                return ICMPV4_TYPE_TIMESTAMP;
-            case ICMPV4_TYPE_VAL_TIMESTAMP_REPLY:
-                return ICMPV4_TYPE_TIMESTAMP_REPLY;
-            case ICMPV4_TYPE_VAL_INFORMATION_REQUEST:
-                return ICMPV4_TYPE_INFORMATION_REQUEST;
-            case ICMPV4_TYPE_VAL_INFORMATION_REPLY:
-                return ICMPV4_TYPE_INFORMATION_REPLY;
-            case ICMPV4_TYPE_VAL_ADDRESS_MASK_REQUEST:
-                return ICMPV4_TYPE_ADDRESS_MASK_REQUEST;
-            case ICMPV4_TYPE_VAL_ADDRESS_MASK_REPLY:
-                return ICMPV4_TYPE_ADDRESS_MASK_REPLY;
-            case ICMPV4_TYPE_VAL_TRACEROUTE:
-                return ICMPV4_TYPE_TRACEROUTE;
-            case ICMPV4_TYPE_VAL_DATAGRAM_CONVERSION_ERROR:
-                return ICMPV4_TYPE_DATAGRAM_CONVERSION_ERROR;
-            case ICMPV4_TYPE_VAL_MOBILE_HOST_REDIRECT:
-                return ICMPV4_TYPE_MOBILE_HOST_REDIRECT;
-            case ICMPV4_TYPE_VAL_IPV6_WHERE_ARE_YOU:
-                return ICMPV4_TYPE_IPV6_WHERE_ARE_YOU;
-            case ICMPV4_TYPE_VAL_IPV6_I_AM_HERE:
-                return ICMPV4_TYPE_IPV6_I_AM_HERE;
-            case ICMPV4_TYPE_VAL_MOBILE_REGISTRATION_REQUEST:
-                return ICMPV4_TYPE_MOBILE_REGISTRATION_REQUEST;
-            case ICMPV4_TYPE_VAL_MOBILE_REGISTRATION_REPLY:
-                return ICMPV4_TYPE_MOBILE_REGISTRATION_REPLY;
-            case ICMPV4_TYPE_VAL_DOMAIN_NAME_REQUEST:
-                return ICMPV4_TYPE_DOMAIN_NAME_REQUEST;
-            case ICMPV4_TYPE_VAL_DOMAIN_NAME_REPLY:
-                return ICMPV4_TYPE_DOMAIN_NAME_REPLY;
-            case ICMPV4_TYPE_VAL_SKIP:
-                return ICMPV4_TYPE_SKIP;
-            case ICMPV4_TYPE_VAL_PHOTURIS:
-                return ICMPV4_TYPE_PHOTURIS;
-            case ICMPV4_TYPE_VAL_EXPERIMENTAL_MOBILITY:
-                return ICMPV4_TYPE_EXPERIMENTAL_MOBILITY;
+            case VAL_ECHO_REPLY:
+                return ECHO_REPLY;
+            case VAL_DESTINATION_UNREACHABLE:
+                return DESTINATION_UNREACHABLE;
+            case VAL_SOURCE_QUENCH:
+                return SOURCE_QUENCH;
+            case VAL_REDIRECT:
+                return REDIRECT;
+            case VAL_ALTERNATE_HOST_ADDRESS:
+                return ALTERNATE_HOST_ADDRESS;
+            case VAL_ECHO:
+                return ECHO;
+            case VAL_ROUTER_ADVERTISEMENT:
+                return ROUTER_ADVERTISEMENT;
+            case VAL_ROUTER_SOLICITATION:
+                return ROUTER_SOLICITATION;
+            case VAL_TIME_EXCEEDED:
+                return TIME_EXCEEDED;
+            case VAL_PARAMETER_PROBLEM:
+                return PARAMETER_PROBLEM;
+            case VAL_TIMESTAMP:
+                return TIMESTAMP;
+            case VAL_TIMESTAMP_REPLY:
+                return TIMESTAMP_REPLY;
+            case VAL_INFORMATION_REQUEST:
+                return INFORMATION_REQUEST;
+            case VAL_INFORMATION_REPLY:
+                return INFORMATION_REPLY;
+            case VAL_ADDRESS_MASK_REQUEST:
+                return ADDRESS_MASK_REQUEST;
+            case VAL_ADDRESS_MASK_REPLY:
+                return ADDRESS_MASK_REPLY;
+            case VAL_TRACEROUTE:
+                return TRACEROUTE;
+            case VAL_DATAGRAM_CONVERSION_ERROR:
+                return DATAGRAM_CONVERSION_ERROR;
+            case VAL_MOBILE_HOST_REDIRECT:
+                return MOBILE_HOST_REDIRECT;
+            case VAL_IPV6_WHERE_ARE_YOU:
+                return IPV6_WHERE_ARE_YOU;
+            case VAL_IPV6_I_AM_HERE:
+                return IPV6_I_AM_HERE;
+            case VAL_MOBILE_REGISTRATION_REQUEST:
+                return MOBILE_REGISTRATION_REQUEST;
+            case VAL_MOBILE_REGISTRATION_REPLY:
+                return MOBILE_REGISTRATION_REPLY;
+            case VAL_DOMAIN_NAME_REQUEST:
+                return DOMAIN_NAME_REQUEST;
+            case VAL_DOMAIN_NAME_REPLY:
+                return DOMAIN_NAME_REPLY;
+            case VAL_SKIP:
+                return SKIP;
+            case VAL_PHOTURIS:
+                return PHOTURIS;
+            case VAL_EXPERIMENTAL_MOBILITY:
+                return EXPERIMENTAL_MOBILITY;
             default:
                 return new ICMPv4Type(type);
         }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpProtocol.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpProtocol.java
index f0f79ec..b9eae68 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpProtocol.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpProtocol.java
@@ -16,293 +16,293 @@
 
     private final short proto;
 
-    static final short IP_PROTO_NUM_HOPOPT  = 0x00;
-    static final short IP_PROTO_NUM_ICMP    = 0x01;
-    static final short IP_PROTO_NUM_IGMP    = 0x02;
-    static final short IP_PROTO_NUM_GGP = 0x03;
-    static final short IP_PROTO_NUM_IPv4    = 0x04;
-    static final short IP_PROTO_NUM_ST  = 0x05;
-    static final short IP_PROTO_NUM_TCP = 0x06;
-    static final short IP_PROTO_NUM_CBT = 0x07;
-    static final short IP_PROTO_NUM_EGP = 0x08;
-    static final short IP_PROTO_NUM_IGP = 0x09;
-    static final short IP_PROTO_NUM_BBN_RCC_MON = 0x0A;
-    static final short IP_PROTO_NUM_NVP_II  = 0x0B;
-    static final short IP_PROTO_NUM_PUP = 0x0C;
-    static final short IP_PROTO_NUM_ARGUS   = 0x0D;
-    static final short IP_PROTO_NUM_EMCON   = 0x0E;
-    static final short IP_PROTO_NUM_XNET    = 0x0F;
-    static final short IP_PROTO_NUM_CHAOS   = 0x10;
-    static final short IP_PROTO_NUM_UDP = 0x11;
-    static final short IP_PROTO_NUM_MUX = 0x12;
-    static final short IP_PROTO_NUM_DCN_MEAS    = 0x13;
-    static final short IP_PROTO_NUM_HMP = 0x14;
-    static final short IP_PROTO_NUM_PRM = 0x15;
-    static final short IP_PROTO_NUM_XNS_IDP = 0x16;
-    static final short IP_PROTO_NUM_TRUNK_1 = 0x17;
-    static final short IP_PROTO_NUM_TRUNK_2 = 0x18;
-    static final short IP_PROTO_NUM_LEAF_1  = 0x19;
-    static final short IP_PROTO_NUM_LEAF_2  = 0x1A;
-    static final short IP_PROTO_NUM_RDP = 0x1B;
-    static final short IP_PROTO_NUM_IRTP    = 0x1C;
-    static final short IP_PROTO_NUM_ISO_TP4 = 0x1D;
-    static final short IP_PROTO_NUM_NETBLT  = 0x1E;
-    static final short IP_PROTO_NUM_MFE_NSP = 0x1F;
-    static final short IP_PROTO_NUM_MERIT_INP   = 0x20;
-    static final short IP_PROTO_NUM_DCCP    = 0x21;
-    static final short IP_PROTO_NUM_3PC = 0x22;
-    static final short IP_PROTO_NUM_IDPR    = 0x23;
-    static final short IP_PROTO_NUM_XTP = 0x24;
-    static final short IP_PROTO_NUM_DDP = 0x25;
-    static final short IP_PROTO_NUM_IDPR_CMTP   = 0x26;
-    static final short IP_PROTO_NUM_TP_PP   = 0x27;
-    static final short IP_PROTO_NUM_IL  = 0x28;
-    static final short IP_PROTO_NUM_IPv6    = 0x29;
-    static final short IP_PROTO_NUM_SDRP    = 0x2A;
-    static final short IP_PROTO_NUM_IPv6_ROUTE  = 0x2B;
-    static final short IP_PROTO_NUM_IPv6_FRAG   = 0x2C;
-    static final short IP_PROTO_NUM_IDRP    = 0x2D;
-    static final short IP_PROTO_NUM_RSVP    = 0x2E;
-    static final short IP_PROTO_NUM_GRE = 0x2F;
-    static final short IP_PROTO_NUM_MHRP    = 0x30;
-    static final short IP_PROTO_NUM_BNA = 0x31;
-    static final short IP_PROTO_NUM_ESP = 0x32;
-    static final short IP_PROTO_NUM_AH  = 0x33;
-    static final short IP_PROTO_NUM_I_NLSP  = 0x34;
-    static final short IP_PROTO_NUM_SWIPE   = 0x35;
-    static final short IP_PROTO_NUM_NARP    = 0x36;
-    static final short IP_PROTO_NUM_MOBILE  = 0x37;
-    static final short IP_PROTO_NUM_TLSP    = 0x38;
-    static final short IP_PROTO_NUM_SKIP    = 0x39;
-    static final short IP_PROTO_NUM_IPv6_ICMP   = 0x3A;
-    static final short IP_PROTO_NUM_IPv6_NO_NXT = 0x3B;
-    static final short IP_PROTO_NUM_IPv6_OPTS   = 0x3C;
-    static final short IP_PROTO_NUM_HOST_INTERNAL   = 0x3D;
-    static final short IP_PROTO_NUM_CFTP    = 0x3E;
-    static final short IP_PROTO_NUM_LOCAL_NET   = 0x3F;
-    static final short IP_PROTO_NUM_SAT_EXPAK   = 0x40;
-    static final short IP_PROTO_NUM_KRYPTOLAN   = 0x41;
-    static final short IP_PROTO_NUM_RVD = 0x42;
-    static final short IP_PROTO_NUM_IPPC    = 0x43;
-    static final short IP_PROTO_NUM_DIST_FS = 0x44;
-    static final short IP_PROTO_NUM_SAT_MON = 0x45;
-    static final short IP_PROTO_NUM_VISA    = 0x46;
-    static final short IP_PROTO_NUM_IPCV    = 0x47;
-    static final short IP_PROTO_NUM_CPNX    = 0x48;
-    static final short IP_PROTO_NUM_CPHB    = 0x49;
-    static final short IP_PROTO_NUM_WSN = 0x4A;
-    static final short IP_PROTO_NUM_PVP = 0x4B;
-    static final short IP_PROTO_NUM_BR_SAT_MON  = 0x4C;
-    static final short IP_PROTO_NUM_SUN_ND  = 0x4D;
-    static final short IP_PROTO_NUM_WB_MON  = 0x4E;
-    static final short IP_PROTO_NUM_WB_EXPAK    = 0x4F;
-    static final short IP_PROTO_NUM_ISO_IP  = 0x50;
-    static final short IP_PROTO_NUM_VMTP    = 0x51;
-    static final short IP_PROTO_NUM_SECURE_VMTP = 0x52;
-    static final short IP_PROTO_NUM_VINES   = 0x53;
-    static final short IP_PROTO_NUM_TTP_IPTM = 0x54;
-    static final short IP_PROTO_NUM_NSFNET_IGP  = 0x55;
-    static final short IP_PROTO_NUM_DGP = 0x56;
-    static final short IP_PROTO_NUM_TCF = 0x57;
-    static final short IP_PROTO_NUM_EIGRP   = 0x58;
-    static final short IP_PROTO_NUM_OSPF    = 0x59;
-    static final short IP_PROTO_NUM_Sprite_RPC  = 0x5A;
-    static final short IP_PROTO_NUM_LARP    = 0x5B;
-    static final short IP_PROTO_NUM_MTP = 0x5C;
-    static final short IP_PROTO_NUM_AX_25   = 0x5D;
-    static final short IP_PROTO_NUM_IPIP    = 0x5E;
-    static final short IP_PROTO_NUM_MICP    = 0x5F;
-    static final short IP_PROTO_NUM_SCC_SP  = 0x60;
-    static final short IP_PROTO_NUM_ETHERIP = 0x61;
-    static final short IP_PROTO_NUM_ENCAP   = 0x62;
-    static final short IP_PROTO_NUM_PRIVATE_ENCRYPT = 0x63;
-    static final short IP_PROTO_NUM_GMTP    = 0x64;
-    static final short IP_PROTO_NUM_IFMP    = 0x65;
-    static final short IP_PROTO_NUM_PNNI    = 0x66;
-    static final short IP_PROTO_NUM_PIM = 0x67;
-    static final short IP_PROTO_NUM_ARIS    = 0x68;
-    static final short IP_PROTO_NUM_SCPS    = 0x69;
-    static final short IP_PROTO_NUM_QNX = 0x6A;
-    static final short IP_PROTO_NUM_A_N = 0x6B;
-    static final short IP_PROTO_NUM_IP_COMP = 0x6C;
-    static final short IP_PROTO_NUM_SNP = 0x6D;
-    static final short IP_PROTO_NUM_COMPAQ_PEER = 0x6E;
-    static final short IP_PROTO_NUM_IPX_IN_IP   = 0x6F;
-    static final short IP_PROTO_NUM_VRRP    = 0x70;
-    static final short IP_PROTO_NUM_PGM = 0x71;
-    static final short IP_PROTO_NUM_ZERO_HOP    = 0x72;
-    static final short IP_PROTO_NUM_L2TP    = 0x73;
-    static final short IP_PROTO_NUM_DDX = 0x74;
-    static final short IP_PROTO_NUM_IATP    = 0x75;
-    static final short IP_PROTO_NUM_STP = 0x76;
-    static final short IP_PROTO_NUM_SRP = 0x77;
-    static final short IP_PROTO_NUM_UTI = 0x78;
-    static final short IP_PROTO_NUM_SMP = 0x79;
-    static final short IP_PROTO_NUM_SM  = 0x7A;
-    static final short IP_PROTO_NUM_PTP = 0x7B;
-    static final short IP_PROTO_NUM_IS_IS_OVER_IPv4 = 0x7C;
-    static final short IP_PROTO_NUM_FIRE    = 0x7D;
-    static final short IP_PROTO_NUM_CRTP    = 0x7E;
-    static final short IP_PROTO_NUM_CRUDP   = 0x7F;
-    static final short IP_PROTO_NUM_SSCOPMCE    = 0x80;
-    static final short IP_PROTO_NUM_IPLT    = 0x81;
-    static final short IP_PROTO_NUM_SPS = 0x82;
-    static final short IP_PROTO_NUM_PIPE    = 0x83;
-    static final short IP_PROTO_NUM_SCTP    = 0x84;
-    static final short IP_PROTO_NUM_FC  = 0x85;
-    static final short IP_PROTO_NUM_RSVP_E2E_IGNORE = 0x86;
-    static final short IP_PROTO_NUM_MOBILITY_HEADER = 0x87;
-    static final short IP_PROTO_NUM_UDP_LITE    = 0x88;
-    static final short IP_PROTO_NUM_MPLS_IN_IP  = 0x89;
-    static final short IP_PROTO_NUM_MANET   = 0x8A;
-    static final short IP_PROTO_NUM_HIP = 0x8B;
-    static final short IP_PROTO_NUM_SHIM6   = 0x8C;
+    static final short NUM_HOPOPT  = 0x00;
+    static final short NUM_ICMP    = 0x01;
+    static final short NUM_IGMP    = 0x02;
+    static final short NUM_GGP = 0x03;
+    static final short NUM_IPv4    = 0x04;
+    static final short NUM_ST  = 0x05;
+    static final short NUM_TCP = 0x06;
+    static final short NUM_CBT = 0x07;
+    static final short NUM_EGP = 0x08;
+    static final short NUM_IGP = 0x09;
+    static final short NUM_BBN_RCC_MON = 0x0A;
+    static final short NUM_NVP_II  = 0x0B;
+    static final short NUM_PUP = 0x0C;
+    static final short NUM_ARGUS   = 0x0D;
+    static final short NUM_EMCON   = 0x0E;
+    static final short NUM_XNET    = 0x0F;
+    static final short NUM_CHAOS   = 0x10;
+    static final short NUM_UDP = 0x11;
+    static final short NUM_MUX = 0x12;
+    static final short NUM_DCN_MEAS    = 0x13;
+    static final short NUM_HMP = 0x14;
+    static final short NUM_PRM = 0x15;
+    static final short NUM_XNS_IDP = 0x16;
+    static final short NUM_TRUNK_1 = 0x17;
+    static final short NUM_TRUNK_2 = 0x18;
+    static final short NUM_LEAF_1  = 0x19;
+    static final short NUM_LEAF_2  = 0x1A;
+    static final short NUM_RDP = 0x1B;
+    static final short NUM_IRTP    = 0x1C;
+    static final short NUM_ISO_TP4 = 0x1D;
+    static final short NUM_NETBLT  = 0x1E;
+    static final short NUM_MFE_NSP = 0x1F;
+    static final short NUM_MERIT_INP   = 0x20;
+    static final short NUM_DCCP    = 0x21;
+    static final short NUM_3PC = 0x22;
+    static final short NUM_IDPR    = 0x23;
+    static final short NUM_XTP = 0x24;
+    static final short NUM_DDP = 0x25;
+    static final short NUM_IDPR_CMTP   = 0x26;
+    static final short NUM_TP_PP   = 0x27;
+    static final short NUM_IL  = 0x28;
+    static final short NUM_IPv6    = 0x29;
+    static final short NUM_SDRP    = 0x2A;
+    static final short NUM_IPv6_ROUTE  = 0x2B;
+    static final short NUM_IPv6_FRAG   = 0x2C;
+    static final short NUM_IDRP    = 0x2D;
+    static final short NUM_RSVP    = 0x2E;
+    static final short NUM_GRE = 0x2F;
+    static final short NUM_MHRP    = 0x30;
+    static final short NUM_BNA = 0x31;
+    static final short NUM_ESP = 0x32;
+    static final short NUM_AH  = 0x33;
+    static final short NUM_I_NLSP  = 0x34;
+    static final short NUM_SWIPE   = 0x35;
+    static final short NUM_NARP    = 0x36;
+    static final short NUM_MOBILE  = 0x37;
+    static final short NUM_TLSP    = 0x38;
+    static final short NUM_SKIP    = 0x39;
+    static final short NUM_IPv6_ICMP   = 0x3A;
+    static final short NUM_IPv6_NO_NXT = 0x3B;
+    static final short NUM_IPv6_OPTS   = 0x3C;
+    static final short NUM_HOST_INTERNAL   = 0x3D;
+    static final short NUM_CFTP    = 0x3E;
+    static final short NUM_LOCAL_NET   = 0x3F;
+    static final short NUM_SAT_EXPAK   = 0x40;
+    static final short NUM_KRYPTOLAN   = 0x41;
+    static final short NUM_RVD = 0x42;
+    static final short NUM_IPPC    = 0x43;
+    static final short NUM_DIST_FS = 0x44;
+    static final short NUM_SAT_MON = 0x45;
+    static final short NUM_VISA    = 0x46;
+    static final short NUM_IPCV    = 0x47;
+    static final short NUM_CPNX    = 0x48;
+    static final short NUM_CPHB    = 0x49;
+    static final short NUM_WSN = 0x4A;
+    static final short NUM_PVP = 0x4B;
+    static final short NUM_BR_SAT_MON  = 0x4C;
+    static final short NUM_SUN_ND  = 0x4D;
+    static final short NUM_WB_MON  = 0x4E;
+    static final short NUM_WB_EXPAK    = 0x4F;
+    static final short NUM_ISO_IP  = 0x50;
+    static final short NUM_VMTP    = 0x51;
+    static final short NUM_SECURE_VMTP = 0x52;
+    static final short NUM_VINES   = 0x53;
+    static final short NUM_TTP_IPTM = 0x54;
+    static final short NUM_NSFNET_IGP  = 0x55;
+    static final short NUM_DGP = 0x56;
+    static final short NUM_TCF = 0x57;
+    static final short NUM_EIGRP   = 0x58;
+    static final short NUM_OSPF    = 0x59;
+    static final short NUM_Sprite_RPC  = 0x5A;
+    static final short NUM_LARP    = 0x5B;
+    static final short NUM_MTP = 0x5C;
+    static final short NUM_AX_25   = 0x5D;
+    static final short NUM_IPIP    = 0x5E;
+    static final short NUM_MICP    = 0x5F;
+    static final short NUM_SCC_SP  = 0x60;
+    static final short NUM_ETHERIP = 0x61;
+    static final short NUM_ENCAP   = 0x62;
+    static final short NUM_PRIVATE_ENCRYPT = 0x63;
+    static final short NUM_GMTP    = 0x64;
+    static final short NUM_IFMP    = 0x65;
+    static final short NUM_PNNI    = 0x66;
+    static final short NUM_PIM = 0x67;
+    static final short NUM_ARIS    = 0x68;
+    static final short NUM_SCPS    = 0x69;
+    static final short NUM_QNX = 0x6A;
+    static final short NUM_A_N = 0x6B;
+    static final short NUM_IP_COMP = 0x6C;
+    static final short NUM_SNP = 0x6D;
+    static final short NUM_COMPAQ_PEER = 0x6E;
+    static final short NUM_IPX_IN_IP   = 0x6F;
+    static final short NUM_VRRP    = 0x70;
+    static final short NUM_PGM = 0x71;
+    static final short NUM_ZERO_HOP    = 0x72;
+    static final short NUM_L2TP    = 0x73;
+    static final short NUM_DDX = 0x74;
+    static final short NUM_IATP    = 0x75;
+    static final short NUM_STP = 0x76;
+    static final short NUM_SRP = 0x77;
+    static final short NUM_UTI = 0x78;
+    static final short NUM_SMP = 0x79;
+    static final short NUM_SM  = 0x7A;
+    static final short NUM_PTP = 0x7B;
+    static final short NUM_IS_IS_OVER_IPv4 = 0x7C;
+    static final short NUM_FIRE    = 0x7D;
+    static final short NUM_CRTP    = 0x7E;
+    static final short NUM_CRUDP   = 0x7F;
+    static final short NUM_SSCOPMCE    = 0x80;
+    static final short NUM_IPLT    = 0x81;
+    static final short NUM_SPS = 0x82;
+    static final short NUM_PIPE    = 0x83;
+    static final short NUM_SCTP    = 0x84;
+    static final short NUM_FC  = 0x85;
+    static final short NUM_RSVP_E2E_IGNORE = 0x86;
+    static final short NUM_MOBILITY_HEADER = 0x87;
+    static final short NUM_UDP_LITE    = 0x88;
+    static final short NUM_MPLS_IN_IP  = 0x89;
+    static final short NUM_MANET   = 0x8A;
+    static final short NUM_HIP = 0x8B;
+    static final short NUM_SHIM6   = 0x8C;
 
-    public static final IpProtocol IP_PROTO_HOPOPT = new IpProtocol(IP_PROTO_NUM_HOPOPT);
-    public static final IpProtocol IP_PROTO_ICMP = new IpProtocol(IP_PROTO_NUM_ICMP);
-    public static final IpProtocol IP_PROTO_IGMP = new IpProtocol(IP_PROTO_NUM_IGMP);
-    public static final IpProtocol IP_PROTO_GGP = new IpProtocol(IP_PROTO_NUM_GGP);
-    public static final IpProtocol IP_PROTO_IPv4 = new IpProtocol(IP_PROTO_NUM_IPv4);
-    public static final IpProtocol IP_PROTO_ST = new IpProtocol(IP_PROTO_NUM_ST);
-    public static final IpProtocol IP_PROTO_TCP = new IpProtocol(IP_PROTO_NUM_TCP);
-    public static final IpProtocol IP_PROTO_CBT = new IpProtocol(IP_PROTO_NUM_CBT);
-    public static final IpProtocol IP_PROTO_EGP = new IpProtocol(IP_PROTO_NUM_EGP);
-    public static final IpProtocol IP_PROTO_IGP = new IpProtocol(IP_PROTO_NUM_IGP);
-    public static final IpProtocol IP_PROTO_BBN_RCC_MON = new IpProtocol(IP_PROTO_NUM_BBN_RCC_MON);
-    public static final IpProtocol IP_PROTO_NVP_II = new IpProtocol(IP_PROTO_NUM_NVP_II);
-    public static final IpProtocol IP_PROTO_PUP = new IpProtocol(IP_PROTO_NUM_PUP);
-    public static final IpProtocol IP_PROTO_ARGUS = new IpProtocol(IP_PROTO_NUM_ARGUS);
-    public static final IpProtocol IP_PROTO_EMCON = new IpProtocol(IP_PROTO_NUM_EMCON);
-    public static final IpProtocol IP_PROTO_XNET = new IpProtocol(IP_PROTO_NUM_XNET);
-    public static final IpProtocol IP_PROTO_CHAOS = new IpProtocol(IP_PROTO_NUM_CHAOS);
-    public static final IpProtocol IP_PROTO_UDP = new IpProtocol(IP_PROTO_NUM_UDP);
-    public static final IpProtocol IP_PROTO_MUX = new IpProtocol(IP_PROTO_NUM_MUX);
-    public static final IpProtocol IP_PROTO_DCN_MEAS = new IpProtocol(IP_PROTO_NUM_DCN_MEAS);
-    public static final IpProtocol IP_PROTO_HMP = new IpProtocol(IP_PROTO_NUM_HMP);
-    public static final IpProtocol IP_PROTO_PRM = new IpProtocol(IP_PROTO_NUM_PRM);
-    public static final IpProtocol IP_PROTO_XNS_IDP = new IpProtocol(IP_PROTO_NUM_XNS_IDP);
-    public static final IpProtocol IP_PROTO_TRUNK_1 = new IpProtocol(IP_PROTO_NUM_TRUNK_1);
-    public static final IpProtocol IP_PROTO_TRUNK_2 = new IpProtocol(IP_PROTO_NUM_TRUNK_2);
-    public static final IpProtocol IP_PROTO_LEAF_1 = new IpProtocol(IP_PROTO_NUM_LEAF_1);
-    public static final IpProtocol IP_PROTO_LEAF_2 = new IpProtocol(IP_PROTO_NUM_LEAF_2);
-    public static final IpProtocol IP_PROTO_RDP = new IpProtocol(IP_PROTO_NUM_RDP);
-    public static final IpProtocol IP_PROTO_IRTP = new IpProtocol(IP_PROTO_NUM_IRTP);
-    public static final IpProtocol IP_PROTO_ISO_TP4 = new IpProtocol(IP_PROTO_NUM_ISO_TP4);
-    public static final IpProtocol IP_PROTO_NETBLT = new IpProtocol(IP_PROTO_NUM_NETBLT);
-    public static final IpProtocol IP_PROTO_MFE_NSP = new IpProtocol(IP_PROTO_NUM_MFE_NSP);
-    public static final IpProtocol IP_PROTO_MERIT_INP = new IpProtocol(IP_PROTO_NUM_MERIT_INP);
-    public static final IpProtocol IP_PROTO_DCCP = new IpProtocol(IP_PROTO_NUM_DCCP);
-    public static final IpProtocol IP_PROTO_3PC = new IpProtocol(IP_PROTO_NUM_3PC);
-    public static final IpProtocol IP_PROTO_IDPR = new IpProtocol(IP_PROTO_NUM_IDPR);
-    public static final IpProtocol IP_PROTO_XTP = new IpProtocol(IP_PROTO_NUM_XTP);
-    public static final IpProtocol IP_PROTO_DDP = new IpProtocol(IP_PROTO_NUM_DDP);
-    public static final IpProtocol IP_PROTO_IDPR_CMTP = new IpProtocol(IP_PROTO_NUM_IDPR_CMTP);
-    public static final IpProtocol IP_PROTO_TP_PP = new IpProtocol(IP_PROTO_NUM_TP_PP);
-    public static final IpProtocol IP_PROTO_IL = new IpProtocol(IP_PROTO_NUM_IL);
-    public static final IpProtocol IP_PROTO_IPv6 = new IpProtocol(IP_PROTO_NUM_IPv6);
-    public static final IpProtocol IP_PROTO_SDRP = new IpProtocol(IP_PROTO_NUM_SDRP);
-    public static final IpProtocol IP_PROTO_IPv6_ROUTE = new IpProtocol(IP_PROTO_NUM_IPv6_ROUTE);
-    public static final IpProtocol IP_PROTO_IPv6_FRAG = new IpProtocol(IP_PROTO_NUM_IPv6_FRAG);
-    public static final IpProtocol IP_PROTO_IDRP = new IpProtocol(IP_PROTO_NUM_IDRP);
-    public static final IpProtocol IP_PROTO_RSVP = new IpProtocol(IP_PROTO_NUM_RSVP);
-    public static final IpProtocol IP_PROTO_GRE = new IpProtocol(IP_PROTO_NUM_GRE);
-    public static final IpProtocol IP_PROTO_MHRP = new IpProtocol(IP_PROTO_NUM_MHRP);
-    public static final IpProtocol IP_PROTO_BNA = new IpProtocol(IP_PROTO_NUM_BNA);
-    public static final IpProtocol IP_PROTO_ESP = new IpProtocol(IP_PROTO_NUM_ESP);
-    public static final IpProtocol IP_PROTO_AH = new IpProtocol(IP_PROTO_NUM_AH);
-    public static final IpProtocol IP_PROTO_I_NLSP = new IpProtocol(IP_PROTO_NUM_I_NLSP);
-    public static final IpProtocol IP_PROTO_SWIPE = new IpProtocol(IP_PROTO_NUM_SWIPE);
-    public static final IpProtocol IP_PROTO_NARP = new IpProtocol(IP_PROTO_NUM_NARP);
-    public static final IpProtocol IP_PROTO_MOBILE = new IpProtocol(IP_PROTO_NUM_MOBILE);
-    public static final IpProtocol IP_PROTO_TLSP = new IpProtocol(IP_PROTO_NUM_TLSP);
-    public static final IpProtocol IP_PROTO_SKIP = new IpProtocol(IP_PROTO_NUM_SKIP);
-    public static final IpProtocol IP_PROTO_IPv6_ICMP = new IpProtocol(IP_PROTO_NUM_IPv6_ICMP);
-    public static final IpProtocol IP_PROTO_IPv6_NO_NXT = new IpProtocol(IP_PROTO_NUM_IPv6_NO_NXT);
-    public static final IpProtocol IP_PROTO_IPv6_OPTS = new IpProtocol(IP_PROTO_NUM_IPv6_OPTS);
-    public static final IpProtocol IP_PROTO_HOST_INTERNAL = new IpProtocol(IP_PROTO_NUM_HOST_INTERNAL);
-    public static final IpProtocol IP_PROTO_CFTP = new IpProtocol(IP_PROTO_NUM_CFTP);
-    public static final IpProtocol IP_PROTO_LOCAL_NET = new IpProtocol(IP_PROTO_NUM_LOCAL_NET);
-    public static final IpProtocol IP_PROTO_SAT_EXPAK = new IpProtocol(IP_PROTO_NUM_SAT_EXPAK);
-    public static final IpProtocol IP_PROTO_KRYPTOLAN = new IpProtocol(IP_PROTO_NUM_KRYPTOLAN);
-    public static final IpProtocol IP_PROTO_RVD = new IpProtocol(IP_PROTO_NUM_RVD);
-    public static final IpProtocol IP_PROTO_IPPC = new IpProtocol(IP_PROTO_NUM_IPPC);
-    public static final IpProtocol IP_PROTO_DIST_FS = new IpProtocol(IP_PROTO_NUM_DIST_FS);
-    public static final IpProtocol IP_PROTO_SAT_MON = new IpProtocol(IP_PROTO_NUM_SAT_MON);
-    public static final IpProtocol IP_PROTO_VISA = new IpProtocol(IP_PROTO_NUM_VISA);
-    public static final IpProtocol IP_PROTO_IPCV = new IpProtocol(IP_PROTO_NUM_IPCV);
-    public static final IpProtocol IP_PROTO_CPNX = new IpProtocol(IP_PROTO_NUM_CPNX);
-    public static final IpProtocol IP_PROTO_CPHB = new IpProtocol(IP_PROTO_NUM_CPHB);
-    public static final IpProtocol IP_PROTO_WSN = new IpProtocol(IP_PROTO_NUM_WSN);
-    public static final IpProtocol IP_PROTO_PVP = new IpProtocol(IP_PROTO_NUM_PVP);
-    public static final IpProtocol IP_PROTO_BR_SAT_MON = new IpProtocol(IP_PROTO_NUM_BR_SAT_MON);
-    public static final IpProtocol IP_PROTO_SUN_ND = new IpProtocol(IP_PROTO_NUM_SUN_ND);
-    public static final IpProtocol IP_PROTO_WB_MON = new IpProtocol(IP_PROTO_NUM_WB_MON);
-    public static final IpProtocol IP_PROTO_WB_EXPAK = new IpProtocol(IP_PROTO_NUM_WB_EXPAK);
-    public static final IpProtocol IP_PROTO_ISO_IP = new IpProtocol(IP_PROTO_NUM_ISO_IP);
-    public static final IpProtocol IP_PROTO_VMTP = new IpProtocol(IP_PROTO_NUM_VMTP);
-    public static final IpProtocol IP_PROTO_SECURE_VMTP = new IpProtocol(IP_PROTO_NUM_SECURE_VMTP);
-    public static final IpProtocol IP_PROTO_VINES = new IpProtocol(IP_PROTO_NUM_VINES);
-    public static final IpProtocol IP_PROTO_TTP_IPTM = new IpProtocol(IP_PROTO_NUM_TTP_IPTM);
-    public static final IpProtocol IP_PROTO_NSFNET_IGP = new IpProtocol(IP_PROTO_NUM_NSFNET_IGP);
-    public static final IpProtocol IP_PROTO_DGP = new IpProtocol(IP_PROTO_NUM_DGP);
-    public static final IpProtocol IP_PROTO_TCF = new IpProtocol(IP_PROTO_NUM_TCF);
-    public static final IpProtocol IP_PROTO_EIGRP = new IpProtocol(IP_PROTO_NUM_EIGRP);
-    public static final IpProtocol IP_PROTO_OSPF = new IpProtocol(IP_PROTO_NUM_OSPF);
-    public static final IpProtocol IP_PROTO_Sprite_RPC = new IpProtocol(IP_PROTO_NUM_Sprite_RPC);
-    public static final IpProtocol IP_PROTO_LARP = new IpProtocol(IP_PROTO_NUM_LARP);
-    public static final IpProtocol IP_PROTO_MTP = new IpProtocol(IP_PROTO_NUM_MTP);
-    public static final IpProtocol IP_PROTO_AX_25 = new IpProtocol(IP_PROTO_NUM_AX_25);
-    public static final IpProtocol IP_PROTO_IPIP = new IpProtocol(IP_PROTO_NUM_IPIP);
-    public static final IpProtocol IP_PROTO_MICP = new IpProtocol(IP_PROTO_NUM_MICP);
-    public static final IpProtocol IP_PROTO_SCC_SP = new IpProtocol(IP_PROTO_NUM_SCC_SP);
-    public static final IpProtocol IP_PROTO_ETHERIP = new IpProtocol(IP_PROTO_NUM_ETHERIP);
-    public static final IpProtocol IP_PROTO_ENCAP = new IpProtocol(IP_PROTO_NUM_ENCAP);
-    public static final IpProtocol IP_PROTO_PRIVATE_ENCRYPT = new IpProtocol(IP_PROTO_NUM_PRIVATE_ENCRYPT);
-    public static final IpProtocol IP_PROTO_GMTP = new IpProtocol(IP_PROTO_NUM_GMTP);
-    public static final IpProtocol IP_PROTO_IFMP = new IpProtocol(IP_PROTO_NUM_IFMP);
-    public static final IpProtocol IP_PROTO_PNNI = new IpProtocol(IP_PROTO_NUM_PNNI);
-    public static final IpProtocol IP_PROTO_PIM = new IpProtocol(IP_PROTO_NUM_PIM);
-    public static final IpProtocol IP_PROTO_ARIS = new IpProtocol(IP_PROTO_NUM_ARIS);
-    public static final IpProtocol IP_PROTO_SCPS = new IpProtocol(IP_PROTO_NUM_SCPS);
-    public static final IpProtocol IP_PROTO_QNX = new IpProtocol(IP_PROTO_NUM_QNX);
-    public static final IpProtocol IP_PROTO_A_N = new IpProtocol(IP_PROTO_NUM_A_N);
-    public static final IpProtocol IP_PROTO_IP_COMP = new IpProtocol(IP_PROTO_NUM_IP_COMP);
-    public static final IpProtocol IP_PROTO_SNP = new IpProtocol(IP_PROTO_NUM_SNP);
-    public static final IpProtocol IP_PROTO_COMPAQ_PEER = new IpProtocol(IP_PROTO_NUM_COMPAQ_PEER);
-    public static final IpProtocol IP_PROTO_IPX_IN_IP = new IpProtocol(IP_PROTO_NUM_IPX_IN_IP);
-    public static final IpProtocol IP_PROTO_VRRP = new IpProtocol(IP_PROTO_NUM_VRRP);
-    public static final IpProtocol IP_PROTO_PGM = new IpProtocol(IP_PROTO_NUM_PGM);
-    public static final IpProtocol IP_PROTO_ZERO_HOP = new IpProtocol(IP_PROTO_NUM_ZERO_HOP);
-    public static final IpProtocol IP_PROTO_L2TP = new IpProtocol(IP_PROTO_NUM_L2TP);
-    public static final IpProtocol IP_PROTO_DDX = new IpProtocol(IP_PROTO_NUM_DDX);
-    public static final IpProtocol IP_PROTO_IATP = new IpProtocol(IP_PROTO_NUM_IATP);
-    public static final IpProtocol IP_PROTO_STP = new IpProtocol(IP_PROTO_NUM_STP);
-    public static final IpProtocol IP_PROTO_SRP = new IpProtocol(IP_PROTO_NUM_SRP);
-    public static final IpProtocol IP_PROTO_UTI = new IpProtocol(IP_PROTO_NUM_UTI);
-    public static final IpProtocol IP_PROTO_SMP = new IpProtocol(IP_PROTO_NUM_SMP);
-    public static final IpProtocol IP_PROTO_SM = new IpProtocol(IP_PROTO_NUM_SM);
-    public static final IpProtocol IP_PROTO_PTP = new IpProtocol(IP_PROTO_NUM_PTP);
-    public static final IpProtocol IP_PROTO_IS_IS_OVER_IPv4 = new IpProtocol(IP_PROTO_NUM_IS_IS_OVER_IPv4);
-    public static final IpProtocol IP_PROTO_FIRE = new IpProtocol(IP_PROTO_NUM_FIRE);
-    public static final IpProtocol IP_PROTO_CRTP = new IpProtocol(IP_PROTO_NUM_CRTP);
-    public static final IpProtocol IP_PROTO_CRUDP = new IpProtocol(IP_PROTO_NUM_CRUDP);
-    public static final IpProtocol IP_PROTO_SSCOPMCE = new IpProtocol(IP_PROTO_NUM_SSCOPMCE);
-    public static final IpProtocol IP_PROTO_IPLT = new IpProtocol(IP_PROTO_NUM_IPLT);
-    public static final IpProtocol IP_PROTO_SPS = new IpProtocol(IP_PROTO_NUM_SPS);
-    public static final IpProtocol IP_PROTO_PIPE = new IpProtocol(IP_PROTO_NUM_PIPE);
-    public static final IpProtocol IP_PROTO_SCTP = new IpProtocol(IP_PROTO_NUM_SCTP);
-    public static final IpProtocol IP_PROTO_FC = new IpProtocol(IP_PROTO_NUM_FC);
-    public static final IpProtocol IP_PROTO_RSVP_E2E_IGNORE = new IpProtocol(IP_PROTO_NUM_RSVP_E2E_IGNORE);
-    public static final IpProtocol IP_PROTO_MOBILITY_HEADER = new IpProtocol(IP_PROTO_NUM_MOBILITY_HEADER);
-    public static final IpProtocol IP_PROTO_UDP_LITE = new IpProtocol(IP_PROTO_NUM_UDP_LITE);
-    public static final IpProtocol IP_PROTO_MPLS_IN_IP = new IpProtocol(IP_PROTO_NUM_MPLS_IN_IP);
-    public static final IpProtocol IP_PROTO_MANET = new IpProtocol(IP_PROTO_NUM_MANET);
-    public static final IpProtocol IP_PROTO_HIP = new IpProtocol(IP_PROTO_NUM_HIP);
-    public static final IpProtocol IP_PROTO_SHIM6 = new IpProtocol(IP_PROTO_NUM_SHIM6);
+    public static final IpProtocol HOPOPT = new IpProtocol(NUM_HOPOPT);
+    public static final IpProtocol ICMP = new IpProtocol(NUM_ICMP);
+    public static final IpProtocol IGMP = new IpProtocol(NUM_IGMP);
+    public static final IpProtocol GGP = new IpProtocol(NUM_GGP);
+    public static final IpProtocol IPv4 = new IpProtocol(NUM_IPv4);
+    public static final IpProtocol ST = new IpProtocol(NUM_ST);
+    public static final IpProtocol TCP = new IpProtocol(NUM_TCP);
+    public static final IpProtocol CBT = new IpProtocol(NUM_CBT);
+    public static final IpProtocol EGP = new IpProtocol(NUM_EGP);
+    public static final IpProtocol IGP = new IpProtocol(NUM_IGP);
+    public static final IpProtocol BBN_RCC_MON = new IpProtocol(NUM_BBN_RCC_MON);
+    public static final IpProtocol NVP_II = new IpProtocol(NUM_NVP_II);
+    public static final IpProtocol PUP = new IpProtocol(NUM_PUP);
+    public static final IpProtocol ARGUS = new IpProtocol(NUM_ARGUS);
+    public static final IpProtocol EMCON = new IpProtocol(NUM_EMCON);
+    public static final IpProtocol XNET = new IpProtocol(NUM_XNET);
+    public static final IpProtocol CHAOS = new IpProtocol(NUM_CHAOS);
+    public static final IpProtocol UDP = new IpProtocol(NUM_UDP);
+    public static final IpProtocol MUX = new IpProtocol(NUM_MUX);
+    public static final IpProtocol DCN_MEAS = new IpProtocol(NUM_DCN_MEAS);
+    public static final IpProtocol HMP = new IpProtocol(NUM_HMP);
+    public static final IpProtocol PRM = new IpProtocol(NUM_PRM);
+    public static final IpProtocol XNS_IDP = new IpProtocol(NUM_XNS_IDP);
+    public static final IpProtocol TRUNK_1 = new IpProtocol(NUM_TRUNK_1);
+    public static final IpProtocol TRUNK_2 = new IpProtocol(NUM_TRUNK_2);
+    public static final IpProtocol LEAF_1 = new IpProtocol(NUM_LEAF_1);
+    public static final IpProtocol LEAF_2 = new IpProtocol(NUM_LEAF_2);
+    public static final IpProtocol RDP = new IpProtocol(NUM_RDP);
+    public static final IpProtocol IRTP = new IpProtocol(NUM_IRTP);
+    public static final IpProtocol ISO_TP4 = new IpProtocol(NUM_ISO_TP4);
+    public static final IpProtocol NETBLT = new IpProtocol(NUM_NETBLT);
+    public static final IpProtocol MFE_NSP = new IpProtocol(NUM_MFE_NSP);
+    public static final IpProtocol MERIT_INP = new IpProtocol(NUM_MERIT_INP);
+    public static final IpProtocol DCCP = new IpProtocol(NUM_DCCP);
+    public static final IpProtocol _3PC = new IpProtocol(NUM_3PC);
+    public static final IpProtocol IDPR = new IpProtocol(NUM_IDPR);
+    public static final IpProtocol XTP = new IpProtocol(NUM_XTP);
+    public static final IpProtocol DDP = new IpProtocol(NUM_DDP);
+    public static final IpProtocol IDPR_CMTP = new IpProtocol(NUM_IDPR_CMTP);
+    public static final IpProtocol TP_PP = new IpProtocol(NUM_TP_PP);
+    public static final IpProtocol IL = new IpProtocol(NUM_IL);
+    public static final IpProtocol IPv6 = new IpProtocol(NUM_IPv6);
+    public static final IpProtocol SDRP = new IpProtocol(NUM_SDRP);
+    public static final IpProtocol IPv6_ROUTE = new IpProtocol(NUM_IPv6_ROUTE);
+    public static final IpProtocol IPv6_FRAG = new IpProtocol(NUM_IPv6_FRAG);
+    public static final IpProtocol IDRP = new IpProtocol(NUM_IDRP);
+    public static final IpProtocol RSVP = new IpProtocol(NUM_RSVP);
+    public static final IpProtocol GRE = new IpProtocol(NUM_GRE);
+    public static final IpProtocol MHRP = new IpProtocol(NUM_MHRP);
+    public static final IpProtocol BNA = new IpProtocol(NUM_BNA);
+    public static final IpProtocol ESP = new IpProtocol(NUM_ESP);
+    public static final IpProtocol AH = new IpProtocol(NUM_AH);
+    public static final IpProtocol I_NLSP = new IpProtocol(NUM_I_NLSP);
+    public static final IpProtocol SWIPE = new IpProtocol(NUM_SWIPE);
+    public static final IpProtocol NARP = new IpProtocol(NUM_NARP);
+    public static final IpProtocol MOBILE = new IpProtocol(NUM_MOBILE);
+    public static final IpProtocol TLSP = new IpProtocol(NUM_TLSP);
+    public static final IpProtocol SKIP = new IpProtocol(NUM_SKIP);
+    public static final IpProtocol IPv6_ICMP = new IpProtocol(NUM_IPv6_ICMP);
+    public static final IpProtocol IPv6_NO_NXT = new IpProtocol(NUM_IPv6_NO_NXT);
+    public static final IpProtocol IPv6_OPTS = new IpProtocol(NUM_IPv6_OPTS);
+    public static final IpProtocol HOST_INTERNAL = new IpProtocol(NUM_HOST_INTERNAL);
+    public static final IpProtocol CFTP = new IpProtocol(NUM_CFTP);
+    public static final IpProtocol LOCAL_NET = new IpProtocol(NUM_LOCAL_NET);
+    public static final IpProtocol SAT_EXPAK = new IpProtocol(NUM_SAT_EXPAK);
+    public static final IpProtocol KRYPTOLAN = new IpProtocol(NUM_KRYPTOLAN);
+    public static final IpProtocol RVD = new IpProtocol(NUM_RVD);
+    public static final IpProtocol IPPC = new IpProtocol(NUM_IPPC);
+    public static final IpProtocol DIST_FS = new IpProtocol(NUM_DIST_FS);
+    public static final IpProtocol SAT_MON = new IpProtocol(NUM_SAT_MON);
+    public static final IpProtocol VISA = new IpProtocol(NUM_VISA);
+    public static final IpProtocol IPCV = new IpProtocol(NUM_IPCV);
+    public static final IpProtocol CPNX = new IpProtocol(NUM_CPNX);
+    public static final IpProtocol CPHB = new IpProtocol(NUM_CPHB);
+    public static final IpProtocol WSN = new IpProtocol(NUM_WSN);
+    public static final IpProtocol PVP = new IpProtocol(NUM_PVP);
+    public static final IpProtocol BR_SAT_MON = new IpProtocol(NUM_BR_SAT_MON);
+    public static final IpProtocol SUN_ND = new IpProtocol(NUM_SUN_ND);
+    public static final IpProtocol WB_MON = new IpProtocol(NUM_WB_MON);
+    public static final IpProtocol WB_EXPAK = new IpProtocol(NUM_WB_EXPAK);
+    public static final IpProtocol ISO_IP = new IpProtocol(NUM_ISO_IP);
+    public static final IpProtocol VMTP = new IpProtocol(NUM_VMTP);
+    public static final IpProtocol SECURE_VMTP = new IpProtocol(NUM_SECURE_VMTP);
+    public static final IpProtocol VINES = new IpProtocol(NUM_VINES);
+    public static final IpProtocol TTP_IPTM = new IpProtocol(NUM_TTP_IPTM);
+    public static final IpProtocol NSFNET_IGP = new IpProtocol(NUM_NSFNET_IGP);
+    public static final IpProtocol DGP = new IpProtocol(NUM_DGP);
+    public static final IpProtocol TCF = new IpProtocol(NUM_TCF);
+    public static final IpProtocol EIGRP = new IpProtocol(NUM_EIGRP);
+    public static final IpProtocol OSPF = new IpProtocol(NUM_OSPF);
+    public static final IpProtocol Sprite_RPC = new IpProtocol(NUM_Sprite_RPC);
+    public static final IpProtocol LARP = new IpProtocol(NUM_LARP);
+    public static final IpProtocol MTP = new IpProtocol(NUM_MTP);
+    public static final IpProtocol AX_25 = new IpProtocol(NUM_AX_25);
+    public static final IpProtocol IPIP = new IpProtocol(NUM_IPIP);
+    public static final IpProtocol MICP = new IpProtocol(NUM_MICP);
+    public static final IpProtocol SCC_SP = new IpProtocol(NUM_SCC_SP);
+    public static final IpProtocol ETHERIP = new IpProtocol(NUM_ETHERIP);
+    public static final IpProtocol ENCAP = new IpProtocol(NUM_ENCAP);
+    public static final IpProtocol PRIVATE_ENCRYPT = new IpProtocol(NUM_PRIVATE_ENCRYPT);
+    public static final IpProtocol GMTP = new IpProtocol(NUM_GMTP);
+    public static final IpProtocol IFMP = new IpProtocol(NUM_IFMP);
+    public static final IpProtocol PNNI = new IpProtocol(NUM_PNNI);
+    public static final IpProtocol PIM = new IpProtocol(NUM_PIM);
+    public static final IpProtocol ARIS = new IpProtocol(NUM_ARIS);
+    public static final IpProtocol SCPS = new IpProtocol(NUM_SCPS);
+    public static final IpProtocol QNX = new IpProtocol(NUM_QNX);
+    public static final IpProtocol A_N = new IpProtocol(NUM_A_N);
+    public static final IpProtocol IP_COMP = new IpProtocol(NUM_IP_COMP);
+    public static final IpProtocol SNP = new IpProtocol(NUM_SNP);
+    public static final IpProtocol COMPAQ_PEER = new IpProtocol(NUM_COMPAQ_PEER);
+    public static final IpProtocol IPX_IN_IP = new IpProtocol(NUM_IPX_IN_IP);
+    public static final IpProtocol VRRP = new IpProtocol(NUM_VRRP);
+    public static final IpProtocol PGM = new IpProtocol(NUM_PGM);
+    public static final IpProtocol ZERO_HOP = new IpProtocol(NUM_ZERO_HOP);
+    public static final IpProtocol L2TP = new IpProtocol(NUM_L2TP);
+    public static final IpProtocol DDX = new IpProtocol(NUM_DDX);
+    public static final IpProtocol IATP = new IpProtocol(NUM_IATP);
+    public static final IpProtocol STP = new IpProtocol(NUM_STP);
+    public static final IpProtocol SRP = new IpProtocol(NUM_SRP);
+    public static final IpProtocol UTI = new IpProtocol(NUM_UTI);
+    public static final IpProtocol SMP = new IpProtocol(NUM_SMP);
+    public static final IpProtocol SM = new IpProtocol(NUM_SM);
+    public static final IpProtocol PTP = new IpProtocol(NUM_PTP);
+    public static final IpProtocol IS_IS_OVER_IPv4 = new IpProtocol(NUM_IS_IS_OVER_IPv4);
+    public static final IpProtocol FIRE = new IpProtocol(NUM_FIRE);
+    public static final IpProtocol CRTP = new IpProtocol(NUM_CRTP);
+    public static final IpProtocol CRUDP = new IpProtocol(NUM_CRUDP);
+    public static final IpProtocol SSCOPMCE = new IpProtocol(NUM_SSCOPMCE);
+    public static final IpProtocol IPLT = new IpProtocol(NUM_IPLT);
+    public static final IpProtocol SPS = new IpProtocol(NUM_SPS);
+    public static final IpProtocol PIPE = new IpProtocol(NUM_PIPE);
+    public static final IpProtocol SCTP = new IpProtocol(NUM_SCTP);
+    public static final IpProtocol FC = new IpProtocol(NUM_FC);
+    public static final IpProtocol RSVP_E2E_IGNORE = new IpProtocol(NUM_RSVP_E2E_IGNORE);
+    public static final IpProtocol MOBILITY_HEADER = new IpProtocol(NUM_MOBILITY_HEADER);
+    public static final IpProtocol UDP_LITE = new IpProtocol(NUM_UDP_LITE);
+    public static final IpProtocol MPLS_IN_IP = new IpProtocol(NUM_MPLS_IN_IP);
+    public static final IpProtocol MANET = new IpProtocol(NUM_MANET);
+    public static final IpProtocol HIP = new IpProtocol(NUM_HIP);
+    public static final IpProtocol SHIM6 = new IpProtocol(NUM_SHIM6);
 
-    public static final IpProtocol NONE = IP_PROTO_HOPOPT;
+    public static final IpProtocol NONE = HOPOPT;
 
-    public static final IpProtocol NO_MASK = IP_PROTO_HOPOPT;
+    public static final IpProtocol NO_MASK = HOPOPT;
     public static final IpProtocol FULL_MASK = new IpProtocol((short)0x0000);
 
     private IpProtocol(short version) {
@@ -317,288 +317,288 @@
 
     public static IpProtocol of(short proto) {
         switch (proto) {
-            case IP_PROTO_NUM_HOPOPT:
-                return IP_PROTO_HOPOPT;
-            case IP_PROTO_NUM_ICMP:
-                return IP_PROTO_ICMP;
-            case IP_PROTO_NUM_IGMP:
-                return IP_PROTO_IGMP;
-            case IP_PROTO_NUM_GGP:
-                return IP_PROTO_GGP;
-            case IP_PROTO_NUM_IPv4:
-                return IP_PROTO_IPv4;
-            case IP_PROTO_NUM_ST:
-                return IP_PROTO_ST;
-            case IP_PROTO_NUM_TCP:
-                return IP_PROTO_TCP;
-            case IP_PROTO_NUM_CBT:
-                return IP_PROTO_CBT;
-            case IP_PROTO_NUM_EGP:
-                return IP_PROTO_EGP;
-            case IP_PROTO_NUM_IGP:
-                return IP_PROTO_IGP;
-            case IP_PROTO_NUM_BBN_RCC_MON:
-                return IP_PROTO_BBN_RCC_MON;
-            case IP_PROTO_NUM_NVP_II:
-                return IP_PROTO_NVP_II;
-            case IP_PROTO_NUM_PUP:
-                return IP_PROTO_PUP;
-            case IP_PROTO_NUM_ARGUS:
-                return IP_PROTO_ARGUS;
-            case IP_PROTO_NUM_EMCON:
-                return IP_PROTO_EMCON;
-            case IP_PROTO_NUM_XNET:
-                return IP_PROTO_XNET;
-            case IP_PROTO_NUM_CHAOS:
-                return IP_PROTO_CHAOS;
-            case IP_PROTO_NUM_UDP:
-                return IP_PROTO_UDP;
-            case IP_PROTO_NUM_MUX:
-                return IP_PROTO_MUX;
-            case IP_PROTO_NUM_DCN_MEAS:
-                return IP_PROTO_DCN_MEAS;
-            case IP_PROTO_NUM_HMP:
-                return IP_PROTO_HMP;
-            case IP_PROTO_NUM_PRM:
-                return IP_PROTO_PRM;
-            case IP_PROTO_NUM_XNS_IDP:
-                return IP_PROTO_XNS_IDP;
-            case IP_PROTO_NUM_TRUNK_1:
-                return IP_PROTO_TRUNK_1;
-            case IP_PROTO_NUM_TRUNK_2:
-                return IP_PROTO_TRUNK_2;
-            case IP_PROTO_NUM_LEAF_1:
-                return IP_PROTO_LEAF_1;
-            case IP_PROTO_NUM_LEAF_2:
-                return IP_PROTO_LEAF_2;
-            case IP_PROTO_NUM_RDP:
-                return IP_PROTO_RDP;
-            case IP_PROTO_NUM_IRTP:
-                return IP_PROTO_IRTP;
-            case IP_PROTO_NUM_ISO_TP4:
-                return IP_PROTO_ISO_TP4;
-            case IP_PROTO_NUM_NETBLT:
-                return IP_PROTO_NETBLT;
-            case IP_PROTO_NUM_MFE_NSP:
-                return IP_PROTO_MFE_NSP;
-            case IP_PROTO_NUM_MERIT_INP:
-                return IP_PROTO_MERIT_INP;
-            case IP_PROTO_NUM_DCCP:
-                return IP_PROTO_DCCP;
-            case IP_PROTO_NUM_3PC:
-                return IP_PROTO_3PC;
-            case IP_PROTO_NUM_IDPR:
-                return IP_PROTO_IDPR;
-            case IP_PROTO_NUM_XTP:
-                return IP_PROTO_XTP;
-            case IP_PROTO_NUM_DDP:
-                return IP_PROTO_DDP;
-            case IP_PROTO_NUM_IDPR_CMTP:
-                return IP_PROTO_IDPR_CMTP;
-            case IP_PROTO_NUM_TP_PP:
-                return IP_PROTO_TP_PP;
-            case IP_PROTO_NUM_IL:
-                return IP_PROTO_IL;
-            case IP_PROTO_NUM_IPv6:
-                return IP_PROTO_IPv6;
-            case IP_PROTO_NUM_SDRP:
-                return IP_PROTO_SDRP;
-            case IP_PROTO_NUM_IPv6_ROUTE:
-                return IP_PROTO_IPv6_ROUTE;
-            case IP_PROTO_NUM_IPv6_FRAG:
-                return IP_PROTO_IPv6_FRAG;
-            case IP_PROTO_NUM_IDRP:
-                return IP_PROTO_IDRP;
-            case IP_PROTO_NUM_RSVP:
-                return IP_PROTO_RSVP;
-            case IP_PROTO_NUM_GRE:
-                return IP_PROTO_GRE;
-            case IP_PROTO_NUM_MHRP:
-                return IP_PROTO_MHRP;
-            case IP_PROTO_NUM_BNA:
-                return IP_PROTO_BNA;
-            case IP_PROTO_NUM_ESP:
-                return IP_PROTO_ESP;
-            case IP_PROTO_NUM_AH:
-                return IP_PROTO_AH;
-            case IP_PROTO_NUM_I_NLSP:
-                return IP_PROTO_I_NLSP;
-            case IP_PROTO_NUM_SWIPE:
-                return IP_PROTO_SWIPE;
-            case IP_PROTO_NUM_NARP:
-                return IP_PROTO_NARP;
-            case IP_PROTO_NUM_MOBILE:
-                return IP_PROTO_MOBILE;
-            case IP_PROTO_NUM_TLSP:
-                return IP_PROTO_TLSP;
-            case IP_PROTO_NUM_SKIP:
-                return IP_PROTO_SKIP;
-            case IP_PROTO_NUM_IPv6_ICMP:
-                return IP_PROTO_IPv6_ICMP;
-            case IP_PROTO_NUM_IPv6_NO_NXT:
-                return IP_PROTO_IPv6_NO_NXT;
-            case IP_PROTO_NUM_IPv6_OPTS:
-                return IP_PROTO_IPv6_OPTS;
-            case IP_PROTO_NUM_HOST_INTERNAL:
-                return IP_PROTO_HOST_INTERNAL;
-            case IP_PROTO_NUM_CFTP:
-                return IP_PROTO_CFTP;
-            case IP_PROTO_NUM_LOCAL_NET:
-                return IP_PROTO_LOCAL_NET;
-            case IP_PROTO_NUM_SAT_EXPAK:
-                return IP_PROTO_SAT_EXPAK;
-            case IP_PROTO_NUM_KRYPTOLAN:
-                return IP_PROTO_KRYPTOLAN;
-            case IP_PROTO_NUM_RVD:
-                return IP_PROTO_RVD;
-            case IP_PROTO_NUM_IPPC:
-                return IP_PROTO_IPPC;
-            case IP_PROTO_NUM_DIST_FS:
-                return IP_PROTO_DIST_FS;
-            case IP_PROTO_NUM_SAT_MON:
-                return IP_PROTO_SAT_MON;
-            case IP_PROTO_NUM_VISA:
-                return IP_PROTO_VISA;
-            case IP_PROTO_NUM_IPCV:
-                return IP_PROTO_IPCV;
-            case IP_PROTO_NUM_CPNX:
-                return IP_PROTO_CPNX;
-            case IP_PROTO_NUM_CPHB:
-                return IP_PROTO_CPHB;
-            case IP_PROTO_NUM_WSN:
-                return IP_PROTO_WSN;
-            case IP_PROTO_NUM_PVP:
-                return IP_PROTO_PVP;
-            case IP_PROTO_NUM_BR_SAT_MON:
-                return IP_PROTO_BR_SAT_MON;
-            case IP_PROTO_NUM_SUN_ND:
-                return IP_PROTO_SUN_ND;
-            case IP_PROTO_NUM_WB_MON:
-                return IP_PROTO_WB_MON;
-            case IP_PROTO_NUM_WB_EXPAK:
-                return IP_PROTO_WB_EXPAK;
-            case IP_PROTO_NUM_ISO_IP:
-                return IP_PROTO_ISO_IP;
-            case IP_PROTO_NUM_VMTP:
-                return IP_PROTO_VMTP;
-            case IP_PROTO_NUM_SECURE_VMTP:
-                return IP_PROTO_SECURE_VMTP;
-            case IP_PROTO_NUM_VINES:
-                return IP_PROTO_VINES;
-            case IP_PROTO_NUM_TTP_IPTM:
-                return IP_PROTO_TTP_IPTM;
-            case IP_PROTO_NUM_NSFNET_IGP:
-                return IP_PROTO_NSFNET_IGP;
-            case IP_PROTO_NUM_DGP:
-                return IP_PROTO_DGP;
-            case IP_PROTO_NUM_TCF:
-                return IP_PROTO_TCF;
-            case IP_PROTO_NUM_EIGRP:
-                return IP_PROTO_EIGRP;
-            case IP_PROTO_NUM_OSPF:
-                return IP_PROTO_OSPF;
-            case IP_PROTO_NUM_Sprite_RPC:
-                return IP_PROTO_Sprite_RPC;
-            case IP_PROTO_NUM_LARP:
-                return IP_PROTO_LARP;
-            case IP_PROTO_NUM_MTP:
-                return IP_PROTO_MTP;
-            case IP_PROTO_NUM_AX_25:
-                return IP_PROTO_AX_25;
-            case IP_PROTO_NUM_IPIP:
-                return IP_PROTO_IPIP;
-            case IP_PROTO_NUM_MICP:
-                return IP_PROTO_MICP;
-            case IP_PROTO_NUM_SCC_SP:
-                return IP_PROTO_SCC_SP;
-            case IP_PROTO_NUM_ETHERIP:
-                return IP_PROTO_ETHERIP;
-            case IP_PROTO_NUM_ENCAP:
-                return IP_PROTO_ENCAP;
-            case IP_PROTO_NUM_PRIVATE_ENCRYPT:
-                return IP_PROTO_PRIVATE_ENCRYPT;
-            case IP_PROTO_NUM_GMTP:
-                return IP_PROTO_GMTP;
-            case IP_PROTO_NUM_IFMP:
-                return IP_PROTO_IFMP;
-            case IP_PROTO_NUM_PNNI:
-                return IP_PROTO_PNNI;
-            case IP_PROTO_NUM_PIM:
-                return IP_PROTO_PIM;
-            case IP_PROTO_NUM_ARIS:
-                return IP_PROTO_ARIS;
-            case IP_PROTO_NUM_SCPS:
-                return IP_PROTO_SCPS;
-            case IP_PROTO_NUM_QNX:
-                return IP_PROTO_QNX;
-            case IP_PROTO_NUM_A_N:
-                return IP_PROTO_A_N;
-            case IP_PROTO_NUM_IP_COMP:
-                return IP_PROTO_IP_COMP;
-            case IP_PROTO_NUM_SNP:
-                return IP_PROTO_SNP;
-            case IP_PROTO_NUM_COMPAQ_PEER:
-                return IP_PROTO_COMPAQ_PEER;
-            case IP_PROTO_NUM_IPX_IN_IP:
-                return IP_PROTO_IPX_IN_IP;
-            case IP_PROTO_NUM_VRRP:
-                return IP_PROTO_VRRP;
-            case IP_PROTO_NUM_PGM:
-                return IP_PROTO_PGM;
-            case IP_PROTO_NUM_ZERO_HOP:
-                return IP_PROTO_ZERO_HOP;
-            case IP_PROTO_NUM_L2TP:
-                return IP_PROTO_L2TP;
-            case IP_PROTO_NUM_DDX:
-                return IP_PROTO_DDX;
-            case IP_PROTO_NUM_IATP:
-                return IP_PROTO_IATP;
-            case IP_PROTO_NUM_STP:
-                return IP_PROTO_STP;
-            case IP_PROTO_NUM_SRP:
-                return IP_PROTO_SRP;
-            case IP_PROTO_NUM_UTI:
-                return IP_PROTO_UTI;
-            case IP_PROTO_NUM_SMP:
-                return IP_PROTO_SMP;
-            case IP_PROTO_NUM_SM:
-                return IP_PROTO_SM;
-            case IP_PROTO_NUM_PTP:
-                return IP_PROTO_PTP;
-            case IP_PROTO_NUM_IS_IS_OVER_IPv4:
-                return IP_PROTO_IS_IS_OVER_IPv4;
-            case IP_PROTO_NUM_FIRE:
-                return IP_PROTO_FIRE;
-            case IP_PROTO_NUM_CRTP:
-                return IP_PROTO_CRTP;
-            case IP_PROTO_NUM_CRUDP:
-                return IP_PROTO_CRUDP;
-            case IP_PROTO_NUM_SSCOPMCE:
-                return IP_PROTO_SSCOPMCE;
-            case IP_PROTO_NUM_IPLT:
-                return IP_PROTO_IPLT;
-            case IP_PROTO_NUM_SPS:
-                return IP_PROTO_SPS;
-            case IP_PROTO_NUM_PIPE:
-                return IP_PROTO_PIPE;
-            case IP_PROTO_NUM_SCTP:
-                return IP_PROTO_SCTP;
-            case IP_PROTO_NUM_FC:
-                return IP_PROTO_FC;
-            case IP_PROTO_NUM_RSVP_E2E_IGNORE:
-                return IP_PROTO_RSVP_E2E_IGNORE;
-            case IP_PROTO_NUM_MOBILITY_HEADER:
-                return IP_PROTO_MOBILITY_HEADER;
-            case IP_PROTO_NUM_UDP_LITE:
-                return IP_PROTO_UDP_LITE;
-            case IP_PROTO_NUM_MPLS_IN_IP:
-                return IP_PROTO_MPLS_IN_IP;
-            case IP_PROTO_NUM_MANET:
-                return IP_PROTO_MANET;
-            case IP_PROTO_NUM_HIP:
-                return IP_PROTO_HIP;
-            case IP_PROTO_NUM_SHIM6:
-                return IP_PROTO_SHIM6;
+            case NUM_HOPOPT:
+                return HOPOPT;
+            case NUM_ICMP:
+                return ICMP;
+            case NUM_IGMP:
+                return IGMP;
+            case NUM_GGP:
+                return GGP;
+            case NUM_IPv4:
+                return IPv4;
+            case NUM_ST:
+                return ST;
+            case NUM_TCP:
+                return TCP;
+            case NUM_CBT:
+                return CBT;
+            case NUM_EGP:
+                return EGP;
+            case NUM_IGP:
+                return IGP;
+            case NUM_BBN_RCC_MON:
+                return BBN_RCC_MON;
+            case NUM_NVP_II:
+                return NVP_II;
+            case NUM_PUP:
+                return PUP;
+            case NUM_ARGUS:
+                return ARGUS;
+            case NUM_EMCON:
+                return EMCON;
+            case NUM_XNET:
+                return XNET;
+            case NUM_CHAOS:
+                return CHAOS;
+            case NUM_UDP:
+                return UDP;
+            case NUM_MUX:
+                return MUX;
+            case NUM_DCN_MEAS:
+                return DCN_MEAS;
+            case NUM_HMP:
+                return HMP;
+            case NUM_PRM:
+                return PRM;
+            case NUM_XNS_IDP:
+                return XNS_IDP;
+            case NUM_TRUNK_1:
+                return TRUNK_1;
+            case NUM_TRUNK_2:
+                return TRUNK_2;
+            case NUM_LEAF_1:
+                return LEAF_1;
+            case NUM_LEAF_2:
+                return LEAF_2;
+            case NUM_RDP:
+                return RDP;
+            case NUM_IRTP:
+                return IRTP;
+            case NUM_ISO_TP4:
+                return ISO_TP4;
+            case NUM_NETBLT:
+                return NETBLT;
+            case NUM_MFE_NSP:
+                return MFE_NSP;
+            case NUM_MERIT_INP:
+                return MERIT_INP;
+            case NUM_DCCP:
+                return DCCP;
+            case NUM_3PC:
+                return _3PC;
+            case NUM_IDPR:
+                return IDPR;
+            case NUM_XTP:
+                return XTP;
+            case NUM_DDP:
+                return DDP;
+            case NUM_IDPR_CMTP:
+                return IDPR_CMTP;
+            case NUM_TP_PP:
+                return TP_PP;
+            case NUM_IL:
+                return IL;
+            case NUM_IPv6:
+                return IPv6;
+            case NUM_SDRP:
+                return SDRP;
+            case NUM_IPv6_ROUTE:
+                return IPv6_ROUTE;
+            case NUM_IPv6_FRAG:
+                return IPv6_FRAG;
+            case NUM_IDRP:
+                return IDRP;
+            case NUM_RSVP:
+                return RSVP;
+            case NUM_GRE:
+                return GRE;
+            case NUM_MHRP:
+                return MHRP;
+            case NUM_BNA:
+                return BNA;
+            case NUM_ESP:
+                return ESP;
+            case NUM_AH:
+                return AH;
+            case NUM_I_NLSP:
+                return I_NLSP;
+            case NUM_SWIPE:
+                return SWIPE;
+            case NUM_NARP:
+                return NARP;
+            case NUM_MOBILE:
+                return MOBILE;
+            case NUM_TLSP:
+                return TLSP;
+            case NUM_SKIP:
+                return SKIP;
+            case NUM_IPv6_ICMP:
+                return IPv6_ICMP;
+            case NUM_IPv6_NO_NXT:
+                return IPv6_NO_NXT;
+            case NUM_IPv6_OPTS:
+                return IPv6_OPTS;
+            case NUM_HOST_INTERNAL:
+                return HOST_INTERNAL;
+            case NUM_CFTP:
+                return CFTP;
+            case NUM_LOCAL_NET:
+                return LOCAL_NET;
+            case NUM_SAT_EXPAK:
+                return SAT_EXPAK;
+            case NUM_KRYPTOLAN:
+                return KRYPTOLAN;
+            case NUM_RVD:
+                return RVD;
+            case NUM_IPPC:
+                return IPPC;
+            case NUM_DIST_FS:
+                return DIST_FS;
+            case NUM_SAT_MON:
+                return SAT_MON;
+            case NUM_VISA:
+                return VISA;
+            case NUM_IPCV:
+                return IPCV;
+            case NUM_CPNX:
+                return CPNX;
+            case NUM_CPHB:
+                return CPHB;
+            case NUM_WSN:
+                return WSN;
+            case NUM_PVP:
+                return PVP;
+            case NUM_BR_SAT_MON:
+                return BR_SAT_MON;
+            case NUM_SUN_ND:
+                return SUN_ND;
+            case NUM_WB_MON:
+                return WB_MON;
+            case NUM_WB_EXPAK:
+                return WB_EXPAK;
+            case NUM_ISO_IP:
+                return ISO_IP;
+            case NUM_VMTP:
+                return VMTP;
+            case NUM_SECURE_VMTP:
+                return SECURE_VMTP;
+            case NUM_VINES:
+                return VINES;
+            case NUM_TTP_IPTM:
+                return TTP_IPTM;
+            case NUM_NSFNET_IGP:
+                return NSFNET_IGP;
+            case NUM_DGP:
+                return DGP;
+            case NUM_TCF:
+                return TCF;
+            case NUM_EIGRP:
+                return EIGRP;
+            case NUM_OSPF:
+                return OSPF;
+            case NUM_Sprite_RPC:
+                return Sprite_RPC;
+            case NUM_LARP:
+                return LARP;
+            case NUM_MTP:
+                return MTP;
+            case NUM_AX_25:
+                return AX_25;
+            case NUM_IPIP:
+                return IPIP;
+            case NUM_MICP:
+                return MICP;
+            case NUM_SCC_SP:
+                return SCC_SP;
+            case NUM_ETHERIP:
+                return ETHERIP;
+            case NUM_ENCAP:
+                return ENCAP;
+            case NUM_PRIVATE_ENCRYPT:
+                return PRIVATE_ENCRYPT;
+            case NUM_GMTP:
+                return GMTP;
+            case NUM_IFMP:
+                return IFMP;
+            case NUM_PNNI:
+                return PNNI;
+            case NUM_PIM:
+                return PIM;
+            case NUM_ARIS:
+                return ARIS;
+            case NUM_SCPS:
+                return SCPS;
+            case NUM_QNX:
+                return QNX;
+            case NUM_A_N:
+                return A_N;
+            case NUM_IP_COMP:
+                return IP_COMP;
+            case NUM_SNP:
+                return SNP;
+            case NUM_COMPAQ_PEER:
+                return COMPAQ_PEER;
+            case NUM_IPX_IN_IP:
+                return IPX_IN_IP;
+            case NUM_VRRP:
+                return VRRP;
+            case NUM_PGM:
+                return PGM;
+            case NUM_ZERO_HOP:
+                return ZERO_HOP;
+            case NUM_L2TP:
+                return L2TP;
+            case NUM_DDX:
+                return DDX;
+            case NUM_IATP:
+                return IATP;
+            case NUM_STP:
+                return STP;
+            case NUM_SRP:
+                return SRP;
+            case NUM_UTI:
+                return UTI;
+            case NUM_SMP:
+                return SMP;
+            case NUM_SM:
+                return SM;
+            case NUM_PTP:
+                return PTP;
+            case NUM_IS_IS_OVER_IPv4:
+                return IS_IS_OVER_IPv4;
+            case NUM_FIRE:
+                return FIRE;
+            case NUM_CRTP:
+                return CRTP;
+            case NUM_CRUDP:
+                return CRUDP;
+            case NUM_SSCOPMCE:
+                return SSCOPMCE;
+            case NUM_IPLT:
+                return IPLT;
+            case NUM_SPS:
+                return SPS;
+            case NUM_PIPE:
+                return PIPE;
+            case NUM_SCTP:
+                return SCTP;
+            case NUM_FC:
+                return FC;
+            case NUM_RSVP_E2E_IGNORE:
+                return RSVP_E2E_IGNORE;
+            case NUM_MOBILITY_HEADER:
+                return MOBILITY_HEADER;
+            case NUM_UDP_LITE:
+                return UDP_LITE;
+            case NUM_MPLS_IN_IP:
+                return MPLS_IN_IP;
+            case NUM_MANET:
+                return MANET;
+            case NUM_HIP:
+                return HIP;
+            case NUM_SHIM6:
+                return SHIM6;
             default:
                 if (proto >= MAX_PROTO) {
                     throw new IllegalArgumentException("Illegal IP protocol number: "
diff --git a/java_gen/templates/custom/OFMatchV1Ver10.Builder_normalize_clear_wildcards_stanza.java b/java_gen/templates/custom/OFMatchV1Ver10.Builder_normalize_clear_wildcards_stanza.java
index 56b5662..9528ec0 100644
--- a/java_gen/templates/custom/OFMatchV1Ver10.Builder_normalize_clear_wildcards_stanza.java
+++ b/java_gen/templates/custom/OFMatchV1Ver10.Builder_normalize_clear_wildcards_stanza.java
@@ -3,7 +3,7 @@
             // ip_src, tcp_dst) to 0, AND ALSO SET THE WILDCARD to 0. It doesn't do that any more as of 1.1.2 and 1.4
             if(ethType.equals(EthType.IPv4)) {
                 // IP
-                if(ipProto.equals(IpProtocol.IP_PROTO_TCP) || ipProto.equals(IpProtocol.IP_PROTO_UDP) || ipProto.equals(IpProtocol.IP_PROTO_ICMP)) {
+                if(ipProto.equals(IpProtocol.TCP) || ipProto.equals(IpProtocol.UDP) || ipProto.equals(IpProtocol.ICMP)) {
                     // fully speced, wildcards and all values are fine
                     // normalize 32-63 ipv4 src 'mask' to a full bitmask
                     if((wildcards & OFPFW_NW_SRC_ALL) != 0)
diff --git a/java_gen/templates/custom/OFMatchV1Ver10.Builder_normalize_set_wildcards_stanza.java b/java_gen/templates/custom/OFMatchV1Ver10.Builder_normalize_set_wildcards_stanza.java
index 3545f55..09cb411 100644
--- a/java_gen/templates/custom/OFMatchV1Ver10.Builder_normalize_set_wildcards_stanza.java
+++ b/java_gen/templates/custom/OFMatchV1Ver10.Builder_normalize_set_wildcards_stanza.java
@@ -3,7 +3,7 @@
             // ip_src, tcp_dst) to 0, and sets the wildcard bit to 1.
             if(ethType.equals(EthType.IPv4)) {
                 // IP
-                if(ipProto.equals(IpProtocol.IP_PROTO_TCP) || ipProto.equals(IpProtocol.IP_PROTO_UDP) || ipProto.equals(IpProtocol.IP_PROTO_ICMP)) {
+                if(ipProto.equals(IpProtocol.TCP) || ipProto.equals(IpProtocol.UDP) || ipProto.equals(IpProtocol.ICMP)) {
                     // fully speced, wildcards and all values are fine
                     // normalize 32-63 ipv4 src 'mask' to a full bitmask
                     if((wildcards & OFPFW_NW_SRC_ALL) != 0)
diff --git a/loxi_front_end/match.py b/loxi_front_end/match.py
index c510477..f580354 100644
--- a/loxi_front_end/match.py
+++ b/loxi_front_end/match.py
@@ -145,24 +145,7 @@
         takes_mask_in_spec=False,
         order=211,
         ),
-    ipv4_src = dict(
-        name="ipv4_src",
-        m_type="of_ipv4_t",
-        v1_wc_shift=8,
-        print_type="PRIx32",
-        conditions="is_ipv4(match)",
-        takes_mask_in_spec=True,
-        order=300,
-        ),
-    ipv4_dst = dict(
-        name="ipv4_dst",
-        m_type="of_ipv4_t",
-        v1_wc_shift=14,
-        print_type="PRIx32",
-        conditions="is_ipv4(match)",
-        takes_mask_in_spec=True,
-        order=301,
-        ),
+
     ip_dscp = dict(
         name="ip_dscp",
         m_type="uint8_t",
@@ -191,6 +174,24 @@
         takes_mask_in_spec=False,
         order=320,
         ),
+    ipv4_src = dict(
+        name="ipv4_src",
+        m_type="of_ipv4_t",
+        v1_wc_shift=8,
+        print_type="PRIx32",
+        conditions="is_ipv4(match)",
+        takes_mask_in_spec=True,
+        order=330,
+        ),
+    ipv4_dst = dict(
+        name="ipv4_dst",
+        m_type="of_ipv4_t",
+        v1_wc_shift=14,
+        print_type="PRIx32",
+        conditions="is_ipv4(match)",
+        takes_mask_in_spec=True,
+        order=331,
+        ),
 
     tcp_dst = dict(
         name="tcp_dst",
@@ -270,7 +271,7 @@
         print_type="PRIx16",
         conditions="is_arp(match)",
         takes_mask_in_spec=False,
-        order=250,
+        order=450,
         ),
 
     arp_spa = dict(
@@ -279,7 +280,7 @@
         print_type="PRIx32",
         conditions="is_arp(match)",
         takes_mask_in_spec=True,
-        order=251,
+        order=451,
         ),
     arp_tpa = dict(
         name="arp_tpa",
@@ -287,7 +288,7 @@
         print_type="PRIx32",
         conditions="is_arp(match)",
         takes_mask_in_spec=True,
-        order=252,
+        order=452,
         ),
 
     arp_sha = dict(
@@ -296,7 +297,7 @@
         print_type="\"p\"",
         conditions="is_arp(match)",
         takes_mask_in_spec=False,
-        order=253,
+        order=453,
         ),
     arp_tha = dict(
         name="arp_tha",
@@ -304,7 +305,7 @@
         print_type="\"p\"",
         conditions="is_arp(match)",
         takes_mask_in_spec=False,
-        order=254,
+        order=454,
         ),
 
     ipv6_src = dict(
@@ -313,7 +314,7 @@
         print_type="\"p\"",
         conditions="is_ipv6(match)",
         takes_mask_in_spec=True,
-        order=350,
+        order=500,
         ),
     ipv6_dst = dict(
         name="ipv6_dst",
@@ -321,7 +322,7 @@
         print_type="\"p\"",
         conditions="is_ipv6(match)",
         takes_mask_in_spec=True,
-        order=351,
+        order=501,
         ),
 
     ipv6_flabel = dict(
@@ -330,7 +331,7 @@
         print_type="PRIx32",
         conditions="is_ipv6(match)",
         takes_mask_in_spec=False, # Comment in openflow.h says True
-        order=360,
+        order=502,
         ),
 
     icmpv6_type = dict(
@@ -339,7 +340,7 @@
         print_type="PRIx8",
         conditions="is_icmp_v6(match)",
         takes_mask_in_spec=False,
-        order=440,
+        order=510,
         ),
     icmpv6_code = dict(
         name="icmpv6_code",
@@ -347,7 +348,7 @@
         print_type="PRIx8",
         conditions="is_icmp_v6(match)",
         takes_mask_in_spec=False,
-        order=441,
+        order=511,
         ),
 
     ipv6_nd_target = dict(
@@ -356,7 +357,7 @@
         print_type="\"p\"",
         conditions="", # fixme
         takes_mask_in_spec=False,
-        order=442,
+        order=512,
         ),
 
     ipv6_nd_sll = dict(
@@ -365,7 +366,7 @@
         print_type="\"p\"",
         conditions="", # fixme
         takes_mask_in_spec=False,
-        order=443,
+        order=520,
         ),
     ipv6_nd_tll = dict(
         name="ipv6_nd_tll",
@@ -373,7 +374,7 @@
         print_type="\"p\"",
         conditions="", # fixme
         takes_mask_in_spec=False,
-        order=444,
+        order=521,
         ),
 
     mpls_label = dict(
@@ -383,7 +384,7 @@
         print_type="PRIx32",
         conditions="",
         takes_mask_in_spec=False,
-        order=500,
+        order=600,
         ),
     mpls_tc = dict(
         name="mpls_tc",
@@ -392,7 +393,7 @@
         print_type="PRIx8",
         conditions="",
         takes_mask_in_spec=False,
-        order=501,
+        order=601,
         ),
 
     bsn_in_ports_128 = dict(
diff --git a/openflow_input/bsn_flow_idle b/openflow_input/bsn_flow_idle
new file mode 100644
index 0000000..40a95d8
--- /dev/null
+++ b/openflow_input/bsn_flow_idle
@@ -0,0 +1,99 @@
+// 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
+
+/*
+ * Notification of idle flows
+ *
+ * This extension allows the controller to request to be notified periodically
+ * about idle flows. It is very similar to the flow_removed message in standard
+ * OpenFlow, but does not delete the idle flows.
+ *
+ * If the extension is enabled using of_bsn_flow_idle_enable_set_request and
+ * the OFPFF_BSN_SEND_IDLE bit is set in the flow-mod, then the idle_timeout
+ * field in the flow-mod is not used for standard flow expiration. Instead,
+ * the switch will send an of_bsn_flow_idle message every idle_timeout seconds
+ * if the flow was not used during that period.
+ */
+
+struct of_bsn_flow_idle_enable_set_request : of_bsn_header {
+    uint8_t version;
+    uint8_t type == 4;
+    uint16_t length;
+    uint32_t xid;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 36;
+    uint32_t enable;        // 0 to disable the extension, 1 to enable it
+};
+
+struct of_bsn_flow_idle_enable_set_reply : of_bsn_header {
+    uint8_t version;
+    uint8_t type == 4;
+    uint16_t length;
+    uint32_t xid;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 37;
+    uint32_t enable;        // Resulting state, 0 disabled, 1 enabled
+    uint32_t status;        // Result code: 0 success
+};
+
+struct of_bsn_flow_idle_enable_get_request : of_bsn_header {
+    uint8_t version;
+    uint8_t type == 4;
+    uint16_t length;
+    uint32_t xid;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 38;
+};
+
+struct of_bsn_flow_idle_enable_get_reply : of_bsn_header {
+    uint8_t version;
+    uint8_t type == 4;
+    uint16_t length;
+    uint32_t xid;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 39;
+    uint32_t enabled;       // 0 if feature is disabled; 1 if feature enabled
+};
+
+struct of_bsn_flow_idle : of_bsn_header {
+    uint8_t version;
+    uint8_t type == 4;
+    uint16_t length;
+    uint32_t xid;
+    uint32_t experimenter == 0x5c16c7;
+    uint32_t subtype == 40;
+    uint64_t cookie;
+    uint16_t priority;
+    uint8_t table_id;
+    pad(5); // align to 8 bytes
+    of_match_t match;
+};
diff --git a/openflow_input/standard-1.1 b/openflow_input/standard-1.1
index 2352fa9..9937c6d 100644
--- a/openflow_input/standard-1.1
+++ b/openflow_input/standard-1.1
@@ -1203,7 +1203,7 @@
 
 struct of_group_desc_stats_entry {
     uint16_t length;
-    uint8_t type;
+    uint8_t group_type;
     pad(1);
     uint32_t group_id;
     list(of_bucket_t) buckets;
diff --git a/openflow_input/standard-1.2 b/openflow_input/standard-1.2
index 2cb0ab3..182794e 100644
--- a/openflow_input/standard-1.2
+++ b/openflow_input/standard-1.2
@@ -1172,7 +1172,7 @@
 
 struct of_group_desc_stats_entry {
     uint16_t length;
-    uint8_t type;
+    uint8_t group_type;
     pad(1);
     uint32_t group_id;
     list(of_bucket_t) buckets;
diff --git a/openflow_input/standard-1.3 b/openflow_input/standard-1.3
index fdc1a1e..9d53f11 100644
--- a/openflow_input/standard-1.3
+++ b/openflow_input/standard-1.3
@@ -251,6 +251,10 @@
     OFPFF_RESET_COUNTS = 0x4,
     OFPFF_NO_PKT_COUNTS = 0x8,
     OFPFF_NO_BYT_COUNTS = 0x10,
+
+    /* Non-standard, enabled by an experimenter message */
+    /* See the bsn_flow_idle input file */
+    OFPFF_BSN_SEND_IDLE = 0x80,
 };
 
 enum ofp_group(wire_type=uint32_t, complete=False) {
@@ -1383,7 +1387,7 @@
 
 struct of_group_desc_stats_entry {
     uint16_t length;
-    uint8_t type;
+    uint8_t group_type;
     pad(1);
     uint32_t group_id;
     list(of_bucket_t) buckets;
diff --git a/test_data/of13/bsn_flow_idle.data b/test_data/of13/bsn_flow_idle.data
new file mode 100644
index 0000000..61b656f
--- /dev/null
+++ b/test_data/of13/bsn_flow_idle.data
@@ -0,0 +1,54 @@
+-- binary
+04 04 # version, type
+00 38 # length
+12 34 56 78 # xid
+00 5c 16 c7 # experimenter
+00 00 00 28 # subtype
+fe dc ba 98 76 54 32 10 # cookie
+42 68 # priority
+14 # table_id
+00 # pad
+00 00 00 00 # pad
+00 01 # match.type
+00 16 # match.length
+80 00 01 08 # match.oxm_list[0].type_len - IN_PORT
+00 00 00 04 # match.oxm_list[0].value
+00 00 00 05 # match.oxm_list[0].mask
+80 00 2A 02 # match.oxm_list[1].type_len - ARP_OP
+00 01 # match.oxm_list[1].value
+00 00 # match.pad
+-- python
+ofp.message.bsn_flow_idle(
+    xid=0x12345678,
+    cookie=0xFEDCBA9876543210,
+    priority=17000,
+    table_id=20,
+    match=ofp.match([
+        ofp.oxm.in_port_masked(value=4, value_mask=5),
+        ofp.oxm.arp_op(value=1),
+    ]))
+-- c
+obj = of_bsn_flow_idle_new(OF_VERSION_1_3);
+of_bsn_flow_idle_xid_set(obj, 0x12345678);
+of_bsn_flow_idle_cookie_set(obj, 0xFEDCBA9876543210);
+of_bsn_flow_idle_priority_set(obj, 17000);
+of_bsn_flow_idle_table_id_set(obj, 20);
+{
+    of_match_t match = { OF_VERSION_1_3 };
+    match.fields.in_port = 4;
+    match.masks.in_port = 5;
+    match.fields.arp_op = 1;
+    OF_MATCH_MASK_ARP_OP_EXACT_SET(&match);
+    of_bsn_flow_idle_match_set(obj, &match);
+}
+-- java
+builder.setXid(0x12345678)
+    .setCookie(U64.parseHex("FEDCBA9876543210"))
+    .setPriority(17000)
+    .setTableId(TableId.of(20))
+    .setMatch(
+        factory.buildMatch()
+            .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
+            .setExact(MatchField.ARP_OP, ArpOpcode.of(1))
+                .build()
+    );
diff --git a/test_data/of13/flow_add.data b/test_data/of13/flow_add.data
index 854c908..0766375 100644
--- a/test_data/of13/flow_add.data
+++ b/test_data/of13/flow_add.data
@@ -88,7 +88,7 @@
         factory.buildMatch()
             .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
             .setExact(MatchField.ETH_TYPE, EthType.IPv6)
-            .setExact(MatchField.IP_PROTO, IpProtocol.IP_PROTO_TCP)
+            .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
             .setMasked(MatchField.IPV6_SRC, 
                        IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
                        IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
diff --git a/test_data/of13/flow_delete.data b/test_data/of13/flow_delete.data
index 497103f..6148d21 100644
--- a/test_data/of13/flow_delete.data
+++ b/test_data/of13/flow_delete.data
@@ -88,7 +88,7 @@
         factory.buildMatch()
             .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
             .setExact(MatchField.ETH_TYPE, EthType.IPv6)
-            .setExact(MatchField.IP_PROTO, IpProtocol.IP_PROTO_TCP)
+            .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
             .setMasked(MatchField.IPV6_SRC, 
                        IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
                        IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
diff --git a/test_data/of13/flow_delete_strict.data b/test_data/of13/flow_delete_strict.data
index 83d212c..7e4d233 100644
--- a/test_data/of13/flow_delete_strict.data
+++ b/test_data/of13/flow_delete_strict.data
@@ -88,7 +88,7 @@
         factory.buildMatch()
             .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
             .setExact(MatchField.ETH_TYPE, EthType.IPv6)
-            .setExact(MatchField.IP_PROTO, IpProtocol.IP_PROTO_TCP)
+            .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
             .setMasked(MatchField.IPV6_SRC, 
                        IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
                        IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
diff --git a/test_data/of13/flow_modify.data b/test_data/of13/flow_modify.data
index 9b8834d..83234f5 100644
--- a/test_data/of13/flow_modify.data
+++ b/test_data/of13/flow_modify.data
@@ -88,7 +88,7 @@
         factory.buildMatch()
             .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
             .setExact(MatchField.ETH_TYPE, EthType.IPv6)
-            .setExact(MatchField.IP_PROTO, IpProtocol.IP_PROTO_TCP)
+            .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
             .setMasked(MatchField.IPV6_SRC, 
                        IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
                        IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
diff --git a/test_data/of13/flow_modify_strict.data b/test_data/of13/flow_modify_strict.data
index 250adb9..1d6f4c3 100644
--- a/test_data/of13/flow_modify_strict.data
+++ b/test_data/of13/flow_modify_strict.data
@@ -88,7 +88,7 @@
         factory.buildMatch()
             .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
             .setExact(MatchField.ETH_TYPE, EthType.IPv6)
-            .setExact(MatchField.IP_PROTO, IpProtocol.IP_PROTO_TCP)
+            .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
             .setMasked(MatchField.IPV6_SRC, 
                        IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
                        IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
diff --git a/test_data/of13/group_desc_stats_reply.data b/test_data/of13/group_desc_stats_reply.data
index 34c0d50..5e95a67 100644
--- a/test_data/of13/group_desc_stats_reply.data
+++ b/test_data/of13/group_desc_stats_reply.data
@@ -49,7 +49,7 @@
     flags=0,
     entries=[
         ofp.group_desc_stats_entry(
-            type=ofp.OFPGT_FF,
+            group_type=ofp.OFPGT_FF,
             group_id=1,
             buckets=[
                 ofp.bucket(
@@ -66,4 +66,4 @@
                     actions=[
                         ofp.action.output(port=5, max_len=0),
                         ofp.action.output(port=6, max_len=0)])]),
-        ofp.group_desc_stats_entry(type=ofp.OFPGT_FF, group_id=2, buckets=[])])
+        ofp.group_desc_stats_entry(group_type=ofp.OFPGT_FF, group_id=2, buckets=[])])
diff --git a/test_data/of13/packet_in.data b/test_data/of13/packet_in.data
index ca7006f..525d144 100644
--- a/test_data/of13/packet_in.data
+++ b/test_data/of13/packet_in.data
@@ -41,7 +41,7 @@
    .setMatch(
         factory.buildMatchV3()
             .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
-            .setExact(MatchField.ARP_OP, ArpOpcode.ARP_OPCODE_REQUEST)
+            .setExact(MatchField.ARP_OP, ArpOpcode.REQUEST)
         	.build()
     )
     .setData(new byte[] { 97, 98, 99 } );