experimenter optical multipart request and reply messages to work with LINC-OE
diff --git a/c_gen/c_code_gen.py b/c_gen/c_code_gen.py
index 6556d3b..484e941 100644
--- a/c_gen/c_code_gen.py
+++ b/c_gen/c_code_gen.py
@@ -653,6 +653,7 @@
/* Currently these are categorized as scalars */
typedef char of_port_name_t[OF_MAX_PORT_NAME_LEN];
+typedef char of_app_code_t[OF_APP_CODE_LEN];
typedef char of_table_name_t[OF_MAX_TABLE_NAME_LEN];
typedef char of_desc_str_t[OF_DESC_STR_LEN];
typedef char of_serial_num_t[OF_SERIAL_NUM_LEN];
diff --git a/c_gen/c_test_gen.py b/c_gen/c_test_gen.py
index 9b70e52..8cd73c5 100644
--- a/c_gen/c_test_gen.py
+++ b/c_gen/c_test_gen.py
@@ -106,7 +106,10 @@
of_bitmap_128_t="bitmap_128",
of_checksum_128_t="checksum_128",
#Circuit extensions
- oxm_of_och_sig_id_t="sig_id",
+ oxm_of_och_sig_id_t="sig_id",
+ of_app_code_t="app_code",
+ #of_port_optical_transport_application_code_t="tappcode",
+ of_port_desc_prop_optical_transport_t="desc1",
)
if m_type.find("of_list_") == 0:
@@ -121,7 +124,7 @@
string_types = [ "of_port_name_t", "of_table_name_t",
"of_desc_str_t", "of_serial_num_t", "of_mac_addr_t",
"of_ipv6_t", "of_bitmap_128_t", "of_checksum_128_t",
- "of_str64_t"]
+ "of_str64_t","of_app_code_t"]
scalar_types = integer_types[:]
scalar_types.extend(string_types)
diff --git a/c_gen/of_g_legacy.py b/c_gen/of_g_legacy.py
index b58ca08..c0267ca 100644
--- a/c_gen/of_g_legacy.py
+++ b/c_gen/of_g_legacy.py
@@ -87,7 +87,8 @@
OF_MAX_PORT_NAME_LEN = 16,
OF_ETH_ALEN = 6,
OF_DESC_STR_LEN = 256,
- OF_SERIAL_NUM_LEN = 32
+ OF_SERIAL_NUM_LEN = 32,
+ OF_APP_CODE_LEN = 15,
)
## List of mixed data types
@@ -208,6 +209,9 @@
of_octets_t = dict(bytes=-1, short_name="octets"),
of_bitmap_128_t = dict(bytes=16, short_name="bitmap_128"),
of_checksum_128_t = dict(bytes=16, short_name="checksum_128"),
+ of_app_code_t = dict(bytes=ofp_constants["OF_APP_CODE_LEN"],
+ short_name="app_code"),
+
)
of_scalar_types = ["char", "uint8_t", "uint16_t", "uint32_t", "uint64_t",
diff --git a/java_gen/java_type.py b/java_gen/java_type.py
index 12d6260..6b97f69 100644
--- a/java_gen/java_type.py
+++ b/java_gen/java_type.py
@@ -352,6 +352,7 @@
default="MacAddress.NONE")
port_name = gen_fixed_length_string_jtype(16)
+app_code = gen_fixed_length_string_jtype(15)
desc_str = gen_fixed_length_string_jtype(256)
serial_num = gen_fixed_length_string_jtype(32)
table_name = gen_fixed_length_string_jtype(32)
@@ -549,6 +550,7 @@
'of_bitmap_128_t': port_bitmap,
'of_checksum_128_t': u128,
'of_bsn_vport_t': bsn_vport,
+ 'of_app_code_t': app_code,
}
## Map that defines exceptions from the standard loxi->java mapping scheme
diff --git a/loxi_ir/ir_offset.py b/loxi_ir/ir_offset.py
index 9c6a5c1..2d5c71c 100644
--- a/loxi_ir/ir_offset.py
+++ b/loxi_ir/ir_offset.py
@@ -25,7 +25,8 @@
OF_MAX_PORT_NAME_LEN = 16,
OF_ETH_ALEN = 6,
OF_DESC_STR_LEN = 256,
- OF_SERIAL_NUM_LEN = 32
+ OF_SERIAL_NUM_LEN = 32,
+ OF_APP_CODE_LEN = 15
)
@@ -102,6 +103,7 @@
of_octets_t = (0, False),
of_bitmap_128_t = (16, True),
of_checksum_128_t = (16, True),
+ of_app_code_t = (15,True),
)
def type_dec_to_count_base(m_type):
diff --git a/openflow_input/circuit b/openflow_input/circuit
index 9377d6d..87be023 100644
--- a/openflow_input/circuit
+++ b/openflow_input/circuit
@@ -79,6 +79,7 @@
};
+
struct of_circuit_ports_request : of_experimenter_stats_request {
uint8_t version;
uint8_t type == 18;
@@ -87,10 +88,11 @@
uint16_t stats_type == 0xffff;
enum ofp_stats_request_flags flags;
pad(4);
- uint32_t experimenter == 0x5c16c8;
- uint32_t subtype == 15;
+ uint32_t experimenter == 0x748771;
+ uint32_t subtype == 13;
};
+
struct of_circuit_ports_reply : of_experimenter_stats_reply {
uint8_t version;
uint8_t type == 19;
@@ -99,6 +101,53 @@
uint16_t stats_type == 0xffff;
enum ofp_stats_reply_flags flags;
pad(4);
- uint32_t experimenter == 0x5c16c8;
- uint32_t subtype == ?;
+ uint32_t experimenter == 0x748771;
+ uint32_t subtype == 13;
+ list(of_port_optical_t) entries;
};
+
+
+struct of_port_optical {
+ of_port_no_t port_no;
+ uint16_t length;
+ pad(2);
+ of_mac_addr_t hw_addr;
+ pad(2);
+ of_port_name_t name;
+ enum ofp_port_config config;
+ enum ofp_port_state state;
+ list(of_port_desc_prop_optical_transport_t) desc;
+};
+
+struct of_port_desc_prop_optical_transport {
+ uint16_t type;
+ uint16_t length;
+ uint8_t port_signal_type;
+ uint8_t reserved;
+ pad(2);
+};
+
+struct of_port_optical_transport_application_code
+{
+ uint16_t feature_type;
+ uint8_t oic_type;
+ of_app_code_t app_code;
+};
+
+
+struct of_port_optical_transport_layer_entry {
+ uint8_t layer_class;
+ uint8_t signal_type;
+ uint8_t adaptation;
+ pad(5);
+};
+
+
+/* ODU Layer Stack Feature Encoding */
+struct of_port_optical_transport_layer_stack {
+ uint16_t feature_type;
+ uint16_t length;
+ pad(4);
+ list(of_port_optical_transport_layer_entry_t) entries;
+};
+