openflow_input: make stats_request/reply flags use enum
diff --git a/openflow_input/standard-1.0 b/openflow_input/standard-1.0
index 79d5bad..ad2e76f 100644
--- a/openflow_input/standard-1.0
+++ b/openflow_input/standard-1.0
@@ -211,6 +211,10 @@
OFPFF_EMERG = 0x4,
};
+enum ofp_stats_request_flags(wire_type=uint16_t, bitmask=True) {
+};
+
+
enum ofp_stats_reply_flags(wire_type=uint16_t, bitmask=True) {
OFPSF_REPLY_MORE = 0x1,
};
@@ -825,7 +829,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == ?;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
};
struct of_stats_reply : of_header {
@@ -834,7 +838,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == ?;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
};
struct of_desc_stats_request : of_stats_request {
@@ -843,7 +847,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 0;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
};
struct of_desc_stats_reply : of_stats_reply {
@@ -852,7 +856,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 0;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
of_desc_str_t mfr_desc;
of_desc_str_t hw_desc;
of_desc_str_t sw_desc;
@@ -866,7 +870,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 1;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
of_match_t match;
uint8_t table_id;
pad(1);
@@ -879,7 +883,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 1;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
list(of_flow_stats_entry_t) entries;
};
@@ -889,7 +893,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 2;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
of_match_t match;
uint8_t table_id;
pad(1);
@@ -902,7 +906,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 2;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
uint64_t packet_count;
uint64_t byte_count;
uint32_t flow_count;
@@ -915,7 +919,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 3;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
};
struct of_table_stats_reply : of_stats_reply {
@@ -924,7 +928,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 3;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
list(of_table_stats_entry_t) entries;
};
@@ -934,7 +938,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 4;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
of_port_no_t port_no;
pad(6);
};
@@ -945,7 +949,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 4;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
list(of_port_stats_entry_t) entries;
};
@@ -955,7 +959,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 5;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
of_port_no_t port_no;
pad(2);
uint32_t queue_id;
@@ -967,7 +971,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 5;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
list(of_queue_stats_entry_t) entries;
};
@@ -977,7 +981,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 0xffff;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
uint32_t experimenter == ?;
of_octets_t data;
};
@@ -988,7 +992,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 0xffff;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
uint32_t experimenter == ?;
of_octets_t data;
};
diff --git a/openflow_input/standard-1.1 b/openflow_input/standard-1.1
index 9937c6d..a6f511f 100644
--- a/openflow_input/standard-1.1
+++ b/openflow_input/standard-1.1
@@ -399,6 +399,11 @@
OFPST_EXPERIMENTER = 0xffff,
};
+// none defined
+enum ofp_stats_request_flags(wire_type=uint16_t, bitmask=True) {
+};
+
+
enum ofp_stats_reply_flags(wire_type=uint16_t, bitmask=True) {
OFPSF_REPLY_MORE = 0x1,
};
@@ -1217,7 +1222,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == ?;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1227,7 +1232,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == ?;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
};
@@ -1237,7 +1242,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 0;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1247,7 +1252,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 0;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
of_desc_str_t mfr_desc;
of_desc_str_t hw_desc;
@@ -1262,7 +1267,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 1;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
uint8_t table_id;
pad(3);
@@ -1280,7 +1285,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 1;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_flow_stats_entry_t) entries;
};
@@ -1291,7 +1296,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 2;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
uint8_t table_id;
pad(3);
@@ -1309,7 +1314,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 2;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
uint64_t packet_count;
uint64_t byte_count;
@@ -1323,7 +1328,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 3;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1333,7 +1338,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 3;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_table_stats_entry_t) entries;
};
@@ -1344,7 +1349,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 4;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
of_port_no_t port_no;
pad(4);
@@ -1356,7 +1361,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 4;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_port_stats_entry_t) entries;
};
@@ -1367,7 +1372,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 5;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
of_port_no_t port_no;
uint32_t queue_id;
@@ -1379,7 +1384,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 5;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_queue_stats_entry_t) entries;
};
@@ -1390,7 +1395,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 6;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
uint32_t group_id;
pad(4);
@@ -1402,7 +1407,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 6;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_group_stats_entry_t) entries;
};
@@ -1413,7 +1418,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 7;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1423,7 +1428,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 7;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_group_desc_stats_entry_t) entries;
};
@@ -1434,7 +1439,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 0xffff;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
uint32_t experimenter == ?;
pad(4);
@@ -1447,7 +1452,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 0xffff;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
uint32_t experimenter == ?;
pad(4);
diff --git a/openflow_input/standard-1.2 b/openflow_input/standard-1.2
index a22a259..a804643 100644
--- a/openflow_input/standard-1.2
+++ b/openflow_input/standard-1.2
@@ -424,6 +424,9 @@
OFPST_EXPERIMENTER = 0xffff,
};
+enum ofp_stats_request_flags(wire_type=uint16_t, bitmask=True) {
+};
+
enum ofp_stats_reply_flags(wire_type=uint16_t, bitmask=True) {
OFPSF_REPLY_MORE = 0x1,
};
@@ -1187,7 +1190,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == ?;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1197,7 +1200,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == ?;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
};
@@ -1207,7 +1210,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 0;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1217,7 +1220,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 0;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
of_desc_str_t mfr_desc;
of_desc_str_t hw_desc;
@@ -1232,7 +1235,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 1;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
uint8_t table_id;
pad(3);
@@ -1250,7 +1253,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 1;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_flow_stats_entry_t) entries;
};
@@ -1261,7 +1264,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 2;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
uint8_t table_id;
pad(3);
@@ -1279,7 +1282,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 2;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
uint64_t packet_count;
uint64_t byte_count;
@@ -1293,7 +1296,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 3;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1303,7 +1306,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 3;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_table_stats_entry_t) entries;
};
@@ -1314,7 +1317,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 4;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
of_port_no_t port_no;
pad(4);
@@ -1326,7 +1329,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 4;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_port_stats_entry_t) entries;
};
@@ -1337,7 +1340,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 5;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
of_port_no_t port_no;
uint32_t queue_id;
@@ -1349,7 +1352,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 5;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_queue_stats_entry_t) entries;
};
@@ -1360,7 +1363,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 6;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
uint32_t group_id;
pad(4);
@@ -1372,7 +1375,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 6;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_group_stats_entry_t) entries;
};
@@ -1383,7 +1386,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 7;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1393,7 +1396,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 7;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_group_desc_stats_entry_t) entries;
};
@@ -1404,7 +1407,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 8;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1414,7 +1417,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 8;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
uint32_t types;
uint32_t capabilities;
@@ -1434,7 +1437,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 0xffff;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
uint32_t experimenter == ?;
uint32_t subtype;
@@ -1447,7 +1450,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 0xffff;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
uint32_t experimenter == ?;
uint32_t subtype;
diff --git a/openflow_input/standard-1.3 b/openflow_input/standard-1.3
index 60d4654..29e6c76 100644
--- a/openflow_input/standard-1.3
+++ b/openflow_input/standard-1.3
@@ -1402,7 +1402,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == ?;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1412,7 +1412,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == ?;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
};
@@ -1422,7 +1422,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 0;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1432,7 +1432,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 0;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
of_desc_str_t mfr_desc;
of_desc_str_t hw_desc;
@@ -1447,7 +1447,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 1;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
uint8_t table_id;
pad(3);
@@ -1465,7 +1465,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 1;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_flow_stats_entry_t) entries;
};
@@ -1476,7 +1476,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 2;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
uint8_t table_id;
pad(3);
@@ -1494,7 +1494,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 2;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
uint64_t packet_count;
uint64_t byte_count;
@@ -1508,7 +1508,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 3;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1518,7 +1518,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 3;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_table_stats_entry_t) entries;
};
@@ -1659,7 +1659,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 4;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
of_port_no_t port_no;
pad(4);
@@ -1671,7 +1671,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 4;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_port_stats_entry_t) entries;
};
@@ -1682,7 +1682,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 5;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
of_port_no_t port_no;
uint32_t queue_id;
@@ -1694,7 +1694,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 5;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_queue_stats_entry_t) entries;
};
@@ -1705,7 +1705,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 6;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
uint32_t group_id;
pad(4);
@@ -1717,7 +1717,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 6;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_group_stats_entry_t) entries;
};
@@ -1728,7 +1728,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 7;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1738,7 +1738,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 7;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_group_desc_stats_entry_t) entries;
};
@@ -1749,7 +1749,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 8;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1759,7 +1759,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 8;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
uint32_t types;
uint32_t capabilities;
@@ -1779,7 +1779,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 9;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
uint32_t meter_id;
pad(4);
@@ -1791,7 +1791,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 9;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_meter_stats_t) entries;
};
@@ -1802,7 +1802,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 10;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
uint32_t meter_id;
pad(4);
@@ -1814,7 +1814,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 10;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_meter_band_t) entries;
};
@@ -1826,7 +1826,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 11;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1837,7 +1837,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 11;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
of_meter_features_t features;
};
@@ -1849,7 +1849,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 12;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
list(of_table_features_t) entries;
};
@@ -1861,7 +1861,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 12;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_table_features_t) entries;
};
@@ -1873,7 +1873,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 13;
- uint16_t flags;
+ enum ofp_stats_request_flags flags;
pad(4);
};
@@ -1884,7 +1884,7 @@
uint16_t length;
uint32_t xid;
uint16_t stats_type == 13;
- uint16_t flags;
+ enum ofp_stats_reply_flags flags;
pad(4);
list(of_port_desc_t) entries;
};