Hierarchical error messages plus some more tweaks
- hierarchical error messages for different error types
- renamed ofp_stats_types to ofp_stats_type
- renamed OFP_VENDOR to OFP_EXPERIMENTER in OF 1.0 input file
- use ofp_capabilities enum in of_features_reply
- use boolean type for l2_table_enable field in of_bsn_set_l2_table_(request|reply)
- return Set<OFActionType> for actions field in of_features_reply
- added DatapathId class that's returned for datapath_id field of of_features_reply
- removed unused read/write routines from OFBufferId
- added getOFVersioon method to factory classes/interfaces
- renamed OFPT_MULTIPART_(REQUEST|REPLY) to OFPT_STATS_(REQUEST|REPLY) in OF 1.3 input file
- renamed ofp_multipart_types to ofp_stats_type in OF 1.3 input file
- tweaked python backend to work with consistent use of of_stats_xyz vs. of_multipart_xyz in 1.3
diff --git a/openflow_input/standard-1.1 b/openflow_input/standard-1.1
index 937ac52..0b58b2d 100644
--- a/openflow_input/standard-1.1
+++ b/openflow_input/standard-1.1
@@ -386,7 +386,7 @@
OFPSCFC_BAD_LEN = 1,
};
-enum ofp_stats_types(wire_type=uint16_t) {
+enum ofp_stats_type(wire_type=uint16_t) {
OFPST_DESC = 0,
OFPST_FLOW = 1,
OFPST_AGGREGATE = 2,
@@ -529,7 +529,7 @@
uint32_t n_buffers;
uint8_t n_tables;
pad(3);
- uint32_t capabilities;
+ enum ofp_capabilities capabilities;
uint32_t reserved;
list(of_port_desc_t) ports;
};
@@ -1011,8 +1011,116 @@
uint8_t type == 1;
uint16_t length;
uint32_t xid;
- uint16_t err_type;
- uint16_t code;
+ uint16_t err_type == ?;
+};
+
+struct of_hello_failed_error_msg : of_error_msg {
+ uint8_t version;
+ uint8_t type == 1;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t err_type == 0;
+ enum ofp_hello_failed_code code;
+ of_octets_t data;
+};
+
+struct of_bad_request_error_msg : of_error_msg {
+ uint8_t version;
+ uint8_t type == 1;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t err_type == 1;
+ enum ofp_bad_request_code code;
+ of_octets_t data;
+};
+
+struct of_bad_action_error_msg : of_error_msg {
+ uint8_t version;
+ uint8_t type == 1;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t err_type == 2;
+ enum ofp_bad_action_code code;
+ of_octets_t data;
+};
+
+struct of_bad_instruction_error_msg : of_error_msg {
+ uint8_t version;
+ uint8_t type == 1;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t err_type == 3;
+ enum ofp_bad_instruction_code code;
+ of_octets_t data;
+};
+
+struct of_bad_match_error_msg : of_error_msg {
+ uint8_t version;
+ uint8_t type == 1;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t err_type == 4;
+ enum ofp_bad_match_code code;
+ of_octets_t data;
+};
+
+struct of_flow_mod_failed_error_msg : of_error_msg {
+ uint8_t version;
+ uint8_t type == 1;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t err_type == 5;
+ enum ofp_flow_mod_failed_code code;
+ of_octets_t data;
+};
+
+struct of_group_mod_failed_error_msg : of_error_msg {
+ uint8_t version;
+ uint8_t type == 1;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t err_type == 6;
+ enum ofp_group_mod_failed_code code;
+ of_octets_t data;
+};
+
+struct of_port_mod_failed_error_msg : of_error_msg {
+ uint8_t version;
+ uint8_t type == 1;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t err_type == 7;
+ enum ofp_port_mod_failed_code code;
+ of_octets_t data;
+};
+
+struct of_table_mod_failed_error_msg : of_error_msg {
+ uint8_t version;
+ uint8_t type == 1;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t err_type == 8;
+ enum ofp_table_mod_failed_code code;
+ of_octets_t data;
+};
+
+struct of_queue_op_failed_error_msg : of_error_msg {
+ uint8_t version;
+ uint8_t type == 1;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t err_type == 9;
+ enum ofp_queue_op_failed_code code;
+ of_octets_t data;
+};
+
+struct of_switch_config_failed_error_msg : of_error_msg {
+ uint8_t version;
+ uint8_t type == 1;
+ uint16_t length;
+ uint32_t xid;
+ uint16_t err_type == 10;
+ enum ofp_switch_config_failed_code code;
of_octets_t data;
};