Merge into master from pull request #394:
pyloxi: Connection class (https://github.com/floodlight/loxigen/pull/394)
diff --git a/java_gen/java_type.py b/java_gen/java_type.py
index 64794cf..ac6a3e0 100644
--- a/java_gen/java_type.py
+++ b/java_gen/java_type.py
@@ -705,6 +705,15 @@
'of_oxm_bsn_l2_cache_hit' : { 'value' : boolean_value },
'of_oxm_bsn_l2_cache_hit_masked' : { 'value' : boolean_value, 'value_mask' : boolean_value },
+ 'of_oxm_bsn_vxlan_network_id' : { 'value' : u32obj },
+ 'of_oxm_bsn_vxlan_network_id_masked' : { 'value' : u32obj, 'value_mask' : u32obj },
+
+ 'of_oxm_bsn_inner_eth_dst' : { 'value' : mac_addr },
+ 'of_oxm_bsn_inner_eth_dst_masked' : { 'value' : mac_addr, 'value_mask' : mac_addr },
+
+ 'of_oxm_bsn_inner_eth_src' : { 'value' : mac_addr },
+ 'of_oxm_bsn_inner_eth_src_masked' : { 'value' : mac_addr, 'value_mask' : mac_addr },
+
'of_table_stats_entry': { 'wildcards': table_stats_wildcards },
'of_match_v1': { 'vlan_vid' : vlan_vid_match, 'vlan_pcp': vlan_pcp,
'eth_type': eth_type, 'ip_dscp': ip_dscp, 'ip_proto': ip_proto,
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 faae773..e36cb59 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
@@ -263,6 +263,15 @@
public final static MatchField<OFBooleanValue> BSN_L2_CACHE_HIT =
new MatchField<OFBooleanValue>("bsn_l2_cache_hit", MatchFields.BSN_L2_CACHE_HIT);
+ public final static MatchField<U32> BSN_VXLAN_NETWORK_ID =
+ new MatchField<U32>("bsn_vxlan_network_id", MatchFields.BSN_VXLAN_NETWORK_ID);
+
+ public final static MatchField<MacAddress> BSN_INNER_ETH_DST =
+ new MatchField<MacAddress>("bsn_inner_eth_dst", MatchFields.BSN_INNER_ETH_DST);
+
+ public final static MatchField<MacAddress> BSN_INNER_ETH_SRC =
+ new MatchField<MacAddress>("bsn_inner_eth_src", MatchFields.BSN_INNER_ETH_SRC);
+
public String getName() {
return name;
}
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 2cefa53..76671bd 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
@@ -65,4 +65,7 @@
BSN_VLAN_XLATE_PORT_GROUP_ID,
BSN_L2_CACHE_HIT,
BSN_INGRESS_PORT_GROUP_ID,
+ BSN_VXLAN_NETWORK_ID,
+ BSN_INNER_ETH_DST,
+ BSN_INNER_ETH_SRC,
}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPAddress.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPAddress.java
index e1f739d..ad21e06 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPAddress.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPAddress.java
@@ -40,6 +40,13 @@
*/
public abstract boolean isBroadcast();
+
+ /**
+ * Checks if the IPAddress is the multicast address
+ * @return boolean true or false
+ */
+ public abstract boolean isMulticast();
+
/**
* Perform a low level AND operation on the bits of two IPAddress objects
* @param other IPAddress
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java
index 1530629..53e8071 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java
@@ -90,6 +90,14 @@
return this.equals(NO_MASK);
}
+ /**
+ * IPv4 multicast addresses are defined by the leading address bits of 1110
+ */
+ @Override
+ public boolean isMulticast() {
+ return ((rawValue >>> 24) & 0xF0) == 0xE0;
+ }
+
@Override
public IPv4Address and(IPv4Address other) {
Preconditions.checkNotNull(other, "other must not be null");
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java
index 4660fc5..fee04ac 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java
@@ -115,6 +115,14 @@
return this.equals(NO_MASK);
}
+ /**
+ * IPv6 multicast addresses are defined by the prefix ff00::/8
+ */
+ @Override
+ public boolean isMulticast() {
+ return (raw1 >>> 56) == 0xFFL;
+ }
+
@Override
public IPv6Address and(IPv6Address other) {
Preconditions.checkNotNull(other, "other must not be null");
@@ -166,13 +174,13 @@
(address[0] & 0xFFL) << 56 | (address[1] & 0xFFL) << 48
| (address[2] & 0xFFL) << 40 | (address[3] & 0xFFL) << 32
| (address[4] & 0xFFL) << 24 | (address[5] & 0xFFL) << 16
- | (address[6] & 0xFFL) << 8 | (address[7]);
+ | (address[6] & 0xFFL) << 8 | (address[7] & 0xFFL);
long raw2 =
(address[8] & 0xFFL) << 56 | (address[9] & 0xFFL) << 48
| (address[10] & 0xFFL) << 40 | (address[11] & 0xFFL) << 32
| (address[12] & 0xFFL) << 24 | (address[13] & 0xFFL) << 16
- | (address[14] & 0xFFL) << 8 | (address[15]);
+ | (address[14] & 0xFFL) << 8 | (address[15] & 0xFFL);
return IPv6Address.of(raw1, raw2);
}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFGroup.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFGroup.java
index 32e9bcc..9c571ea 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFGroup.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFGroup.java
@@ -38,7 +38,7 @@
public final static OFGroup ANY = new NamedGroup(ANY_VAL, "any");
/** group 0 in case we need it */
- public static final OFGroup ZERO = OFGroup.of(ZERO_VAL);
+ public static final OFGroup ZERO = new OFGroup(ZERO_VAL);
public static final OFGroup NO_MASK = ANY;
public static final OFGroup FULL_MASK = ZERO;
@@ -62,7 +62,7 @@
public static OFGroup of(final int groupNumber) {
switch(groupNumber) {
case ZERO_VAL:
- return MAX;
+ return ZERO;
case MAX_VAL:
return MAX;
case ALL_VAL:
diff --git a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPAddressTest.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPAddressTest.java
index 2ba4528..6e9d047 100644
--- a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPAddressTest.java
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPAddressTest.java
@@ -130,4 +130,17 @@
}
}
+ @Test
+ public void testMulticastIp() {
+ IPAddress<?> ip0 = IPAddress.of("240.2.3.4");
+ IPAddress<?> ip1 = IPAddress.of("224.0.1.1");
+ IPAddress<?> ip2 = IPAddress.of("239.0.0.0");
+ IPAddress<?> ip3 = IPAddress.of("feff::1");
+ IPAddress<?> ip4 = IPAddress.of("ff00::1");
+ assertTrue(!ip0.isMulticast());
+ assertTrue(ip1.isMulticast());
+ assertTrue(ip2.isMulticast());
+ assertTrue(!ip3.isMulticast());
+ assertTrue(ip4.isMulticast());
+ }
}
diff --git a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv6AddressTest.java b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv6AddressTest.java
index 52f2487..a94f443 100644
--- a/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv6AddressTest.java
+++ b/java_gen/pre-written/src/test/java/org/projectfloodlight/openflow/types/IPv6AddressTest.java
@@ -20,7 +20,8 @@
"::",
"::1",
"ffe0::",
- "1:2:3:4:5:6:7:8"
+ "1:2:3:4:5:6:7:8",
+ "8091:a2b3:c4d5:e6f7:8495:a6b7:c1d2:e3d4",
};
diff --git a/openflow_input/bsn_inner_eth_dst b/openflow_input/bsn_inner_eth_dst
new file mode 100644
index 0000000..d3e9fa9
--- /dev/null
+++ b/openflow_input/bsn_inner_eth_dst
@@ -0,0 +1,47 @@
+// Copyright 2015, 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
+#version 5
+
+/*
+ * Inner ethernet destination MAC
+ */
+
+struct of_oxm_bsn_inner_eth_dst : of_oxm {
+ uint32_t type_len == 0x00032c06;
+ of_mac_addr_t value;
+};
+
+struct of_oxm_bsn_inner_eth_dst_masked : of_oxm {
+ uint32_t type_len == 0x00032d0c;
+ of_mac_addr_t value;
+ of_mac_addr_t value_mask;
+};
diff --git a/openflow_input/bsn_inner_eth_src b/openflow_input/bsn_inner_eth_src
new file mode 100644
index 0000000..36e0e35
--- /dev/null
+++ b/openflow_input/bsn_inner_eth_src
@@ -0,0 +1,47 @@
+// Copyright 2015, 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
+#version 5
+
+/*
+ * Inner ethernet source MAC
+ */
+
+struct of_oxm_bsn_inner_eth_src : of_oxm {
+ uint32_t type_len == 0x00032e06;
+ of_mac_addr_t value;
+};
+
+struct of_oxm_bsn_inner_eth_src_masked : of_oxm {
+ uint32_t type_len == 0x00032f0c;
+ of_mac_addr_t value;
+ of_mac_addr_t value_mask;
+};
diff --git a/openflow_input/bsn_vxlan b/openflow_input/bsn_vxlan
new file mode 100644
index 0000000..4171a51
--- /dev/null
+++ b/openflow_input/bsn_vxlan
@@ -0,0 +1,47 @@
+// Copyright 2015, 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
+#version 5
+
+/*
+ * VXLAN Virtual Network Identifier
+ */
+
+struct of_oxm_bsn_vxlan_network_id : of_oxm {
+ uint32_t type_len == 0x00032a04;
+ uint32_t value;
+};
+
+struct of_oxm_bsn_vxlan_network_id_masked : of_oxm {
+ uint32_t type_len == 0x00032b08;
+ uint32_t value;
+ uint32_t value_mask;
+};