openflow_input: add inheritance
diff --git a/openflow_input/standard-1.0 b/openflow_input/standard-1.0
index e9cb6f0..64c60d5 100644
--- a/openflow_input/standard-1.0
+++ b/openflow_input/standard-1.0
@@ -296,6 +296,7 @@
     OFPQOFC_EPERM = 2,
 };
 
+/* XXX rename to of_message */
 struct of_header {
     uint8_t version;
     uint8_t type;
@@ -303,14 +304,14 @@
     uint32_t xid;
 };
 
-struct of_hello {
+struct of_hello : of_header {
     uint8_t version;
     uint8_t type == 0;
     uint16_t length;
     uint32_t xid;
 };
 
-struct of_echo_request {
+struct of_echo_request : of_header {
     uint8_t version;
     uint8_t type == 2;
     uint16_t length;
@@ -318,7 +319,7 @@
     of_octets_t data;
 };
 
-struct of_echo_reply {
+struct of_echo_reply : of_header {
     uint8_t version;
     uint8_t type == 3;
     uint16_t length;
@@ -326,7 +327,7 @@
     of_octets_t data;
 };
 
-struct of_experimenter {
+struct of_experimenter : of_header {
     uint8_t version;
     uint8_t type == 4;
     uint16_t length;
@@ -336,28 +337,28 @@
     of_octets_t data;
 };
 
-struct of_barrier_request {
+struct of_barrier_request : of_header {
     uint8_t version;
     uint8_t type == 18;
     uint16_t length;
     uint32_t xid;
 };
 
-struct of_barrier_reply {
+struct of_barrier_reply : of_header {
     uint8_t version;
     uint8_t type == 19;
     uint16_t length;
     uint32_t xid;
 };
 
-struct of_get_config_request {
+struct of_get_config_request : of_header {
     uint8_t version;
     uint8_t type == 7;
     uint16_t length;
     uint32_t xid;
 };
 
-struct of_get_config_reply {
+struct of_get_config_reply : of_header {
     uint8_t version;
     uint8_t type == 8;
     uint16_t length;
@@ -366,7 +367,7 @@
     uint16_t miss_send_len;
 };
 
-struct of_set_config {
+struct of_set_config : of_header {
     uint8_t version;
     uint8_t type == 9;
     uint16_t length;
@@ -387,14 +388,14 @@
     uint32_t peer;
 };
 
-struct of_features_request {
+struct of_features_request : of_header {
     uint8_t version;
     uint8_t type == 5;
     uint16_t length;
     uint32_t xid;
 };
 
-struct of_features_reply {
+struct of_features_reply : of_header {
     uint8_t version;
     uint8_t type == 6;
     uint16_t length;
@@ -408,7 +409,7 @@
     list(of_port_desc_t) ports;
 };
 
-struct of_port_status {
+struct of_port_status : of_header {
     uint8_t version;
     uint8_t type == 12;
     uint16_t length;
@@ -418,7 +419,7 @@
     of_port_desc_t desc;
 };
 
-struct of_port_mod {
+struct of_port_mod : of_header {
     uint8_t version;
     uint8_t type == 15;
     uint16_t length;
@@ -431,7 +432,7 @@
     pad(4);
 };
 
-struct of_packet_in {
+struct of_packet_in : of_header {
     uint8_t version;
     uint8_t type == 10;
     uint16_t length;
@@ -444,88 +445,88 @@
     of_octets_t data;
 };
 
-struct of_action_output {
+struct of_action_output : of_action {
     uint16_t type == 0;
     uint16_t len;
     of_port_no_t port;
     uint16_t max_len;
 };
 
-struct of_action_set_vlan_vid {
+struct of_action_set_vlan_vid : of_action {
     uint16_t type == 1;
     uint16_t len;
     uint16_t vlan_vid;
     pad(2);
 };
 
-struct of_action_strip_vlan {
+struct of_action_strip_vlan : of_action {
     uint16_t type == 3;
     uint16_t len;
     pad(4);
 };
 
-struct of_action_set_vlan_pcp {
+struct of_action_set_vlan_pcp : of_action {
     uint16_t type == 2;
     uint16_t len;
     uint8_t vlan_pcp;
     pad(3);
 };
 
-struct of_action_set_dl_src {
+struct of_action_set_dl_src : of_action {
     uint16_t type == 4;
     uint16_t len;
     of_mac_addr_t dl_addr;
     pad(6);
 };
 
-struct of_action_set_dl_dst {
+struct of_action_set_dl_dst : of_action {
     uint16_t type == 5;
     uint16_t len;
     of_mac_addr_t dl_addr;
     pad(6);
 };
 
-struct of_action_set_nw_src {
+struct of_action_set_nw_src : of_action {
     uint16_t type == 6;
     uint16_t len;
     uint32_t nw_addr;
 };
 
-struct of_action_set_nw_dst {
+struct of_action_set_nw_dst : of_action {
     uint16_t type == 7;
     uint16_t len;
     uint32_t nw_addr;
 };
 
-struct of_action_set_tp_src {
+struct of_action_set_tp_src : of_action {
     uint16_t type == 9;
     uint16_t len;
     uint16_t tp_port;
     pad(2);
 };
 
-struct of_action_set_tp_dst {
+struct of_action_set_tp_dst : of_action {
     uint16_t type == 10;
     uint16_t len;
     uint16_t tp_port;
     pad(2);
 };
 
-struct of_action_set_nw_tos {
+struct of_action_set_nw_tos : of_action {
     uint16_t type == 8;
     uint16_t len;
     uint8_t nw_tos;
     pad(3);
 };
 
-struct of_action_experimenter {
+struct of_action_experimenter : of_action {
     uint16_t type == 65535;
     uint16_t len;
     uint32_t experimenter;
     of_octets_t data;
 };
 
-struct of_action_enqueue {
+struct of_action_enqueue : of_action {
     uint16_t type == 11;
     uint16_t len;
     of_port_no_t port;
@@ -539,7 +540,7 @@
     pad(4);
 };
 
-struct of_packet_out {
+struct of_packet_out : of_header {
     uint8_t version;
     uint8_t type == 13;
     uint16_t length;
@@ -569,7 +570,24 @@
     uint16_t tcp_dst;
 };
 
-struct of_flow_add {
+struct of_flow_mod : of_header {
+    uint8_t version;
+    uint8_t type == 14;
+    uint16_t length;
+    uint32_t xid;
+    of_match_t match;
+    uint64_t cookie;
+    of_fm_cmd_t _command;
+    uint16_t idle_timeout;
+    uint16_t hard_timeout;
+    uint16_t priority;
+    uint32_t buffer_id;
+    of_port_no_t out_port;
+    uint16_t flags;
+    list(of_action_t) actions;
+};
+
+struct of_flow_add : of_flow_mod {
     uint8_t version;
     uint8_t type == 14;
     uint16_t length;
@@ -586,7 +604,7 @@
     list(of_action_t) actions;
 };
 
-struct of_flow_modify {
+struct of_flow_modify : of_flow_mod {
     uint8_t version;
     uint8_t type == 14;
     uint16_t length;
@@ -603,7 +621,7 @@
     list(of_action_t) actions;
 };
 
-struct of_flow_modify_strict {
+struct of_flow_modify_strict : of_flow_mod {
     uint8_t version;
     uint8_t type == 14;
     uint16_t length;
@@ -620,7 +638,7 @@
     list(of_action_t) actions;
 };
 
-struct of_flow_delete {
+struct of_flow_delete : of_flow_mod {
     uint8_t version;
     uint8_t type == 14;
     uint16_t length;
@@ -637,7 +655,7 @@
     list(of_action_t) actions;
 };
 
-struct of_flow_delete_strict {
+struct of_flow_delete_strict : of_flow_mod {
     uint8_t version;
     uint8_t type == 14;
     uint16_t length;
@@ -654,7 +672,7 @@
     list(of_action_t) actions;
 };
 
-struct of_flow_removed {
+struct of_flow_removed : of_header {
     uint8_t version;
     uint8_t type == 11;
     uint16_t length;
@@ -672,7 +690,7 @@
     uint64_t byte_count;
 };
 
-struct of_error_msg {
+struct of_error_msg : of_header {
     uint8_t version;
     uint8_t type == 1;
     uint16_t length;
@@ -739,7 +757,25 @@
 
 // STATS request/reply:  Desc, flow, agg, table, port, queue
 
-struct of_desc_stats_request {
+struct of_stats_request : of_header {
+    uint8_t version;
+    uint8_t type == 16;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type;
+    uint16_t flags;
+};
+
+struct of_stats_reply : of_header {
+    uint8_t version;
+    uint8_t type == 17;
+    uint16_t length;
+    uint32_t xid;
+    uint16_t stats_type;
+    uint16_t flags;
+};
+
+struct of_desc_stats_request : of_stats_request {
     uint8_t version;
     uint8_t type == 16;
     uint16_t length;
@@ -748,7 +784,7 @@
     uint16_t flags;
 };
 
-struct of_desc_stats_reply {
+struct of_desc_stats_reply : of_stats_reply {
     uint8_t version;
     uint8_t type == 17;
     uint16_t length;
@@ -762,7 +798,7 @@
     of_desc_str_t dp_desc;
 };
 
-struct of_flow_stats_request {
+struct of_flow_stats_request : of_stats_request {
     uint8_t version;
     uint8_t type == 16;
     uint16_t length;
@@ -775,7 +811,7 @@
     of_port_no_t out_port;
 };
 
-struct of_flow_stats_reply {
+struct of_flow_stats_reply : of_stats_reply {
     uint8_t version;
     uint8_t type == 17;
     uint16_t length;
@@ -785,7 +821,7 @@
     list(of_flow_stats_entry_t) entries;
 };
 
-struct of_aggregate_stats_request {
+struct of_aggregate_stats_request : of_stats_request {
     uint8_t version;
     uint8_t type == 16;
     uint16_t length;
@@ -798,7 +834,7 @@
     of_port_no_t out_port;
 };
 
-struct of_aggregate_stats_reply {
+struct of_aggregate_stats_reply : of_stats_reply {
     uint8_t version;
     uint8_t type == 17;
     uint16_t length;
@@ -811,7 +847,7 @@
     pad(4);
 };
 
-struct of_table_stats_request {
+struct of_table_stats_request : of_stats_request {
     uint8_t version;
     uint8_t type == 16;
     uint16_t length;
@@ -820,7 +856,7 @@
     uint16_t flags;
 };
 
-struct of_table_stats_reply {
+struct of_table_stats_reply : of_stats_reply {
     uint8_t version;
     uint8_t type == 17;
     uint16_t length;
@@ -830,7 +866,7 @@
     list(of_table_stats_entry_t) entries;
 };
 
-struct of_port_stats_request {
+struct of_port_stats_request : of_stats_request {
     uint8_t version;
     uint8_t type == 16;
     uint16_t length;
@@ -841,7 +877,7 @@
     pad(6);
 };
 
-struct of_port_stats_reply {
+struct of_port_stats_reply : of_stats_reply {
     uint8_t version;
     uint8_t type == 17;
     uint16_t length;
@@ -851,7 +887,7 @@
     list(of_port_stats_entry_t) entries;
 };
 
-struct of_queue_stats_request {
+struct of_queue_stats_request : of_stats_request {
     uint8_t version;
     uint8_t type == 16;
     uint16_t length;
@@ -863,7 +899,7 @@
     uint32_t queue_id;
 };
 
-struct of_queue_stats_reply {
+struct of_queue_stats_reply : of_stats_reply {
     uint8_t version;
     uint8_t type == 17;
     uint16_t length;
@@ -873,7 +909,7 @@
     list(of_queue_stats_entry_t) entries;
 };
 
-struct of_experimenter_stats_request {
+struct of_experimenter_stats_request : of_stats_request {
     uint8_t version;
     uint8_t type == 16;
     uint16_t length;
@@ -884,7 +920,7 @@
     of_octets_t data;
 };
 
-struct of_experimenter_stats_reply {
+struct of_experimenter_stats_reply : of_stats_reply {
     uint8_t version;
     uint8_t type == 17;
     uint16_t length;
@@ -903,7 +939,7 @@
     pad(4);
 };
 
-struct of_queue_prop_min_rate {
+struct of_queue_prop_min_rate : of_queue_prop {
     uint16_t type == 1;
     uint16_t len;
     pad(4);
@@ -918,7 +954,7 @@
     list(of_queue_prop_t) properties;
 };
 
-struct of_queue_get_config_request {
+struct of_queue_get_config_request : of_header {
     uint8_t version;
     uint8_t type == 20;
     uint16_t length;
@@ -927,7 +963,7 @@
     pad(2);
 };
 
-struct of_queue_get_config_reply {
+struct of_queue_get_config_reply : of_header {
     uint8_t version;
     uint8_t type == 21;
     uint16_t length;