From: Ben Pfaff Date: Wed, 10 Sep 2008 20:20:36 +0000 (-0700) Subject: Add vendor-specific messages and statistics to OpenFlow protocol. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=696db2c3b64a5a9b8b8998b4fd0484c5b59ae7ee;p=openvswitch Add vendor-specific messages and statistics to OpenFlow protocol. --- diff --git a/include/openflow.h b/include/openflow.h index 27550c56..e7d15893 100644 --- a/include/openflow.h +++ b/include/openflow.h @@ -117,7 +117,8 @@ enum ofp_type { OFPT_STATS_REQUEST, /* 13 Controller/switch message */ OFPT_STATS_REPLY, /* 14 Controller/switch message */ OFPT_ECHO_REQUEST, /* 15 Symmetric message */ - OFPT_ECHO_REPLY /* 16 Symmetric message */ + OFPT_ECHO_REPLY, /* 16 Symmetric message */ + OFPT_VENDOR = 0xff /* 255 Vendor extension */ }; /* Header on all OpenFlow packets. */ @@ -493,7 +494,13 @@ enum ofp_stats_types { * key-value pairs are included. * The reply body is an ASCII string of key-value pairs in the form * "key=value\n". */ - OFPST_SWITCH + OFPST_SWITCH, + + /* Vendor extension. + * The request and reply bodies begin with a 32-bit vendor ID, which takes + * the same form as in "struct ofp_vendor". The request and reply bodies + * are otherwise vendor-defined. */ + OFPST_VENDOR = 0xffff }; struct ofp_stats_request { @@ -610,4 +617,15 @@ struct ofp_port_stats { }; OFP_ASSERT(sizeof(struct ofp_port_stats) == 104); +/* Vendor extension. */ +struct ofp_vendor { + struct ofp_header header; /* Type OFPT_VENDOR. */ + uint32_t vendor; /* Vendor ID: + * - MSB 0: low-order bytes are Ethernet OUI. + * - MSB != 0: defined by OpenFlow + * consortium. */ + /* Vendor-defined arbitrary additional data. */ +}; +OFP_ASSERT(sizeof(struct ofp_vendor) == 12); + #endif /* openflow.h */