X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fofp-msgs.h;h=5ed8705e87fa0b5c41b03a1ff73b9d2eb522996c;hb=038341d1c1c33107a7f2ad06a5acb47c5fff7967;hp=4bcc1b4353ecacacd6540903865482489a989e7b;hpb=56de7118d0909425d714457f0cb470d69f069421;p=openvswitch diff --git a/lib/ofp-msgs.h b/lib/ofp-msgs.h index 4bcc1b43..5ed8705e 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, @@ -226,10 +243,14 @@ enum ofpraw { 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. */ OFPRAW_OFPST_PORT_DESC_REQUEST, @@ -392,9 +413,12 @@ enum ofptype { * OFPRAW_OFPST11_PORT_REQUEST. */ OFPTYPE_PORT_STATS_REPLY, /* OFPRAW_OFPST10_PORT_REPLY. * OFPRAW_OFPST11_PORT_REPLY. */ - OFPTYPE_QUEUE_STATS_REQUEST, /* OFPRAW_OFPST_QUEUE_REQUEST. */ - OFPTYPE_QUEUE_STATS_REPLY, /* OFPRAW_OFPST_QUEUE_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_OFPST10_PORT_DESC_REPLY. * OFPRAW_OFPST11_PORT_DESC_REPLY. */