ofp-util: Rename struct flow_mod to struct ofputil_flow_mod.
authorBen Pfaff <blp@nicira.com>
Mon, 8 Aug 2011 21:46:38 +0000 (14:46 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 9 Aug 2011 20:53:21 +0000 (13:53 -0700)
Most of the structs in ofp-util.h have the ofputil_ prefix.  Rename this
one for consistency.

lib/ofp-parse.c
lib/ofp-parse.h
lib/ofp-print.c
lib/ofp-util.c
lib/ofp-util.h
ofproto/ofproto.c
utilities/ovs-ofctl.c

index c171293..f0e7155 100644 (file)
@@ -836,7 +836,8 @@ parse_reg_value(struct cls_rule *rule, int reg_idx, const char *value)
  * constant for 'command'.  To parse syntax for an OFPST_FLOW or
  * OFPST_AGGREGATE (or NXST_FLOW or NXST_AGGREGATE), use -1 for 'command'. */
 void
-parse_ofp_str(struct flow_mod *fm, int command, const char *str_, bool verbose)
+parse_ofp_str(struct ofputil_flow_mod *fm, int command, const char *str_,
+              bool verbose)
 {
     enum {
         F_OUT_PORT = 1 << 0,
@@ -1007,7 +1008,7 @@ parse_ofp_flow_mod_str(struct list *packets, enum nx_flow_format *cur_format,
     struct cls_rule rule_copy;
     struct ofpbuf actions;
     struct ofpbuf *ofm;
-    struct flow_mod fm;
+    struct ofputil_flow_mod fm;
 
     ofpbuf_init(&actions, 64);
     parse_ofp_str(&fm, command, string, verbose);
@@ -1064,7 +1065,7 @@ void
 parse_ofp_flow_stats_request_str(struct flow_stats_request *fsr,
                                  bool aggregate, char *string)
 {
-    struct flow_mod fm;
+    struct ofputil_flow_mod fm;
 
     parse_ofp_str(&fm, -1, string, false);
     fsr->aggregate = aggregate;
index 8ad3c59..5d928b5 100644 (file)
 #include <stdio.h>
 #include "openflow/nicira-ext.h"
 
-struct flow_mod;
 struct flow_stats_request;
 struct list;
 struct ofpbuf;
+struct ofputil_flow_mod;
 
-void parse_ofp_str(struct flow_mod *, int command, const char *str_,
+void parse_ofp_str(struct ofputil_flow_mod *, int command, const char *str_,
                    bool verbose);
 
 void parse_ofp_flow_mod_str(struct list *packets,
index 9311c14..349735a 100644 (file)
@@ -781,7 +781,7 @@ static void
 ofp_print_flow_mod(struct ds *s, const struct ofp_header *oh,
                    enum ofputil_msg_code code, int verbosity)
 {
-    struct flow_mod fm;
+    struct ofputil_flow_mod fm;
     bool need_priority;
     int error;
 
index 579be73..f87862f 100644 (file)
@@ -866,8 +866,8 @@ ofputil_make_flow_mod_table_id(bool flow_mod_table_id)
  *
  * Does not validate the flow_mod actions. */
 int
-ofputil_decode_flow_mod(struct flow_mod *fm, const struct ofp_header *oh,
-                        bool flow_mod_table_id)
+ofputil_decode_flow_mod(struct ofputil_flow_mod *fm,
+                        const struct ofp_header *oh, bool flow_mod_table_id)
 {
     const struct ofputil_msg_type *type;
     uint16_t command;
@@ -956,7 +956,7 @@ ofputil_decode_flow_mod(struct flow_mod *fm, const struct ofp_header *oh,
  * 'flow_mod_table_id' should be true if the NXT_FLOW_MOD_TABLE_ID extension is
  * enabled, false otherwise. */
 struct ofpbuf *
-ofputil_encode_flow_mod(const struct flow_mod *fm,
+ofputil_encode_flow_mod(const struct ofputil_flow_mod *fm,
                         enum nx_flow_format flow_format,
                         bool flow_mod_table_id)
 {
index a9601aa..b48dd03 100644 (file)
@@ -122,7 +122,7 @@ struct ofpbuf *ofputil_make_set_flow_format(enum nx_flow_format);
 struct ofpbuf *ofputil_make_flow_mod_table_id(bool flow_mod_table_id);
 
 /* Flow format independent flow_mod. */
-struct flow_mod {
+struct ofputil_flow_mod {
     struct cls_rule cr;
     ovs_be64 cookie;
     uint8_t table_id;
@@ -136,9 +136,9 @@ struct flow_mod {
     size_t n_actions;
 };
 
-int ofputil_decode_flow_mod(struct flow_mod *, const struct ofp_header *,
-                            bool flow_mod_table_id);
-struct ofpbuf *ofputil_encode_flow_mod(const struct flow_mod *,
+int ofputil_decode_flow_mod(struct ofputil_flow_mod *,
+                            const struct ofp_header *, bool flow_mod_table_id);
+struct ofpbuf *ofputil_encode_flow_mod(const struct ofputil_flow_mod *,
                                        enum nx_flow_format,
                                        bool flow_mod_table_id);
 
index c94549f..cb349ae 100644 (file)
@@ -135,8 +135,8 @@ static void ofproto_rule_send_removed(struct rule *, uint8_t reason);
 
 static void ofopgroup_destroy(struct ofopgroup *);
 
-static int add_flow(struct ofproto *, struct ofconn *, struct flow_mod *,
-                    const struct ofp_header *);
+static int add_flow(struct ofproto *, struct ofconn *,
+                    struct ofputil_flow_mod *, const struct ofp_header *);
 
 /* This return value tells handle_openflow() that processing of the current
  * OpenFlow message must be postponed until some ongoing operations have
@@ -1048,7 +1048,7 @@ ofproto_add_flow(struct ofproto *ofproto, const struct cls_rule *cls_rule,
                                     &ofproto->tables[0], cls_rule));
     if (!rule || !ofputil_actions_equal(rule->actions, rule->n_actions,
                                         actions, n_actions)) {
-        struct flow_mod fm;
+        struct ofputil_flow_mod fm;
 
         memset(&fm, 0, sizeof fm);
         fm.cr = *cls_rule;
@@ -2174,8 +2174,8 @@ is_flow_deletion_pending(const struct ofproto *ofproto,
  * 'ofconn' is used to retrieve the packet buffer specified in ofm->buffer_id,
  * if any. */
 static int
-add_flow(struct ofproto *ofproto, struct ofconn *ofconn, struct flow_mod *fm,
-         const struct ofp_header *request)
+add_flow(struct ofproto *ofproto, struct ofconn *ofconn,
+         struct ofputil_flow_mod *fm, const struct ofp_header *request)
 {
     struct classifier *table;
     struct ofopgroup *group;
@@ -2278,7 +2278,7 @@ add_flow(struct ofproto *ofproto, struct ofconn *ofconn, struct flow_mod *fm,
  *
  * Returns 0 on success, otherwise an OpenFlow error code. */
 static int
-modify_flows__(struct ofconn *ofconn, const struct flow_mod *fm,
+modify_flows__(struct ofconn *ofconn, const struct ofputil_flow_mod *fm,
                const struct ofp_header *request, struct list *rules)
 {
     struct ofopgroup *group;
@@ -2308,7 +2308,7 @@ modify_flows__(struct ofconn *ofconn, const struct flow_mod *fm,
  * 'ofconn' is used to retrieve the packet buffer specified in fm->buffer_id,
  * if any. */
 static int
-modify_flows_loose(struct ofconn *ofconn, struct flow_mod *fm,
+modify_flows_loose(struct ofconn *ofconn, struct ofputil_flow_mod *fm,
                    const struct ofp_header *request)
 {
     struct ofproto *p = ofconn_get_ofproto(ofconn);
@@ -2327,7 +2327,7 @@ modify_flows_loose(struct ofconn *ofconn, struct flow_mod *fm,
  * 'ofconn' is used to retrieve the packet buffer specified in fm->buffer_id,
  * if any. */
 static int
-modify_flow_strict(struct ofconn *ofconn, struct flow_mod *fm,
+modify_flow_strict(struct ofconn *ofconn, struct ofputil_flow_mod *fm,
                    const struct ofp_header *request)
 {
     struct ofproto *p = ofconn_get_ofproto(ofconn);
@@ -2370,7 +2370,7 @@ delete_flows__(struct ofconn *ofconn, const struct ofp_header *request,
 
 /* Implements OFPFC_DELETE. */
 static int
-delete_flows_loose(struct ofconn *ofconn, const struct flow_mod *fm,
+delete_flows_loose(struct ofconn *ofconn, const struct ofputil_flow_mod *fm,
                    const struct ofp_header *request)
 {
     struct ofproto *p = ofconn_get_ofproto(ofconn);
@@ -2386,7 +2386,7 @@ delete_flows_loose(struct ofconn *ofconn, const struct flow_mod *fm,
 
 /* Implements OFPFC_DELETE_STRICT. */
 static int
-delete_flow_strict(struct ofconn *ofconn, struct flow_mod *fm,
+delete_flow_strict(struct ofconn *ofconn, struct ofputil_flow_mod *fm,
                    const struct ofp_header *request)
 {
     struct ofproto *p = ofconn_get_ofproto(ofconn);
@@ -2448,7 +2448,7 @@ static int
 handle_flow_mod(struct ofconn *ofconn, const struct ofp_header *oh)
 {
     struct ofproto *ofproto = ofconn_get_ofproto(ofconn);
-    struct flow_mod fm;
+    struct ofputil_flow_mod fm;
     int error;
 
     error = reject_slave_controller(ofconn, "flow_mod");
index d7c88b6..fded6df 100644 (file)
@@ -1041,8 +1041,8 @@ read_flows_from_file(const char *filename, struct classifier *cls, int index)
     min_flow_format = NXFF_OPENFLOW10;
     while (!ds_get_preprocessed_line(&s, file)) {
         struct fte_version *version;
+        struct ofputil_flow_mod fm;
         enum nx_flow_format min_ff;
-        struct flow_mod fm;
 
         parse_ofp_str(&fm, OFPFC_ADD, ds_cstr(&s), true);
 
@@ -1152,7 +1152,7 @@ fte_make_flow_mod(const struct fte *fte, int index, uint16_t command,
                   enum nx_flow_format flow_format, struct list *packets)
 {
     const struct fte_version *version = fte->versions[index];
-    struct flow_mod fm;
+    struct ofputil_flow_mod fm;
     struct ofpbuf *ofm;
 
     fm.cr = fte->rule;