- * OpenFlow errors have two 16-bit parts: a "type" and a "code". A "type" has
- * a unique meaning. The "code" values are different for each "type".
+ * These functions map OpenFlow 32-bit vendor IDs (as used in struct
+ * ofp_vendor_header) into 4-bit values to embed in an "int". The 4-bit values
+ * are only used internally in Open vSwitch and never appear on the wire, so
+ * particular codes used are not important.
+ */
+
+/* Vendor error numbers currently used in Open vSwitch. */
+#define OFPUTIL_VENDORS \
+ /* vendor name vendor value */ \
+ OFPUTIL_VENDOR(OFPUTIL_VENDOR_OPENFLOW, 0x00000000) \
+ OFPUTIL_VENDOR(OFPUTIL_VENDOR_NICIRA, 0x00002320)
+
+/* OFPUTIL_VENDOR_* definitions. */
+enum ofputil_vendor_codes {
+#define OFPUTIL_VENDOR(NAME, VENDOR_ID) NAME,
+ OFPUTIL_VENDORS
+ OFPUTIL_N_VENDORS
+#undef OFPUTIL_VENDOR
+};
+\f
+/* Error codes.