X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fofp-msgs.h;h=557524dcfc4eda3e33e75e30d093056b396b5f59;hb=310f36993face9b809430d27dac37f65a691b537;hp=5ff5976e74065a9e9f0e81f6e5debf4de882976f;hpb=358058064ba6544c9d310c78859b02a42e09f76b;p=openvswitch diff --git a/lib/ofp-msgs.h b/lib/ofp-msgs.h index 5ff5976e..557524dc 100644 --- a/lib/ofp-msgs.h +++ b/lib/ofp-msgs.h @@ -92,20 +92,37 @@ struct list; * to " indicates this, e.g. "struct ofp11_packet_in up to data". */ enum ofpraw { -/* Standard messages. */ +/* Immutable standard messages. + * + * The OpenFlow standard promises to preserve these messages and their numbers + * in future versions, so we mark them as , which covers every OpenFlow + * version numbered 0x01...0xff, rather than as OF1.0+, which covers only + * OpenFlow versions that we otherwise implement. + * + * Without here, then we would fail to decode "hello" messages that + * announce a version higher than we understand, even though there still could + * be a version in common with the peer that we do understand. The + * keyword is less useful for the other messages, because our OpenFlow channels + * accept only OpenFlow messages with a previously negotiated version. + */ - /* OFPT 1.0+ (0): uint8_t[]. */ + /* OFPT (0): uint8_t[]. */ OFPRAW_OFPT_HELLO, - /* OFPT 1.0+ (1): struct ofp_error_msg, uint8_t[]. */ + /* OFPT (1): struct ofp_error_msg, uint8_t[]. */ OFPRAW_OFPT_ERROR, - /* OFPT 1.0+ (2): uint8_t[]. */ + /* OFPT (2): uint8_t[]. */ OFPRAW_OFPT_ECHO_REQUEST, - /* OFPT 1.0+ (3): uint8_t[]. */ + /* OFPT (3): uint8_t[]. */ OFPRAW_OFPT_ECHO_REPLY, +/* Other standard messages. + * + * The meanings of these messages can (and often do) change from one version + * of OpenFlow to another. */ + /* OFPT 1.0+ (5): void. */ OFPRAW_OFPT_FEATURES_REQUEST, @@ -120,18 +137,22 @@ enum ofpraw { /* OFPT 1.0+ (8): struct ofp_switch_config. */ OFPRAW_OFPT_GET_CONFIG_REPLY, - /* OFPT 1.0-1.1 (9): struct ofp_switch_config. */ + /* OFPT 1.0+ (9): struct ofp_switch_config. */ OFPRAW_OFPT_SET_CONFIG, /* OFPT 1.0 (10): struct ofp_packet_in up to data, uint8_t[]. */ OFPRAW_OFPT10_PACKET_IN, /* OFPT 1.1 (10): struct ofp11_packet_in up to data, uint8_t[]. */ OFPRAW_OFPT11_PACKET_IN, + /* OFPT 1.2 (10): struct ofp12_packet_in, uint8_t[]. */ + OFPRAW_OFPT12_PACKET_IN, /* NXT 1.0+ (17): struct nx_packet_in, uint8_t[]. */ OFPRAW_NXT_PACKET_IN, /* OFPT 1.0 (11): struct ofp_flow_removed. */ OFPRAW_OFPT10_FLOW_REMOVED, + /* OFPT 1.1+ (11): struct ofp11_flow_removed, uint8_t[8][]. */ + OFPRAW_OFPT11_FLOW_REMOVED, /* NXT 1.0+ (14): struct nx_flow_removed, uint8_t[8][]. */ OFPRAW_NXT_FLOW_REMOVED, @@ -154,17 +175,17 @@ enum ofpraw { /* OFPT 1.0 (15): struct ofp10_port_mod. */ OFPRAW_OFPT10_PORT_MOD, - /* OFPT 1.1 (16): struct ofp11_port_mod. */ + /* OFPT 1.1+ (16): struct ofp11_port_mod. */ OFPRAW_OFPT11_PORT_MOD, /* OFPT 1.0 (18): void. */ OFPRAW_OFPT10_BARRIER_REQUEST, - /* OFPT 1.1 (20): void. */ + /* OFPT 1.1+ (20): void. */ OFPRAW_OFPT11_BARRIER_REQUEST, /* OFPT 1.0 (19): void. */ OFPRAW_OFPT10_BARRIER_REPLY, - /* OFPT 1.1 (21): void. */ + /* OFPT 1.1+ (21): void. */ OFPRAW_OFPT11_BARRIER_REPLY, /* Standard statistics. */ @@ -176,48 +197,68 @@ enum ofpraw { OFPRAW_OFPST_DESC_REPLY, /* OFPST 1.0 (1): struct ofp10_flow_stats_request. */ - OFPRAW_OFPST_FLOW_REQUEST, + OFPRAW_OFPST10_FLOW_REQUEST, + /* OFPST 1.1+ (1): struct ofp11_flow_stats_request, uint8_t[8][]. */ + OFPRAW_OFPST11_FLOW_REQUEST, /* NXST 1.0 (0): struct nx_flow_stats_request, uint8_t[8][]. */ OFPRAW_NXST_FLOW_REQUEST, /* OFPST 1.0 (1): uint8_t[]. */ - OFPRAW_OFPST_FLOW_REPLY, + OFPRAW_OFPST10_FLOW_REPLY, + /* OFPST 1.1+ (1): uint8_t[]. */ + OFPRAW_OFPST11_FLOW_REPLY, /* NXST 1.0 (0): uint8_t[]. */ OFPRAW_NXST_FLOW_REPLY, /* OFPST 1.0 (2): struct ofp10_flow_stats_request. */ - OFPRAW_OFPST_AGGREGATE_REQUEST, + OFPRAW_OFPST10_AGGREGATE_REQUEST, + /* OFPST 1.1+ (2): struct ofp11_flow_stats_request, uint8_t[8][]. */ + OFPRAW_OFPST11_AGGREGATE_REQUEST, /* NXST 1.0 (1): struct nx_flow_stats_request, uint8_t[8][]. */ OFPRAW_NXST_AGGREGATE_REQUEST, - /* OFPST 1.0 (2): struct ofp_aggregate_stats_reply. */ + /* OFPST 1.0+ (2): struct ofp_aggregate_stats_reply. */ OFPRAW_OFPST_AGGREGATE_REPLY, /* NXST 1.0 (1): struct ofp_aggregate_stats_reply. */ OFPRAW_NXST_AGGREGATE_REPLY, - /* OFPST 1.0 (3): void. */ + /* OFPST 1.0-1.2 (3): void. */ OFPRAW_OFPST_TABLE_REQUEST, /* OFPST 1.0 (3): struct ofp10_table_stats[]. */ - OFPRAW_OFPST_TABLE_REPLY, + OFPRAW_OFPST10_TABLE_REPLY, + /* OFPST 1.1 (3): struct ofp11_table_stats[]. */ + OFPRAW_OFPST11_TABLE_REPLY, + /* OFPST 1.2 (3): struct ofp12_table_stats[]. */ + OFPRAW_OFPST12_TABLE_REPLY, /* OFPST 1.0 (4): struct ofp10_port_stats_request. */ - OFPRAW_OFPST_PORT_REQUEST, + OFPRAW_OFPST10_PORT_REQUEST, + /* OFPST 1.1+ (4): struct ofp11_port_stats_request. */ + OFPRAW_OFPST11_PORT_REQUEST, /* OFPST 1.0 (4): struct ofp10_port_stats[]. */ - OFPRAW_OFPST_PORT_REPLY, + OFPRAW_OFPST10_PORT_REPLY, + /* OFPST 1.1+ (4): struct ofp11_port_stats[]. */ + OFPRAW_OFPST11_PORT_REPLY, /* OFPST 1.0 (5): struct ofp10_queue_stats_request. */ - OFPRAW_OFPST_QUEUE_REQUEST, + OFPRAW_OFPST10_QUEUE_REQUEST, + /* OFPST 1.1+ (5): struct ofp11_queue_stats_request. */ + OFPRAW_OFPST11_QUEUE_REQUEST, /* OFPST 1.0 (5): struct ofp10_queue_stats[]. */ - OFPRAW_OFPST_QUEUE_REPLY, + OFPRAW_OFPST10_QUEUE_REPLY, + /* OFPST 1.1+ (5): struct ofp11_queue_stats[]. */ + OFPRAW_OFPST11_QUEUE_REPLY, - /* OFPST 1.0 (13): void. */ + /* OFPST 1.0+ (13): void. */ OFPRAW_OFPST_PORT_DESC_REQUEST, /* OFPST 1.0 (13): struct ofp10_phy_port[]. */ - OFPRAW_OFPST_PORT_DESC_REPLY, + OFPRAW_OFPST10_PORT_DESC_REPLY, + /* OFPST 1.1+ (13): struct ofp11_port[]. */ + OFPRAW_OFPST11_PORT_DESC_REPLY, /* Nicira extension messages. * @@ -230,7 +271,7 @@ enum ofpraw { /* NXT 1.0+ (11): struct nx_role_request. */ OFPRAW_NXT_ROLE_REPLY, - /* NXT 1.0+ (12): struct nx_set_flow_format. */ + /* NXT 1.0 (12): struct nx_set_flow_format. */ OFPRAW_NXT_SET_FLOW_FORMAT, /* NXT 1.0+ (15): struct nx_flow_mod_table_id. */ @@ -327,8 +368,10 @@ enum ofptype { /* Asynchronous messages. */ OFPTYPE_PACKET_IN, /* OFPRAW_OFPT10_PACKET_IN. * OFPRAW_OFPT11_PACKET_IN. + * OFPRAW_OFPT12_PACKET_IN. * OFPRAW_NXT_PACKET_IN. */ OFPTYPE_FLOW_REMOVED, /* OFPRAW_OFPT10_FLOW_REMOVED. + * OFPRAW_OFPT11_FLOW_REMOVED. * OFPRAW_NXT_FLOW_REMOVED. */ OFPTYPE_PORT_STATUS, /* OFPRAW_OFPT10_PORT_STATUS. * OFPRAW_OFPT11_PORT_STATUS. */ @@ -351,22 +394,33 @@ enum ofptype { /* Statistics. */ OFPTYPE_DESC_STATS_REQUEST, /* OFPRAW_OFPST_DESC_REQUEST. */ OFPTYPE_DESC_STATS_REPLY, /* OFPRAW_OFPST_DESC_REPLY. */ - OFPTYPE_FLOW_STATS_REQUEST, /* OFPRAW_OFPST_FLOW_REQUEST. + OFPTYPE_FLOW_STATS_REQUEST, /* OFPRAW_OFPST10_FLOW_REQUEST. + * OFPRAW_OFPST11_FLOW_REQUEST. * OFPRAW_NXST_FLOW_REQUEST. */ - OFPTYPE_FLOW_STATS_REPLY, /* OFPRAW_OFPST_FLOW_REPLY. + OFPTYPE_FLOW_STATS_REPLY, /* OFPRAW_OFPST10_FLOW_REPLY. + * OFPRAW_OFPST11_FLOW_REPLY. * OFPRAW_NXST_FLOW_REPLY. */ - OFPTYPE_AGGREGATE_STATS_REQUEST, /* OFPRAW_OFPST_AGGREGATE_REQUEST. + OFPTYPE_AGGREGATE_STATS_REQUEST, /* OFPRAW_OFPST10_AGGREGATE_REQUEST. + * OFPRAW_OFPST11_AGGREGATE_REQUEST. * OFPRAW_NXST_AGGREGATE_REQUEST. */ OFPTYPE_AGGREGATE_STATS_REPLY, /* OFPRAW_OFPST_AGGREGATE_REPLY. * OFPRAW_NXST_AGGREGATE_REPLY. */ OFPTYPE_TABLE_STATS_REQUEST, /* OFPRAW_OFPST_TABLE_REQUEST. */ - OFPTYPE_TABLE_STATS_REPLY, /* OFPRAW_OFPST_TABLE_REPLY. */ - OFPTYPE_PORT_STATS_REQUEST, /* OFPRAW_OFPST_PORT_REQUEST. */ - OFPTYPE_PORT_STATS_REPLY, /* OFPRAW_OFPST_PORT_REPLY. */ - OFPTYPE_QUEUE_STATS_REQUEST, /* OFPRAW_OFPST_QUEUE_REQUEST. */ - OFPTYPE_QUEUE_STATS_REPLY, /* OFPRAW_OFPST_QUEUE_REPLY. */ + OFPTYPE_TABLE_STATS_REPLY, /* OFPRAW_OFPST10_TABLE_REPLY. + * OFPRAW_OFPST11_TABLE_REPLY. + * OFPRAW_OFPST12_TABLE_REPLY. */ + OFPTYPE_PORT_STATS_REQUEST, /* OFPRAW_OFPST10_PORT_REQUEST. + * OFPRAW_OFPST11_PORT_REQUEST. */ + OFPTYPE_PORT_STATS_REPLY, /* OFPRAW_OFPST10_PORT_REPLY. + * OFPRAW_OFPST11_PORT_REPLY. */ + OFPTYPE_QUEUE_STATS_REQUEST, /* OFPRAW_OFPST10_QUEUE_REQUEST. + * OFPRAW_OFPST11_QUEUE_REQUEST. */ + OFPTYPE_QUEUE_STATS_REPLY, /* OFPRAW_OFPST10_QUEUE_REPLY. + * OFPRAW_OFPST11_QUEUE_REPLY. */ OFPTYPE_PORT_DESC_STATS_REQUEST, /* OFPRAW_OFPST_PORT_DESC_REQUEST. */ - OFPTYPE_PORT_DESC_STATS_REPLY, /* OFPRAW_OFPST_PORT_DESC_REPLY. */ + + OFPTYPE_PORT_DESC_STATS_REPLY, /* OFPRAW_OFPST10_PORT_DESC_REPLY. + * OFPRAW_OFPST11_PORT_DESC_REPLY. */ /* Nicira extensions. */ OFPTYPE_ROLE_REQUEST, /* OFPRAW_NXT_ROLE_REQUEST. */