/* ## Requests and replies. ## */
/* ## --------------------- ## */
-enum {
+enum nx_flow_format {
NXFF_OPENFLOW10 = 0, /* Standard OpenFlow 1.0 compatible. */
NXFF_TUN_ID_FROM_COOKIE = 1, /* OpenFlow 1.0, plus obtain tunnel ID from
* cookie. */
* wildcarded. */
void
ofputil_cls_rule_from_match(const struct ofp_match *match,
- unsigned int priority, int flow_format,
+ unsigned int priority,
+ enum nx_flow_format flow_format,
uint64_t cookie, struct cls_rule *rule)
{
struct flow_wildcards *wc = &rule->wc;
* the latter case only, 'match''s NXFW_TUN_ID bit will be filled in; otherwise
* it is always set to 0. */
void
-ofputil_cls_rule_to_match(const struct cls_rule *rule, int flow_format,
+ofputil_cls_rule_to_match(const struct cls_rule *rule,
+ enum nx_flow_format flow_format,
struct ofp_match *match)
{
const struct flow_wildcards *wc = &rule->wc;
#include <stddef.h>
#include <stdint.h>
#include "flow.h"
+#include "openflow/nicira-ext.h"
#include "openvswitch/types.h"
struct cls_rule;
/* Work with OpenFlow 1.0 ofp_match. */
void ofputil_cls_rule_from_match(const struct ofp_match *,
- unsigned int priority, int flow_format,
+ unsigned int priority, enum nx_flow_format,
uint64_t cookie, struct cls_rule *);
-void ofputil_cls_rule_to_match(const struct cls_rule *, int flow_format,
+void ofputil_cls_rule_to_match(const struct cls_rule *, enum nx_flow_format,
struct ofp_match *);
void normalize_match(struct ofp_match *);
char *ofp_match_to_literal_string(const struct ofp_match *match);
struct list node; /* In struct ofproto's "all_conns" list. */
struct rconn *rconn; /* OpenFlow connection. */
enum ofconn_type type; /* Type. */
- int flow_format; /* One of NXFF_*. */
+ enum nx_flow_format flow_format; /* Currently selected flow format. */
/* OFPT_PACKET_IN related data. */
struct rconn_packet_counter *packet_in_counter; /* # queued on 'rconn'. */