diff --git a/openflow_input/oxm-1.5 b/openflow_input/oxm-1.5 index f5d2e4cd8..4b985be58 100644 --- a/openflow_input/oxm-1.5 +++ b/openflow_input/oxm-1.5 @@ -22,14 +22,7 @@ struct of_oxm_actset_output_masked : of_oxm { of_port_no_t value_mask; }; - struct of_oxm_packet_type : of_oxm { uint32_t type_len == 0x80005804; - uint8_t value; -}; - -struct of_oxm_packet_type_masked : of_oxm { - uint32_t type_len == 0x80005908; - uint8_t value; - uint8_t value_mask; + enum ofp_packet_type value; }; diff --git a/openflow_input/standard-1.4 b/openflow_input/standard-1.4 index 51a1a1906..921128f4d 100644 --- a/openflow_input/standard-1.4 +++ b/openflow_input/standard-1.4 @@ -240,6 +240,16 @@ enum ofp_instruction_type(wire_type=uint16_t, bitmask=True) { OFPIT_EXPERIMENTER = 0xffff, }; +enum ofp_flow_monitor_flags (wire_type=uint16_t, bitmask=True){ + OFPFMF_INITIAL = 0x1, + OFPFMF_ADD = 0x2, + OFPFMF_REMOVED = 0x4, + OFPFMF_MODIFY = 0x8, + OFPFMF_INSTRUCTIONS = 0x10, + OFPFMF_NO_ABBREV = 0x20, + OFPFMF_ONLY_OWN = 0x40, +}; + enum ofp_flow_mod_command(wire_type=uint8_t) { OFPFC_ADD = 0, OFPFC_MODIFY = 1, @@ -880,7 +890,7 @@ struct of_port_desc_prop_experimenter : of_port_desc_prop { uint16_t type == 0xffff; uint16_t length; uint32_t experimenter == ?; - //uint32_t exp_type; + uint32_t exp_type; }; struct of_port_desc { @@ -2130,6 +2140,118 @@ struct of_group_stats_reply : of_stats_reply { list(of_group_stats_entry_t) entries; }; +/* Flow monitor commands */ +enum ofp_flow_monitor_command(wire_type=uint8_t) { + OFPFMC_ADD = 0, + OFPFMC_MODIFY = 1, + OFPFMC_DELETE = 2, +}; + +struct of_flow_monitor_entry { + uint32_t monitor_id; + uint32_t out_port; + uint32_t out_group; + enum ofp_flow_monitor_flags flags; + uint8_t table_id; + enum ofp_flow_monitor_command command; + of_match_t match; +}; + +/* Body of OFPMP_FLOW_MONITOR request */ +struct of_flow_monitor_request : of_stats_request { + uint8_t version; + uint8_t type == 18; + uint16_t length; + uint32_t xid; + uint16_t stats_type == 16; + enum ofp_stats_request_flags flags; + pad(4); + list(of_flow_monitor_entry_t) entries; +}; + +enum ofp_flow_update_event(wire_type=uint16_t) { + OFPFME_INITIAL = 0, + OFPFME_ADDED = 1, + OFPFME_REMOVED = 2, + OFPFME_MODIFIED = 3, + OFPFME_ABBREV = 4, + OFPFME_PAUSED = 5, + OFPFME_RESUMED = 6, +}; + +struct of_flow_monitor_reply_entry { + uint16_t length; + enum ofp_flow_update_event event == ?; +}; + +/* Body of OFPMP_FLOW_MONITOR reply */ +struct of_flow_monitor_reply : of_stats_reply { + uint8_t version; + uint8_t type == 19; + uint16_t length; + uint32_t xid; + uint16_t stats_type == 16; + enum ofp_stats_reply_flags flags; + pad(4); + list(of_flow_monitor_reply_entry_t) entries; +}; + +struct of_flow_update_full_initial : of_flow_monitor_reply_entry { + uint16_t length; + enum ofp_flow_update_event event == 0; + uint8_t table_id; + uint8_t reason; + uint16_t idle_timeout; + uint16_t hard_timeout; + uint16_t priority; + pad(4); + uint64_t cookie; + of_match_t match; + list(of_instruction_t) instructions; +}; + +struct of_flow_update_full_added : of_flow_monitor_reply_entry { + uint16_t length; + enum ofp_flow_update_event event == 1; + uint8_t table_id; + uint8_t reason; + uint16_t idle_timeout; + uint16_t hard_timeout; + uint16_t priority; + pad(4); + uint64_t cookie; + of_match_t match; + list(of_instruction_t) instructions; +}; + +struct of_flow_update_full_removed : of_flow_monitor_reply_entry { + uint16_t length; + enum ofp_flow_update_event event == 2; + uint8_t table_id; + uint8_t reason; + uint16_t idle_timeout; + uint16_t hard_timeout; + uint16_t priority; + pad(4); + uint64_t cookie; + of_match_t match; + list(of_instruction_t) instructions; +}; + +struct of_flow_update_full_modified : of_flow_monitor_reply_entry { + uint16_t length; + enum ofp_flow_update_event event == 3; + uint8_t table_id; + uint8_t reason; + uint16_t idle_timeout; + uint16_t hard_timeout; + uint16_t priority; + pad(4); + uint64_t cookie; + of_match_t match; + list(of_instruction_t) instructions; +}; + struct of_group_desc_stats_request : of_stats_request { uint8_t version; uint8_t type == 18; @@ -2671,7 +2793,5 @@ struct of_requestforward : of_header { uint8_t type == 32; uint16_t length; uint32_t xid; - uint32_t role; - // TODO support embedding of_header - of_octets_t data; + of_header_t request; }; diff --git a/openflow_input/standard-1.5 b/openflow_input/standard-1.5 index a875c5ad7..e52f7b192 100644 --- a/openflow_input/standard-1.5 +++ b/openflow_input/standard-1.5 @@ -2296,7 +2296,7 @@ enum ofp_flow_update_event(wire_type=uint16_t) { struct of_flow_monitor_reply_entry { uint16_t length; - enum ofp_flow_update_event event; + enum ofp_flow_update_event event == ?; }; /* Body of OFPMP_FLOW_MONITOR reply */ @@ -2311,6 +2311,62 @@ struct of_flow_monitor_reply : of_stats_reply { list(of_flow_monitor_reply_entry_t) entries; }; +struct of_flow_update_full_initial : of_flow_monitor_reply_entry { + uint16_t length; + enum ofp_flow_update_event event == 0; + uint8_t table_id; + uint8_t reason; + uint16_t idle_timeout; + uint16_t hard_timeout; + uint16_t priority; + pad(4); + uint64_t cookie; + of_match_t match; + list(of_instruction_t) instructions; +}; + +struct of_flow_update_full_added : of_flow_monitor_reply_entry { + uint16_t length; + enum ofp_flow_update_event event == 1; + uint8_t table_id; + uint8_t reason; + uint16_t idle_timeout; + uint16_t hard_timeout; + uint16_t priority; + pad(4); + uint64_t cookie; + of_match_t match; + list(of_instruction_t) instructions; +}; + +struct of_flow_update_full_removed : of_flow_monitor_reply_entry { + uint16_t length; + enum ofp_flow_update_event event == 2; + uint8_t table_id; + uint8_t reason; + uint16_t idle_timeout; + uint16_t hard_timeout; + uint16_t priority; + pad(4); + uint64_t cookie; + of_match_t match; + list(of_instruction_t) instructions; +}; + +struct of_flow_update_full_modified : of_flow_monitor_reply_entry { + uint16_t length; + enum ofp_flow_update_event event == 3; + uint8_t table_id; + uint8_t reason; + uint16_t idle_timeout; + uint16_t hard_timeout; + uint16_t priority; + pad(4); + uint64_t cookie; + of_match_t match; + list(of_instruction_t) instructions; +}; + /* Body of OFPMP_TABLE_DESC request. */ struct of_table_desc_stats_request : of_stats_request { uint8_t version; @@ -3604,7 +3660,3 @@ struct of_packet_queue { pad(6); list(of_queue_prop_t) properties; }; - - - -