- * A few "mf_field"s don't correspond to NXM fields. Those have 0 and
- * NULL for the following members, respectively. */
- uint32_t nxm_header; /* An NXM_* constant (a few fields have 0). */
- const char *nxm_name; /* The "NXM_*" constant's name. */
+ * Thus, 'nxm_header' is the appropriate header to use when outputting an
+ * NXM formatted match, since it will be an NXM_* constant when possible
+ * for compatibility with OpenFlow implementations that expect that, with
+ * OXM_* constants used for fields that OXM adds. Conversely, 'oxm_header'
+ * is the header to use when outputting an OXM formatted match. */
+ uint32_t nxm_header; /* An NXM_* (or OXM_*) constant. */
+ const char *nxm_name; /* The nxm_header constant's name. */
+ uint32_t oxm_header; /* An OXM_* (or NXM_*) constant. */
+ const char *oxm_name; /* The oxm_header constant's name */
+
+ /* Usable protocols.
+ * NXM and OXM are extensible, allowing later extensions to be sent in
+ * earlier protocol versions, so this does not necessarily correspond to
+ * the OpenFlow protocol version the field was introduced in.
+ * Also, some field types are tranparently mapped to each other via the
+ * struct flow (like vlan and dscp/tos fields), so each variant supports
+ * all protocols. */
+ enum ofputil_protocol usable_protocols; /* If fully/cidr masked. */
+ /* If partially/non-cidr masked. */
+ enum ofputil_protocol usable_protocols_bitwise;
+
+ int flow_be32ofs; /* Field's be32 offset in "struct flow", if prefix tree
+ * lookup is supported for the field, or -1. */