[ovs-dev] [ofp-print 11/18] ofp-print: Print OFPUTIL_NXST_AGGREGATE_REPLY.
Justin Pettit
jpettit at nicira.com
Thu Dec 9 01:58:47 UTC 2010
Looks good.
--Justin
On Dec 8, 2010, at 4:27 PM, Ben Pfaff wrote:
> ---
> 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
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
More information about the dev
mailing list