Merge into master from pull request #346:
Add oxm for L2 cache hit (https://github.com/floodlight/loxigen/pull/346)
diff --git a/java_gen/java_type.py b/java_gen/java_type.py
index 57034a2..79a1db3 100644
--- a/java_gen/java_type.py
+++ b/java_gen/java_type.py
@@ -624,6 +624,10 @@
         'of_oxm_mpls_tc_masked' : { 'value' : u8obj, 'value_mask' : u8obj },
         'of_oxm_mpls_bos' : { 'value' : boolean_value },
         'of_oxm_mpls_bos_masked' : { 'value' : boolean_value, 'value_mask' : boolean_value },
+        'of_oxm_ipv6_exthdr' : { 'value' : u16obj },
+        'of_oxm_ipv6_exthdr_masked' : { 'value' : u16obj, 'value_mask' : u16obj },
+        'of_oxm_pbb_uca' : { 'value' : boolean_value },
+        'of_oxm_pbb_uca_masked' : { 'value' : boolean_value, 'value_mask' : boolean_value },
 
         'of_oxm_bsn_in_ports_128' : { 'value': port_bitmap },
         'of_oxm_bsn_in_ports_128_masked' : { 'value': port_bitmap, 'value_mask': port_bitmap },
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 ae925f3..39c15fd 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
@@ -185,6 +185,12 @@
     public final static MatchField<U64> TUNNEL_ID = 
             new MatchField<U64>("tunnel_id", MatchFields.TUNNEL_ID);
 
+    public final static MatchField<U16> IPV6_EXTHDR =
+            new MatchField<U16>("ipv6_exthdr", MatchFields.IPV6_EXTHDR);
+
+    public final static MatchField<OFBooleanValue> PBB_UCA =
+            new MatchField<OFBooleanValue>("pbb_uca", MatchFields.PBB_UCA);
+
     public final static MatchField<OFBitMask128> BSN_IN_PORTS_128 =
             new MatchField<OFBitMask128>("bsn_in_ports_128", MatchFields.BSN_IN_PORTS_128);
 
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java
index 80f0f24..aaf3576 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/match/MatchFields.java
@@ -40,6 +40,8 @@
     MPLS_TC,
     MPLS_BOS,
     TUNNEL_ID,
+    IPV6_EXTHDR,
+    PBB_UCA,
     BSN_IN_PORTS_128,
     BSN_LAG_ID,
     BSN_VRF,
diff --git a/openflow_input/bsn-1.3 b/openflow_input/bsn-1.3
index f9340b4..5ad480c 100644
--- a/openflow_input/bsn-1.3
+++ b/openflow_input/bsn-1.3
@@ -26,6 +26,7 @@
 // under the EPL.
 
 #version 4
+#version 5
 
 // BSN extension instruction
 struct of_instruction_bsn : of_instruction_experimenter {
diff --git a/openflow_input/bsn_acl b/openflow_input/bsn_acl
index 4035904..bcca842 100644
--- a/openflow_input/bsn_acl
+++ b/openflow_input/bsn_acl
@@ -30,6 +30,7 @@
 // Copyright (c) 2011, 2012 Open Networking Foundation
 
 #version 4
+#version 5
 
 // Instructions to express control flow in ACL tables
 
diff --git a/openflow_input/bsn_arp_idle b/openflow_input/bsn_arp_idle
index 26cea92..16a1782 100644
--- a/openflow_input/bsn_arp_idle
+++ b/openflow_input/bsn_arp_idle
@@ -35,6 +35,7 @@
 // not remove the table entry on its own.
 
 #version 4
+#version 5
 
 struct of_bsn_arp_idle : of_bsn_header {
     uint8_t version;
diff --git a/openflow_input/bsn_arp_offload b/openflow_input/bsn_arp_offload
index 5a229b1..f13f6ac 100644
--- a/openflow_input/bsn_arp_offload
+++ b/openflow_input/bsn_arp_offload
@@ -30,6 +30,7 @@
 // Copyright (c) 2011, 2012 Open Networking Foundation
 
 #version 4
+#version 5
 
 struct of_instruction_bsn_arp_offload : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_aux_cxns b/openflow_input/bsn_aux_cxns
index 247f81b..8ceaa72 100644
--- a/openflow_input/bsn_aux_cxns
+++ b/openflow_input/bsn_aux_cxns
@@ -28,6 +28,8 @@
 // Request that the switch spawn and configure auxiliary OF connections.
 //
 #version 4
+#version 5
+
 // Set the number of desired aux connections num_aux=(0-16) accompanying this main connection
 // This message is only allowed on the main connection. 
 struct of_bsn_set_aux_cxns_request : of_bsn_header {
diff --git a/openflow_input/bsn_controller_connections b/openflow_input/bsn_controller_connections
index eae315e..845d3b8 100644
--- a/openflow_input/bsn_controller_connections
+++ b/openflow_input/bsn_controller_connections
@@ -37,6 +37,7 @@
 // The URIs are of the form tcp://1.2.3.4:6553
 
 #version 4
+#version 5
 
 enum ofp_bsn_controller_connection_state(wire_type=uint8_t) {
     OFP_BSN_CONTROLLER_CONNECTION_STATE_DISCONNECTED = 0,
diff --git a/openflow_input/bsn_debug_counter b/openflow_input/bsn_debug_counter
index 75cafcc..6c28b87 100644
--- a/openflow_input/bsn_debug_counter
+++ b/openflow_input/bsn_debug_counter
@@ -29,6 +29,7 @@
 // governing permissions and limitations under the EPL.
 
 #version 4
+#version 5
 
 // Switches have many non-dataplane counters that are mainly useful for
 // debugging. An example is the number of packet-ins dropped due to
diff --git a/openflow_input/bsn_dhcp_offload b/openflow_input/bsn_dhcp_offload
index b21b036..5352754 100644
--- a/openflow_input/bsn_dhcp_offload
+++ b/openflow_input/bsn_dhcp_offload
@@ -30,6 +30,7 @@
 // Copyright (c) 2011, 2012 Open Networking Foundation
 
 #version 4
+#version 5
 
 struct of_instruction_bsn_dhcp_offload : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_disable_src_mac_check b/openflow_input/bsn_disable_src_mac_check
index f75c237..6b095ca 100644
--- a/openflow_input/bsn_disable_src_mac_check
+++ b/openflow_input/bsn_disable_src_mac_check
@@ -30,6 +30,7 @@
 // Copyright (c) 2011, 2012 Open Networking Foundation
 
 #version 4
+#version 5
 
 struct of_instruction_bsn_disable_src_mac_check : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_disable_vlan_counters b/openflow_input/bsn_disable_vlan_counters
index 068db64..e586917 100644
--- a/openflow_input/bsn_disable_vlan_counters
+++ b/openflow_input/bsn_disable_vlan_counters
@@ -30,6 +30,7 @@
 // Copyright (c) 2011, 2012 Open Networking Foundation
 
 #version 4
+#version 5
 
 struct of_instruction_bsn_disable_vlan_counters : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_egr_port_group_id b/openflow_input/bsn_egr_port_group_id
index a237b49..3ba5462 100644
--- a/openflow_input/bsn_egr_port_group_id
+++ b/openflow_input/bsn_egr_port_group_id
@@ -30,6 +30,7 @@
 
 #version 3
 #version 4
+#version 5
 
 /*
  * Egress port group ID for SwitchLight
diff --git a/openflow_input/bsn_flow_checksum b/openflow_input/bsn_flow_checksum
index bfa5f3c..35b658f 100644
--- a/openflow_input/bsn_flow_checksum
+++ b/openflow_input/bsn_flow_checksum
@@ -29,6 +29,7 @@
 // governing permissions and limitations under the EPL.
 
 #version 4
+#version 5
 
 // Retrieves the checksum for every bucket in a table. The entries are ordered
 // by bucket index.
diff --git a/openflow_input/bsn_flow_idle b/openflow_input/bsn_flow_idle
index 40a95d8..e0139e2 100644
--- a/openflow_input/bsn_flow_idle
+++ b/openflow_input/bsn_flow_idle
@@ -29,6 +29,7 @@
 // governing permissions and limitations under the EPL.
 
 #version 4
+#version 5
 
 /*
  * Notification of idle flows
diff --git a/openflow_input/bsn_gentable b/openflow_input/bsn_gentable
index 6ccaac5..556ae0b 100644
--- a/openflow_input/bsn_gentable
+++ b/openflow_input/bsn_gentable
@@ -29,6 +29,7 @@
 // governing permissions and limitations under the EPL.
 
 #version 4
+#version 5
 
 // We have a number of switch agents that need to be configured by the
 // controller and report stats. Some of them will have large tables (1000+
diff --git a/openflow_input/bsn_image b/openflow_input/bsn_image
index 05a1a97..fafe8d8 100644
--- a/openflow_input/bsn_image
+++ b/openflow_input/bsn_image
@@ -29,6 +29,7 @@
 // governing permissions and limitations under the EPL.
 
 #version 4
+#version 5
 
 struct of_bsn_image_desc_stats_request : of_bsn_stats_request {
     uint8_t version;
diff --git a/openflow_input/bsn_in_ports b/openflow_input/bsn_in_ports
index b23df63..819bdde 100644
--- a/openflow_input/bsn_in_ports
+++ b/openflow_input/bsn_in_ports
@@ -30,6 +30,7 @@
 
 #version 3
 #version 4
+#version 5
 
 /*
  * Bitmap of input ports
diff --git a/openflow_input/bsn_l3_interface_class_id b/openflow_input/bsn_l3_interface_class_id
index 80d1e37..f16d333 100644
--- a/openflow_input/bsn_l3_interface_class_id
+++ b/openflow_input/bsn_l3_interface_class_id
@@ -30,6 +30,7 @@
 
 #version 3
 #version 4
+#version 5
 
 /*
  * L3 interface class ID for SwitchLight
diff --git a/openflow_input/bsn_l3_src_class_id b/openflow_input/bsn_l3_src_class_id
index 58f60c6..7e2569e 100644
--- a/openflow_input/bsn_l3_src_class_id
+++ b/openflow_input/bsn_l3_src_class_id
@@ -30,6 +30,7 @@
 
 #version 3
 #version 4
+#version 5
 
 /*
  * L3 source class ID for SwitchLight
diff --git a/openflow_input/bsn_lacp b/openflow_input/bsn_lacp
index 2a63b17..ed36b0d 100644
--- a/openflow_input/bsn_lacp
+++ b/openflow_input/bsn_lacp
@@ -29,6 +29,7 @@
 // governing permissions and limitations under the EPL.
 
 #version 4
+#version 5
 
 // LACP Convergence Status set in of_bsn_lacp_convergence_notif message
 enum of_bsn_lacp_convergence_status(wire_type=uint8_t, complete=False) {
diff --git a/openflow_input/bsn_lag_id b/openflow_input/bsn_lag_id
index 63645a3..d428933 100644
--- a/openflow_input/bsn_lag_id
+++ b/openflow_input/bsn_lag_id
@@ -30,6 +30,7 @@
 
 #version 3
 #version 4
+#version 5
 
 /*
  * Ingress LAG ID for SwitchLight
diff --git a/openflow_input/bsn_log b/openflow_input/bsn_log
index b2a9758..e636d6e 100644
--- a/openflow_input/bsn_log
+++ b/openflow_input/bsn_log
@@ -29,6 +29,7 @@
 // the receiver's configured loglevel is lower than the message's loglevel.
 
 #version 4
+#version 5
 
 enum ofp_bsn_loglevel(wire_type=uint8_t) {
     OFP_BSN_LOGLEVEL_MSG = 0,
diff --git a/openflow_input/bsn_packet_of_death b/openflow_input/bsn_packet_of_death
index e8679f0..c1ac28d 100644
--- a/openflow_input/bsn_packet_of_death
+++ b/openflow_input/bsn_packet_of_death
@@ -30,6 +30,7 @@
 // Copyright (c) 2011, 2012 Open Networking Foundation
 
 #version 4
+#version 5
 
 struct of_instruction_bsn_packet_of_death : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_pktin_flag b/openflow_input/bsn_pktin_flag
index fd94a49..71a4be1 100644
--- a/openflow_input/bsn_pktin_flag
+++ b/openflow_input/bsn_pktin_flag
@@ -26,6 +26,7 @@
 // under the EPL.
 
 #version 4
+#version 5
 
 // In a realistic switch pipeline there are multiple reasons a given packet
 // should be sent to the controller. The packet-in reason field is only 8 bits,
diff --git a/openflow_input/bsn_port_counter b/openflow_input/bsn_port_counter
index 83cd1c8..6cf5e10 100644
--- a/openflow_input/bsn_port_counter
+++ b/openflow_input/bsn_port_counter
@@ -29,6 +29,7 @@
 // governing permissions and limitations under the EPL.
 
 #version 4
+#version 5
 
 enum ofp_bsn_port_counter(wire_type=uint8_t, complete=False, stable=True) {
   OFP_BSN_PORT_COUNTER_RX_BYTES = 0,
diff --git a/openflow_input/bsn_prioritize_pdus b/openflow_input/bsn_prioritize_pdus
index fbec0a0..7a179a9 100644
--- a/openflow_input/bsn_prioritize_pdus
+++ b/openflow_input/bsn_prioritize_pdus
@@ -30,6 +30,7 @@
 // Copyright (c) 2011, 2012 Open Networking Foundation
 
 #version 4
+#version 5
 
 struct of_instruction_bsn_prioritize_pdus : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_require_vlan_xlate b/openflow_input/bsn_require_vlan_xlate
index 24cf137..32fc55c 100644
--- a/openflow_input/bsn_require_vlan_xlate
+++ b/openflow_input/bsn_require_vlan_xlate
@@ -30,6 +30,7 @@
 // Copyright (c) 2011, 2012 Open Networking Foundation
 
 #version 4
+#version 5
 
 struct of_instruction_bsn_require_vlan_xlate : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_span_destination b/openflow_input/bsn_span_destination
index 7fd900d..fd4f677 100644
--- a/openflow_input/bsn_span_destination
+++ b/openflow_input/bsn_span_destination
@@ -30,6 +30,7 @@
 // Copyright (c) 2011, 2012 Open Networking Foundation
 
 #version 4
+#version 5
 
 struct of_instruction_bsn_span_destination : of_instruction_bsn {
     uint16_t type == 65535;
diff --git a/openflow_input/bsn_switch_pipeline b/openflow_input/bsn_switch_pipeline
index ff2213f..d42532b 100644
--- a/openflow_input/bsn_switch_pipeline
+++ b/openflow_input/bsn_switch_pipeline
@@ -29,6 +29,7 @@
 // governing permissions and limitations under the EPL.
 
 #version 4
+#version 5
 
 struct of_bsn_get_switch_pipeline_request : of_bsn_header {
     uint8_t version;
diff --git a/openflow_input/bsn_tcp_flags b/openflow_input/bsn_tcp_flags
index e8ef2e9..1a84a90 100644
--- a/openflow_input/bsn_tcp_flags
+++ b/openflow_input/bsn_tcp_flags
@@ -30,6 +30,7 @@
 
 #version 3
 #version 4
+#version 5
 
 /*
  * TCP flags
diff --git a/openflow_input/bsn_time b/openflow_input/bsn_time
index 0a955be..d69e538 100644
--- a/openflow_input/bsn_time
+++ b/openflow_input/bsn_time
@@ -33,6 +33,7 @@
 // The timestamp must be monotonic (not affected by system time updates).
 
 #version 4
+#version 5
 
 struct of_bsn_time_request : of_bsn_header {
     uint8_t version;
diff --git a/openflow_input/bsn_tlv b/openflow_input/bsn_tlv
index 49598ce..4e12a2b 100644
--- a/openflow_input/bsn_tlv
+++ b/openflow_input/bsn_tlv
@@ -29,6 +29,7 @@
 // governing permissions and limitations under the EPL.
 
 #version 4
+#version 5
 
 struct of_bsn_tlv_port : of_bsn_tlv {
     uint16_t type == 0;
@@ -375,3 +376,15 @@
     uint16_t length;
     of_octets_t value;
 };
+
+struct of_bsn_tlv_mac_mask : of_bsn_tlv {
+    uint16_t type == 56;
+    uint16_t length;
+    of_mac_addr_t value;
+};
+
+struct of_bsn_tlv_priority : of_bsn_tlv {
+    uint16_t type == 57;
+    uint16_t length;
+    uint32_t value;
+};
diff --git a/openflow_input/bsn_udf b/openflow_input/bsn_udf
index f7ce9a6..12ad1cb 100644
--- a/openflow_input/bsn_udf
+++ b/openflow_input/bsn_udf
@@ -30,6 +30,7 @@
 
 #version 3
 #version 4
+#version 5
 
 /*
  * User Defined Fields
diff --git a/openflow_input/bsn_vlan_counter b/openflow_input/bsn_vlan_counter
index c5814f4..d39d35f 100644
--- a/openflow_input/bsn_vlan_counter
+++ b/openflow_input/bsn_vlan_counter
@@ -29,6 +29,7 @@
 // governing permissions and limitations under the EPL.
 
 #version 4
+#version 5
 
 enum ofp_bsn_vlan_counter_constants {
     OFP_BSN_VLAN_ALL = 0xffff,
diff --git a/openflow_input/bsn_vlan_xlate_port_group_id b/openflow_input/bsn_vlan_xlate_port_group_id
index c8e5a25..986dc0e 100644
--- a/openflow_input/bsn_vlan_xlate_port_group_id
+++ b/openflow_input/bsn_vlan_xlate_port_group_id
@@ -30,6 +30,7 @@
 
 #version 3
 #version 4
+#version 5
 
 /*
  * VLAN xlate port group ID for SwitchLight
diff --git a/openflow_input/bsn_vrf b/openflow_input/bsn_vrf
index 26959bd..c61c313 100644
--- a/openflow_input/bsn_vrf
+++ b/openflow_input/bsn_vrf
@@ -30,6 +30,7 @@
 
 #version 3
 #version 4
+#version 5
 
 /*
  * Virtual Routing/Forwarding ID for SwitchLight
diff --git a/openflow_input/bsn_vrf_counter b/openflow_input/bsn_vrf_counter
index b638ff7..012d728 100644
--- a/openflow_input/bsn_vrf_counter
+++ b/openflow_input/bsn_vrf_counter
@@ -29,6 +29,7 @@
 // governing permissions and limitations under the EPL.
 
 #version 4
+#version 5
 
 enum ofp_bsn_vrf_counter_constants(wire_type=uint32_t) {
     OFP_BSN_VRF_ALL = 0xffffffff,
diff --git a/openflow_input/oxm-1.3 b/openflow_input/oxm-1.3
index ac57589..4bb55a1 100644
--- a/openflow_input/oxm-1.3
+++ b/openflow_input/oxm-1.3
@@ -52,3 +52,16 @@
     uint8_t value;
     uint8_t value_mask;
 };
+
+/* Not supporting pbb_isid at the moment, requires a 3-byte field */
+
+struct of_oxm_ipv6_exthdr : of_oxm {
+    uint32_t type_len == 0x80004e02;
+    uint16_t value;
+};
+
+struct of_oxm_ipv6_exthdr_masked : of_oxm {
+    uint32_t type_len == 0x80004f04;
+    uint16_t value;
+    uint16_t value_mask;
+};
diff --git a/openflow_input/oxm-1.4 b/openflow_input/oxm-1.4
new file mode 100644
index 0000000..0fd96ec
--- /dev/null
+++ b/openflow_input/oxm-1.4
@@ -0,0 +1,42 @@
+// Copyright 2014, 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 5
+
+struct of_oxm_pbb_uca : of_oxm {
+    uint32_t type_len == 0x80005201;
+    uint8_t value;
+};
+
+struct of_oxm_pbb_uca_masked : of_oxm {
+    uint32_t type_len == 0x80005302;
+    uint8_t value;
+    uint8_t value_mask;
+};
diff --git a/openflow_input/standard-1.4 b/openflow_input/standard-1.4
index 23e96ed..54fce4a 100644
--- a/openflow_input/standard-1.4
+++ b/openflow_input/standard-1.4
@@ -1576,6 +1576,46 @@
     of_octets_t data;
 };
 
+struct of_bad_property_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 14;
+    enum ofp_bad_property_code code;
+    of_octets_t data;
+};
+
+struct of_async_config_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 15;
+    enum ofp_async_config_failed_code code;
+    of_octets_t data;
+};
+
+struct of_flow_monitor_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 16;
+    enum ofp_flow_monitor_failed_code code;
+    of_octets_t data;
+};
+
+struct of_bundle_failed_error_msg : of_error_msg {
+    uint8_t version;
+    uint8_t type == 1;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t err_type == 17;
+    enum ofp_bundle_failed_code code;
+    of_octets_t data;
+};
+
 struct of_experimenter_error_msg : of_error_msg {
     uint8_t version;
     uint8_t type == 1;