From: Ben Pfaff Date: Tue, 7 Dec 2010 23:07:54 +0000 (-0800) Subject: ofp-print: Print OFPUTIL_NXST_AGGREGATE_REPLY. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2ad9ecdd0d4ac9a641e8cef1f3f4681fd77d6b1;p=openvswitch ofp-print: Print OFPUTIL_NXST_AGGREGATE_REPLY. --- diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 0ae987e4..56111435 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -1269,15 +1269,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) { @@ -1664,7 +1676,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; } }