ovs-ofctl: Avoid impossible check for !osm in fetch_port_by_stats().
[sliver-openvswitch.git] / lib / meta-flow.h
index 91d52c7..632cb46 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012 Nicira Networks.
+ * Copyright (c) 2011, 2012 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -196,6 +196,15 @@ struct mf_field {
      * 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. */
+
+    /* OXM properties */
+    uint32_t oxm_header;        /* Field id in the OXM basic class,
+                                * an OXM_* constant.
+                                * Ignored if oxm_name is NULL */
+    const char *oxm_name;      /* The OXM_* constant's name,
+                                * NULL if the field is not present
+                                * in the OXM basic class */
+
 };
 
 /* The representation of a field's value. */
@@ -255,6 +264,7 @@ void mf_set_value(const struct mf_field *, const union mf_value *value,
                   struct cls_rule *);
 void mf_set_flow_value(const struct mf_field *, const union mf_value *value,
                        struct flow *);
+bool mf_is_zero(const struct mf_field *, const struct flow *);
 
 void mf_get(const struct mf_field *, const struct cls_rule *,
             union mf_value *value, union mf_value *mask);