[ovs-dev] [ofp-print 09/18] ofp-print: Print OFPUTIL_NXT_STATUS_REQUEST and OFPUTIL_NXT_STATUS_REPLY.
Justin Pettit
jpettit at nicira.com
Thu Dec 9 01:33:27 UTC 2010
Looks good.
--Justin
On Dec 8, 2010, at 4:27 PM, Ben Pfaff wrote:
> ---
> lib/ofp-print.c | 14 +++++++++++++-
> 1 files changed, 13 insertions(+), 1 deletions(-)
>
> diff --git a/lib/ofp-print.c b/lib/ofp-print.c
> index 1cbcb82..5dcf7bf 100644
> --- a/lib/ofp-print.c
> +++ b/lib/ofp-print.c
> @@ -1415,6 +1415,18 @@ ofp_print_echo(struct ds *string, const struct ofp_header *oh, int verbosity)
> }
>
> static void
> +ofp_print_nxt_status_message(struct ds *string, const struct ofp_header *oh)
> +{
> + struct ofpbuf b;
> +
> + ofpbuf_use_const(&b, oh, ntohs(oh->length));
> + ofpbuf_pull(&b, sizeof *oh);
> + ds_put_char(string, '"');
> + ds_put_printable(string, b.data, b.size);
> + ds_put_char(string, '"');
> +}
> +
> +static void
> ofp_print_nxt_tun_id_from_cookie(struct ds *string,
> const struct nxt_tun_id_cookie *ntic)
> {
> @@ -1589,7 +1601,7 @@ ofp_to_string__(const struct ofp_header *oh,
>
> case OFPUTIL_NXT_STATUS_REQUEST:
> case OFPUTIL_NXT_STATUS_REPLY:
> - /* XXX */
> + ofp_print_nxt_status_message(string, oh);
> break;
>
> case OFPUTIL_NXT_TUN_ID_FROM_COOKIE:
> --
> 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