Adding OCS OpenFlow Protocol Extensions from Calient
diff --git a/openflow_input/calient b/openflow_input/calient
new file mode 100644
index 0000000..2818e64
--- /dev/null
+++ b/openflow_input/calient
@@ -0,0 +1,33 @@
+#version 4
+
+struct of_calient_stats_request : of_experimenter_stats_request {
+ uint8_t version;
+ uint8_t type == 18;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type == 0xffff;
+ enum ofp_stats_request_flags flags;
+ pad(4);
+ uint32_t experimenter == 0x0080F958;
+ uint32_t subtype == ?;
+};
+
+struct of_calient_stats_reply : of_experimenter_stats_reply {
+ uint8_t version;
+ uint8_t type == 19;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type == 0xffff;
+ enum ofp_stats_reply_flags flags;
+ pad(4);
+ uint32_t experimenter == 0x0080F958;
+ uint32_t subtype == ?;
+};
+
+enum ofp_calient_ocs_alarm(wire_type=uint8_t, bitmask=True){
+ OFPOCSALM_CLEAR = 1, /* Clear- no alarm */
+ OFPOCSALM_Minor = 2, /* loss is greater than 5.25 */
+ OFPOCSALM_Major = 3, /* loss is greater than 7.25 */
+ OFPOCSALM_Critical = 4, /* loss is greater than 10.25 */
+};
+
diff --git a/openflow_input/calient_flow_stats b/openflow_input/calient_flow_stats
new file mode 100644
index 0000000..241cc04
--- /dev/null
+++ b/openflow_input/calient_flow_stats
@@ -0,0 +1,84 @@
+#version 4
+
+struct of_calient_flow_stats_request : of_calient_stats_request {
+ uint8_t version;
+ uint8_t type == 18;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type == 0xffff;
+ enum ofp_stats_request_flags flags;
+ pad(4);
+ uint32_t experimenter == 0x0080F958;
+ 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.
+ 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 */
+ pad(4); /* Align to 64 bits */
+ uint64_t cookie; /* Ignored */
+ uint64_t cookie_mask; /* Ignored */
+ of_match_t match; /* Fields to match. Variable size */
+};
+
+enum ofp_calient_cflow_admin_state(wire_type=uint8_t, bitmask=True){
+ OFPCAS_InService = 1, /* when the connection is activated */
+ OFPCAS_UnderManagement = 2,/*Default Connection state – (when connection is not activated)*/
+};
+
+
+enum ofp_calient_cflow_operational_state(wire_type=uint8_t, bitmask=True){
+ OFPCOS_InService = 1, /* When connection is activated */
+ OFPCOS_OutOfService = 2,/*When connection has a critical alarm ( activated or otherwise) */
+ OFPCOS_Ready = 3, /*When AS state is UnderManagement */
+ OFPCOS_Degraded = 4, /*When connection is activated and has a Major alarm */
+};
+
+enum ofp_calient_cflow_Capability(wire_type=uint8_t, bitmask=True){
+ OFPCCS_Ok = 1, /* Connection has been made successfully */
+ OFPCCS_Failed = 2, /* Connection has Failed */
+ OFPCCS_Initializing = 3,/* Connection making is in progress */
+};
+
+struct of_calient_flow_stats_entry {
+ uint16_t length;
+ uint8_t table_id; /* Ignored */
+ pad(1);
+ uint32_t duration_sec; /* Not supported for now */
+ uint32_t duration_nsec; /* Not supported for now */
+ uint16_t priority; /* Not supported */
+ uint16_t idle_timeout; /* Set to 0 as entries must be explicitly removed */
+ uint16_t hard_timeout; /* Set to 0 as entries must be explicitly removed */
+ enum ofp_flow_mod_flags flags;
+ pad(4);
+ uint64_t cookie; /* Ignored */
+ enum ofp_calient_cflow_admin_state admin_status; /* AS = IS(Activated)/UMA */
+ 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_str6_t port_power;
+ pad(2);
+ of_str6_t connected_port_power;
+ pad(2);
+ of_str64_t cflow_name; /* Connection name */
+ of_match_t match;
+};
+
+
+struct of_calient_flow_stats_reply : of_calient_stats_reply {
+ uint8_t version;
+ uint8_t type == 19;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type == 0xffff;
+ enum ofp_stats_reply_flags flags;
+ 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;
+};
+
+
diff --git a/openflow_input/calient_port_desc_stats b/openflow_input/calient_port_desc_stats
new file mode 100644
index 0000000..f4b3367
--- /dev/null
+++ b/openflow_input/calient_port_desc_stats
@@ -0,0 +1,92 @@
+#version 4
+
+struct of_calient_port_desc_stats_request : of_calient_stats_request {
+ uint8_t version;
+ uint8_t type == 18;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type == 0xffff;
+ enum ofp_stats_request_flags flags;
+ pad(4);
+ uint32_t experimenter == 0x0080F958;
+ uint32_t subtype == 1;
+};
+
+
+struct of_calient_port_desc_prop {
+ uint16_t type == ?; /* One of OFPPDPT_*. */
+ uint16_t length; /* Length in bytes of this property. */
+};
+
+
+enum ofp_calient_optical_port_admin_state(wire_type=uint8_t, bitmask=True){
+ OFPAS_IN_SERVICE = 1, /*Circuit Port in Service*/
+ OFPAS_OUT_OF_SERVICE = 2, /*Circuit Port out of Service*/
+ OFPAS_OOS_NP = 3 /*Circuit Port out of Service, not provisioned*/
+};
+
+enum ofp_calient_optical_port_oper_state(wire_type=uint8_t, bitmask=True){
+ OFPOS_IN_SERVICE = 8, /*Circuit Port in Service*/
+ OFPOS_OUT_OF_SERVICE = 16 /*Circuit Port out of Service*/
+};
+
+enum ofp_calient_optical_port_oper_capability(wire_type=uint8_t, bitmask=True){
+ OFPCS_NoHardware = 1, /* when port is not in connection */
+ OFPCS_Ok = 2, /* port is in Connection which is made successfully */
+ OFPCS_Failed = 3, /* when port is in Connection which is Failed */
+ OFPCS_Initializing = 4,/* when port is in Connection which is being made */
+};
+
+
+
+
+
+struct of_calient_port_desc_prop_optical : of_calient_port_desc_prop{
+ uint16_t type == 2; /* OFPPDPT_OPTICAL_CIRCUIT */
+ 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_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;
+ of_str6_t inport_power; /* Input Port Power */
+ of_str6_t outport_power; /* Output Port Power */
+ pad(2);
+ uint64_t in_peer_node; /* Peer node datapath id connected to the input optical port */
+ uint64_t out_peer_node; /* Peer node datapath id connected to the output optical port */
+ uint16_t in_peer_port; /* Peer port number connected to the input optical port */
+ uint16_t out_peer_port; /* Peer port number connected to the output optical port */
+ pad(4);
+ of_str32_t in_circuit_id; /* Circuit Id associated with the input port */
+ of_str32_t out_circuit_id; /* Circuit id associated with the output port */
+ of_str64_t in_alias; /* Alias(name) for the input port */
+ of_str64_t out_alias; /* Alias(name) for the output port */
+};
+
+struct of_calient_port_desc_stats_entry {
+ uint16_t length;
+ pad(2);
+ of_port_no_t port_no;
+ of_mac_addr_t hw_addr;
+ pad(2);
+ of_port_name_t name; /* Not used.NULL */
+ uint32_t config; /* Not used. Always 0. */
+ uint32_t state; /* Not used. Always 0. */
+ list(of_calient_port_desc_prop_t) properties;
+};
+
+struct of_calient_port_desc_stats_reply : of_calient_stats_reply {
+ uint8_t version;
+ uint8_t type == 19;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type == 0xffff;
+ enum ofp_stats_reply_flags flags;
+ pad(4);
+ uint32_t experimenter == 0x0080F958;
+ uint32_t subtype == 1;
+ list(of_calient_port_desc_stats_entry_t)port_desc;
+};
+
+
diff --git a/openflow_input/calient_port_stats b/openflow_input/calient_port_stats
new file mode 100644
index 0000000..2d2e8ea
--- /dev/null
+++ b/openflow_input/calient_port_stats
@@ -0,0 +1,54 @@
+#version 4
+
+struct of_calient_port_stats_request : of_calient_stats_request {
+ uint8_t version;
+ uint8_t type == 18;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type == 0xffff;
+ enum ofp_stats_request_flags flags;
+ pad(4);
+ uint32_t experimenter == 0x0080F958;
+ uint32_t subtype == 3;
+ of_port_no_t port_no;
+ pad(4);
+};
+
+
+struct of_calient_port_stats_entry {
+ uint16_t length;
+ pad(2);
+ of_port_no_t port_no;
+ enum ofp_calient_optical_port_admin_state in_admin_status; /* Input port admin status */
+ 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 */
+ of_str6_t inport_power; /* Input port power */
+ pad(2);
+ of_str6_t outport_power; /* Output port power */
+ pad(2);
+ enum ofp_calient_optical_port_admin_state out_admin_status; /* Output port Admin status */
+ enum ofp_calient_optical_port_oper_state out_oper_status; /* Output port operational status */
+ enum ofp_calient_optical_port_oper_capability out_oper_capability;/* Output port operational capability */
+ enum ofp_calient_ocs_alarm out_alarm;/* Alarm on Output port */
+ pad(4);
+ of_str32_t in_circuit_id; /* Circuit id associated with the input port */
+ of_str32_t out_circuit_id; /* Circuit id associated with the output port */
+};
+
+struct of_calient_port_stats_reply : of_calient_stats_reply {
+ uint8_t version;
+ uint8_t type == 19;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t stats_type == 0xffff;
+ enum ofp_stats_reply_flags flags;
+ pad(4);
+ uint32_t experimenter == 0x0080F958;
+ uint32_t subtype == 3;
+ uint16_t data_length;
+ pad(6);
+ list(of_calient_port_stats_entry_t) entries;
+};
+
+