[ovs-dev] [ofp-print 11/18] ofp-print: Print OFPUTIL_NXST_AGGREGATE_REPLY.
Ben Pfaff
blp at nicira.com
Thu Dec 9 00:27:03 UTC 2010
---
lib/ofp-print.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/lib/ofp-print.c b/lib/ofp-print.c
index fa3f73e..ca0dc81 100644
--- a/lib/ofp-print.c
+++ b/lib/ofp-print.c
@@ -1228,15 +1228,27 @@ ofp_print_nxst_flow_reply(struct ds *string, const struct ofp_header *oh)
}
static void
-ofp_print_ofpst_aggregate_reply(struct ds *string, const struct ofp_header *oh)
+ofp_print_ofp_aggregate_stats_reply (
+ struct ds *string, const struct ofp_aggregate_stats_reply *asr)
{
- const struct ofp_aggregate_stats_reply *asr = ofputil_stats_body(oh);
-
ds_put_format(string, " packet_count=%"PRIu64, ntohll(asr->packet_count));
ds_put_format(string, " byte_count=%"PRIu64, ntohll(asr->byte_count));
ds_put_format(string, " flow_count=%"PRIu32, ntohl(asr->flow_count));
}
+static void
+ofp_print_ofpst_aggregate_reply(struct ds *string, const struct ofp_header *oh)
+{
+ ofp_print_ofp_aggregate_stats_reply(string, ofputil_stats_body(oh));
+}
+
+static void
+ofp_print_nxst_aggregate_reply(struct ds *string,
+ const struct nx_aggregate_stats_reply *nasr)
+{
+ ofp_print_ofp_aggregate_stats_reply(string, &nasr->asr);
+}
+
static void print_port_stat(struct ds *string, const char *leader,
uint64_t stat, int more)
{
@@ -1623,7 +1635,8 @@ ofp_to_string__(const struct ofp_header *oh,
break;
case OFPUTIL_NXST_AGGREGATE_REPLY:
- /* XXX */
+ ofp_print_stats_reply(string, oh);
+ ofp_print_nxst_aggregate_reply(string, oh);
break;
}
}
--
1.7.1
More information about the dev
mailing list