Make flow_print() print nw_proto. Print vlan in decimal.
authorBen Pfaff <blp@nicira.com>
Wed, 28 Jan 2009 20:18:33 +0000 (12:18 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 2 Mar 2009 20:51:59 +0000 (12:51 -0800)
lib/flow.c

index 489540a6e58d530322d5c33feb47fb8a36d61893..d627648cf2c7c7dbb580d222ea2d9db6853cf1b8 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford
+/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford
  * Junior University
  * 
  * We are making the OpenFlow specification and associated documentation
@@ -223,11 +223,11 @@ void
 flow_print(FILE *stream, const struct flow *flow) 
 {
     fprintf(stream,
-            "port%04x:vlan%04x mac"ETH_ADDR_FMT"->"ETH_ADDR_FMT" "
-            "proto%04x ip"IP_FMT"->"IP_FMT" port%d->%d",
+            "port%04x:vlan%d mac"ETH_ADDR_FMT"->"ETH_ADDR_FMT" "
+            "type%04x proto%"PRId8" ip"IP_FMT"->"IP_FMT" port%d->%d",
             ntohs(flow->in_port), ntohs(flow->dl_vlan),
             ETH_ADDR_ARGS(flow->dl_src), ETH_ADDR_ARGS(flow->dl_dst),
-            ntohs(flow->dl_type),
+            ntohs(flow->dl_type), flow->nw_proto,
             IP_ARGS(&flow->nw_src), IP_ARGS(&flow->nw_dst),
             ntohs(flow->tp_src), ntohs(flow->tp_dst));
 }