From 81d1ea941425aea5eff1d9582ad12c9b3b528fe8 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 8 Aug 2011 14:48:48 -0700 Subject: [PATCH] ofp-util: Rename struct flow_stats_request with ofputil_ prefix. Most of the structs in ofp-util.h have the ofputil_ prefix. Rename this one for consistency. --- lib/ofp-parse.c | 2 +- lib/ofp-parse.h | 4 ++-- lib/ofp-print.c | 2 +- lib/ofp-util.c | 8 ++++---- lib/ofp-util.h | 6 +++--- ofproto/ofproto.c | 4 ++-- utilities/ovs-ofctl.c | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index f0e715501..e6a6af120 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -1062,7 +1062,7 @@ parse_ofp_flow_mod_file(struct list *packets, } void -parse_ofp_flow_stats_request_str(struct flow_stats_request *fsr, +parse_ofp_flow_stats_request_str(struct ofputil_flow_stats_request *fsr, bool aggregate, char *string) { struct ofputil_flow_mod fm; diff --git a/lib/ofp-parse.h b/lib/ofp-parse.h index 5d928b5e4..80fca97ae 100644 --- a/lib/ofp-parse.h +++ b/lib/ofp-parse.h @@ -24,10 +24,10 @@ #include #include "openflow/nicira-ext.h" -struct flow_stats_request; struct list; struct ofpbuf; struct ofputil_flow_mod; +struct ofputil_flow_stats_request; void parse_ofp_str(struct ofputil_flow_mod *, int command, const char *str_, bool verbose); @@ -39,7 +39,7 @@ bool parse_ofp_flow_mod_file(struct list *packets, enum nx_flow_format *cur, bool *flow_mod_table_id, FILE *, uint16_t command); -void parse_ofp_flow_stats_request_str(struct flow_stats_request *, +void parse_ofp_flow_stats_request_str(struct ofputil_flow_stats_request *, bool aggregate, char *string); #endif /* ofp-parse.h */ diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 349735a5e..d1a661bf2 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -1016,7 +1016,7 @@ static void ofp_print_flow_stats_request(struct ds *string, const struct ofp_stats_msg *osm) { - struct flow_stats_request fsr; + struct ofputil_flow_stats_request fsr; int error; error = ofputil_decode_flow_stats_request(&fsr, &osm->header); diff --git a/lib/ofp-util.c b/lib/ofp-util.c index f87862f21..71c28b2c5 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -1010,7 +1010,7 @@ ofputil_encode_flow_mod(const struct ofputil_flow_mod *fm, } static int -ofputil_decode_ofpst_flow_request(struct flow_stats_request *fsr, +ofputil_decode_ofpst_flow_request(struct ofputil_flow_stats_request *fsr, const struct ofp_header *oh, bool aggregate) { @@ -1026,7 +1026,7 @@ ofputil_decode_ofpst_flow_request(struct flow_stats_request *fsr, } static int -ofputil_decode_nxst_flow_request(struct flow_stats_request *fsr, +ofputil_decode_nxst_flow_request(struct ofputil_flow_stats_request *fsr, const struct ofp_header *oh, bool aggregate) { @@ -1056,7 +1056,7 @@ ofputil_decode_nxst_flow_request(struct flow_stats_request *fsr, * request 'oh', into an abstract flow_stats_request in 'fsr'. Returns 0 if * successful, otherwise an OpenFlow error code. */ int -ofputil_decode_flow_stats_request(struct flow_stats_request *fsr, +ofputil_decode_flow_stats_request(struct ofputil_flow_stats_request *fsr, const struct ofp_header *oh) { const struct ofputil_msg_type *type; @@ -1090,7 +1090,7 @@ ofputil_decode_flow_stats_request(struct flow_stats_request *fsr, * OFPST_AGGREGATE, NXST_FLOW, or NXST_AGGREGATE request 'oh' according to * 'flow_format', and returns the message. */ struct ofpbuf * -ofputil_encode_flow_stats_request(const struct flow_stats_request *fsr, +ofputil_encode_flow_stats_request(const struct ofputil_flow_stats_request *fsr, enum nx_flow_format flow_format) { struct ofpbuf *msg; diff --git a/lib/ofp-util.h b/lib/ofp-util.h index b48dd0372..9f3685ca7 100644 --- a/lib/ofp-util.h +++ b/lib/ofp-util.h @@ -143,17 +143,17 @@ struct ofpbuf *ofputil_encode_flow_mod(const struct ofputil_flow_mod *, bool flow_mod_table_id); /* Flow stats or aggregate stats request, independent of flow format. */ -struct flow_stats_request { +struct ofputil_flow_stats_request { bool aggregate; /* Aggregate results? */ struct cls_rule match; uint16_t out_port; uint8_t table_id; }; -int ofputil_decode_flow_stats_request(struct flow_stats_request *, +int ofputil_decode_flow_stats_request(struct ofputil_flow_stats_request *, const struct ofp_header *); struct ofpbuf *ofputil_encode_flow_stats_request( - const struct flow_stats_request *, enum nx_flow_format); + const struct ofputil_flow_stats_request *, enum nx_flow_format); /* Flow stats reply, independent of flow format. */ struct ofputil_flow_stats { diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index cb349aed9..6fd2369d4 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -1899,7 +1899,7 @@ handle_flow_stats_request(struct ofconn *ofconn, const struct ofp_stats_msg *osm) { struct ofproto *ofproto = ofconn_get_ofproto(ofconn); - struct flow_stats_request fsr; + struct ofputil_flow_stats_request fsr; struct list replies; struct list rules; struct rule *rule; @@ -2008,7 +2008,7 @@ handle_aggregate_stats_request(struct ofconn *ofconn, const struct ofp_stats_msg *osm) { struct ofproto *ofproto = ofconn_get_ofproto(ofconn); - struct flow_stats_request request; + struct ofputil_flow_stats_request request; struct ofputil_aggregate_stats stats; bool unknown_packets, unknown_bytes; struct ofpbuf *reply; diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index fded6df5f..164d0830f 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -534,7 +534,7 @@ static void do_dump_flows__(int argc, char *argv[], bool aggregate) { enum nx_flow_format min_flow_format, flow_format; - struct flow_stats_request fsr; + struct ofputil_flow_stats_request fsr; struct ofpbuf *request; struct vconn *vconn; @@ -1076,7 +1076,7 @@ static void read_flows_from_switch(struct vconn *vconn, enum nx_flow_format flow_format, struct classifier *cls, int index) { - struct flow_stats_request fsr; + struct ofputil_flow_stats_request fsr; struct ofpbuf *request; ovs_be32 send_xid; bool done; -- 2.43.0