Show OpenFlow wire version when pretty printing features reply.
authorJustin Pettit <jpettit@nicira.com>
Fri, 26 Sep 2008 22:28:41 +0000 (15:28 -0700)
committerJustin Pettit <jpettit@nicira.com>
Fri, 26 Sep 2008 22:28:41 +0000 (15:28 -0700)
This allows easy detection of version number with "dpctl show".

lib/ofp-print.c

index a3f5d63540b5a3c827dabff7a9a72af24f94c4ae..c8a6a322f0a3c266e363dd855875ec0eb093db0d 100644 (file)
@@ -473,7 +473,8 @@ ofp_print_switch_features(struct ds *string, const void *oh, size_t len,
     int n_ports;
     int i;
 
-    ds_put_format(string, "dp id:%"PRIx64"\n", ntohll(osf->datapath_id));
+    ds_put_format(string, " ver:0x%x, dpid:%"PRIx64"\n", 
+            osf->header.version, ntohll(osf->datapath_id));
     ds_put_format(string, "n_tables:%d, n_buffers:%d\n", osf->n_tables,
             ntohl(osf->n_buffers));
     ds_put_format(string, "features: capabilities:%#x, actions:%#x\n",