ofp-util: Rename OFPUTIL_INVALID to OFPUTIL_MSG_INVALID.
authorBen Pfaff <blp@nicira.com>
Fri, 24 Jun 2011 20:58:08 +0000 (13:58 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 30 Jun 2011 17:02:55 +0000 (10:02 -0700)
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
lib/ofp-print.c
lib/ofp-util.c
lib/ofp-util.h
ofproto/ofproto.c

index 077251c9df8a905c26fd4c92a30b5450761f947b..4a5d88918f1e5c075a232e2e8b8265be98abca0a 100644 (file)
@@ -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:
index fe2d0c8d401fec01ce5ee640448b84ca2bf1fa8c..4000d339ad2e73d61407bb92487f0be1b5889fa4 100644 (file)
@@ -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:
index 7ed83d763ab59617f3995823b0f74a2ae3d2ec32..2d10fcbfb82c2e416327b1c16bcda83c54fd3a57 100644 (file)
@@ -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
         };
 
index f7490a6ebdb3e917e384a900409b78fc9ffb9ed5..baf25e53290fed15d9ee7b264b62ce86cc3074ed 100644 (file)
@@ -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,
index 27c370e2ddd084fe5014b9fa5c6e925b61371539..64adef669b11693c55b3434e717f4b65b0cd9a37 100644 (file)
@@ -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: