Calient flow and port stat updates
diff --git a/c_gen/of_g_legacy.py b/c_gen/of_g_legacy.py
index fe58e56..2ae112d 100644
--- a/c_gen/of_g_legacy.py
+++ b/c_gen/of_g_legacy.py
@@ -164,6 +164,15 @@
5: "of_match_v3_t", # Currently uses same match as 1.2 (v3).
"short_name":"match"
},
+ of_calient_port_desc_stats_entry_t = {
+ 1: "of_calient_port_desc_stats_entry_t",
+ 2: "of_calient_port_desc_stats_entry_t",
+ 3: "of_calient_port_desc_stats_entry_t",
+ 4: "of_calient_port_desc_stats_entry_t",
+ 5: "of_calient_port_desc_stats_entry_t",
+ "short_name":"calient_port_desc_stats_entry"
+ },
+
)
## Base data types
diff --git a/java_gen/java_type.py b/java_gen/java_type.py
index 1a48d86..7cb39fa 100644
--- a/java_gen/java_type.py
+++ b/java_gen/java_type.py
@@ -546,6 +546,8 @@
generic_t = JType("T")
+calient_port_desc_stats_entry = JType('OFCalientPortDescStatsEntry').op(read='OFCalientPortDescStatsEntryVer$version.READER.readFrom(bb)', write='$name.writeTo(bb)')
+
table_desc = JType('OFTableDesc') \
.op(read='OFTableDescVer$version.READER.readFrom(bb)', \
write='$name.writeTo(bb)')
@@ -580,6 +582,7 @@
'of_str64_t': str64,
'of_str32_t': str32,
'of_str6_t': str6,
+ 'of_calient_port_desc_stats_entry_t': calient_port_desc_stats_entry,
'of_ipv4_t': ipv4,
'of_ipv6_t': ipv6,
'of_wc_bmap_t': flow_wildcards,
diff --git a/openflow_input/calient_flow_stats b/openflow_input/calient_flow_stats
index 241cc04..c07f4f1 100644
--- a/openflow_input/calient_flow_stats
+++ b/openflow_input/calient_flow_stats
@@ -12,7 +12,7 @@
uint32_t subtype == 2; /* OFPEMPFS = 2 */
uint8_t table_id; /* Recommended to be set to 0. Ignored */
pad(3);
- uint32_t out_port; /* Require matching entries to include this as an output port.
+ of_port_no_t out_port; /* Require matching entries to include this as an output port.
A value of OFPP_ANY indicates no restriction. Ignored */
uint32_t out_group; /* Require matching entries to include this as an output group.
A value of OFPP_ANY indicates no restriction. Ignored */
@@ -40,7 +40,7 @@
OFPCCS_Failed = 2, /* Connection has Failed */
OFPCCS_Initializing = 3,/* Connection making is in progress */
};
-
+/*oper_capability,alarm,cflow_name not present in the backend */
struct of_calient_flow_stats_entry {
uint16_t length;
uint8_t table_id; /* Ignored */
@@ -57,6 +57,7 @@
enum ofp_calient_cflow_operational_state oper_status; /* OS = UMA/OOS */
enum ofp_calient_cflow_Capability oper_capability; /* OC = FAIL/OK/INIT */
enum ofp_calient_ocs_alarm alarm; /* Alarm = NA/MJ/MN/CR */
+ of_port_no_t out_port;
of_str6_t port_power;
pad(2);
of_str6_t connected_port_power;
@@ -76,9 +77,7 @@
pad(4);
uint32_t experimenter == 0x0080F958;
uint32_t subtype == 2;
- uint16_t data_length;
- pad(6);
- list(of_calient_flow_stats_entry_t)flow_stats;
+ list(of_calient_flow_stats_entry_t)entries;
};
diff --git a/openflow_input/calient_port_desc_stats b/openflow_input/calient_port_desc_stats
index f4b3367..8734852 100644
--- a/openflow_input/calient_port_desc_stats
+++ b/openflow_input/calient_port_desc_stats
@@ -46,7 +46,7 @@
uint16_t length; /* Length in bytes of this property. */
enum ofp_calient_optical_port_admin_state in_admin_status;
enum ofp_calient_optical_port_oper_state in_oper_status;
- enum ofp_calient_optical_port_oper_capability in_oper_capability;
+ enum ofp_calient_optical_port_oper_capability in_oper_capability;/* currently not present in backend */
enum ofp_calient_optical_port_admin_state out_admin_status;
enum ofp_calient_optical_port_oper_state out_oper_status;
enum ofp_calient_optical_port_oper_capability out_oper_capability;
@@ -90,3 +90,15 @@
};
+struct of_calient_port_status : of_experimenter{
+ uint8_t version;
+ uint8_t type == 4;
+ uint16_t length;
+ uint32_t xid;
+ uint32_t experimenter == 0x0080F958;
+ uint32_t subtype == 1;
+ enum ofp_port_reason reason;
+ pad(7);
+ of_calient_port_desc_stats_entry_t desc;
+ };
+
diff --git a/openflow_input/calient_port_stats b/openflow_input/calient_port_stats
index 2d2e8ea..6a951b8 100644
--- a/openflow_input/calient_port_stats
+++ b/openflow_input/calient_port_stats
@@ -15,6 +15,7 @@
};
+/* in_admin_status,in_oper_status,in_oper_capability,in_alarm,in_circuit_id not present in the backkend */
struct of_calient_port_stats_entry {
uint16_t length;
pad(2);
@@ -23,6 +24,7 @@
enum ofp_calient_optical_port_oper_state in_oper_status; /* Input port operational status */
enum ofp_calient_optical_port_oper_capability in_oper_capability; /* Input port operational capability */
enum ofp_calient_ocs_alarm in_alarm;/* Alarm on Input port */
+ pad(4);
of_str6_t inport_power; /* Input port power */
pad(2);
of_str6_t outport_power; /* Output port power */
@@ -46,8 +48,6 @@
pad(4);
uint32_t experimenter == 0x0080F958;
uint32_t subtype == 3;
- uint16_t data_length;
- pad(6);
list(of_calient_port_stats_entry_t) entries;
};