summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-02-15 13:43:41 -0800
committerBen Pfaff <blp@ovn.org>2018-02-28 16:48:54 -0800
commitd9cea8f5f341a60f60cd2bf61d0122f3c6715ca1 (patch)
treec2ee24ab35ed7d6113dfd02a01c97cf5bd366813 /lib
parentbc7284f56198636c2bace98bc3bc269da67a5fd1 (diff)
downloadopenvswitch-d9cea8f5f341a60f60cd2bf61d0122f3c6715ca1.tar.gz
ofp-util: Use consistent naming convention.
Most of the tree now uses "encode" as the verb for making an OpenFlow message, so adopt it here in this very old code as well. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/learning-switch.c2
-rw-r--r--lib/ofp-util.c4
-rw-r--r--lib/rconn.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/learning-switch.c b/lib/learning-switch.c
index db520325c..3a9e015bb 100644
--- a/lib/learning-switch.c
+++ b/lib/learning-switch.c
@@ -618,7 +618,7 @@ process_packet_in(struct lswitch *sw, const struct ofp_header *oh)
static void
process_echo_request(struct lswitch *sw, const struct ofp_header *rq)
{
- queue_tx(sw, make_echo_reply(rq));
+ queue_tx(sw, ofputil_encode_echo_reply(rq));
}
static ofp_port_t
diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index df5a9dcb9..c78c856ea 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -176,7 +176,7 @@ ofputil_encode_hello(uint32_t allowed_versions)
/* Creates and returns an OFPT_ECHO_REQUEST message with an empty payload. */
struct ofpbuf *
-make_echo_request(enum ofp_version ofp_version)
+ofputil_encode_echo_request(enum ofp_version ofp_version)
{
return ofpraw_alloc_xid(OFPRAW_OFPT_ECHO_REQUEST, ofp_version,
htonl(0), 0);
@@ -185,7 +185,7 @@ make_echo_request(enum ofp_version ofp_version)
/* Creates and returns an OFPT_ECHO_REPLY message matching the
* OFPT_ECHO_REQUEST message in 'rq'. */
struct ofpbuf *
-make_echo_reply(const struct ofp_header *rq)
+ofputil_encode_echo_reply(const struct ofp_header *rq)
{
struct ofpbuf rq_buf = ofpbuf_const_initializer(rq, ntohs(rq->length));
ofpraw_pull_assert(&rq_buf);
diff --git a/lib/rconn.c b/lib/rconn.c
index 2eebbff70..3cad259d0 100644
--- a/lib/rconn.c
+++ b/lib/rconn.c
@@ -581,7 +581,7 @@ run_ACTIVE(struct rconn *rc)
* anything.) */
int version = rconn_get_version__(rc);
if (version >= 0 && version <= 0xff) {
- rconn_send__(rc, make_echo_request(version), NULL);
+ rconn_send__(rc, ofputil_encode_echo_request(version), NULL);
}
return;