ofp-print: Print fragment handling in OpenFlow switch config messages.
authorBen Pfaff <blp@nicira.com>
Tue, 14 Dec 2010 20:08:10 +0000 (12:08 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 12 Jan 2011 21:51:43 +0000 (13:51 -0800)
lib/ofp-print.c
tests/ofproto.at

index 9d1b3b0c0a5d3052171bbbe8c5a675464bebdcc4..ac841ccdd51edf8fbffb2f13e8da8f14bfe5dc78 100644 (file)
@@ -663,6 +663,22 @@ ofp_print_switch_config(struct ds *string, const struct ofp_switch_config *osc)
     uint16_t flags;
 
     flags = ntohs(osc->flags);
+
+    ds_put_cstr(string, " frags=");
+    switch (flags & OFPC_FRAG_MASK) {
+    case OFPC_FRAG_NORMAL:
+        ds_put_cstr(string, "normal");
+        flags &= ~OFPC_FRAG_MASK;
+        break;
+    case OFPC_FRAG_DROP:
+        ds_put_cstr(string, "drop");
+        flags &= ~OFPC_FRAG_MASK;
+        break;
+    case OFPC_FRAG_REASM:
+        ds_put_cstr(string, "reassemble");
+        flags &= ~OFPC_FRAG_MASK;
+        break;
+    }
     if (flags) {
         ds_put_format(string, " ***unknown flags 0x%04"PRIx16"***", flags);
     }
index 6b430e56f8a85713b77fcf889af5aa37138abfae..a7dda06f01af026d5ef146d945a7cf02bb0bd51f 100644 (file)
@@ -31,7 +31,7 @@ OFPT_FEATURES_REPLY: ver:0x1, dpid:fedcba9876543210
 n_tables:2, n_buffers:256
 features: capabilities:0x87, actions:0xfff
  LOCAL(br0): addr:aa:55:aa:55:00:00, config: 0x1, state:0x1
-OFPT_GET_CONFIG_REPLY: miss_send_len=0
+OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
 ])
 OFPROTO_STOP
 AT_CLEANUP
@@ -53,7 +53,7 @@ OFPT_FEATURES_REPLY: ver:0x1, dpid:fedcba9876543210
 n_tables:2, n_buffers:256
 features: capabilities:0x87, actions:0xfff
  LOCAL(br0): addr:aa:55:aa:55:00:00, config: $config, state:$state
-OFPT_GET_CONFIG_REPLY: miss_send_len=0
+OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
 ])
 done
 OFPROTO_STOP