From 8f93e93c807d3acd06fb3b367276f574164b1a9c Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 24 Jun 2011 13:58:08 -0700 Subject: [PATCH] ofp-util: Rename OFPUTIL_INVALID to OFPUTIL_MSG_INVALID. An upcoming commit will introduce new OPFUTIL_* constants for actions. It seems best to be able to visually distinguish the contants. Most of the existing constants start with a good prefix, but OFPUTIL_INVALID does not, so rename it. --- lib/learning-switch.c | 2 +- lib/ofp-print.c | 2 +- lib/ofp-util.c | 4 ++-- lib/ofp-util.h | 2 +- ofproto/ofproto.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/learning-switch.c b/lib/learning-switch.c index 077251c9..4a5d8891 100644 --- a/lib/learning-switch.c +++ b/lib/learning-switch.c @@ -225,7 +225,7 @@ lswitch_process_packet(struct lswitch *sw, struct rconn *rconn, /* Nothing to do. */ break; - case OFPUTIL_INVALID: + case OFPUTIL_MSG_INVALID: case OFPUTIL_OFPT_HELLO: case OFPUTIL_OFPT_ERROR: case OFPUTIL_OFPT_ECHO_REPLY: diff --git a/lib/ofp-print.c b/lib/ofp-print.c index fe2d0c8d..4000d339 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -1372,7 +1372,7 @@ ofp_to_string__(const struct ofp_header *oh, code = ofputil_msg_type_code(type); switch (code) { - case OFPUTIL_INVALID: + case OFPUTIL_MSG_INVALID: break; case OFPUTIL_OFPT_HELLO: diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 7ed83d76..2d10fcbf 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -725,8 +725,8 @@ ofputil_decode_msg_type(const struct ofp_header *oh, } if (error) { static const struct ofputil_msg_type ofputil_invalid_type = { - OFPUTIL_INVALID, - 0, "OFPUTIL_INVALID", + OFPUTIL_MSG_INVALID, + 0, "OFPUTIL_MSG_INVALID", 0, 0 }; diff --git a/lib/ofp-util.h b/lib/ofp-util.h index f7490a6e..baf25e53 100644 --- a/lib/ofp-util.h +++ b/lib/ofp-util.h @@ -31,7 +31,7 @@ struct ofpbuf; /* Basic decoding and length validation of OpenFlow messages. */ enum ofputil_msg_code { - OFPUTIL_INVALID, + OFPUTIL_MSG_INVALID, /* OFPT_* messages. */ OFPUTIL_OFPT_HELLO, diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 27c370e2..64adef66 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -2639,7 +2639,7 @@ handle_openflow__(struct ofconn *ofconn, const struct ofpbuf *msg) case OFPUTIL_OFPST_QUEUE_REQUEST: return handle_queue_stats_request(ofconn, msg->data); - case OFPUTIL_INVALID: + case OFPUTIL_MSG_INVALID: case OFPUTIL_OFPT_HELLO: case OFPUTIL_OFPT_ERROR: case OFPUTIL_OFPT_FEATURES_REPLY: -- 2.30.2