From: Ben Pfaff Date: Tue, 7 Dec 2010 22:41:19 +0000 (-0800) Subject: ofp-print: Print OFPUTIL_NXT_STATUS_REQUEST and OFPUTIL_NXT_STATUS_REPLY. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3731490fda71cc9330c40362aa13361108443cfa;p=openvswitch ofp-print: Print OFPUTIL_NXT_STATUS_REQUEST and OFPUTIL_NXT_STATUS_REPLY. --- diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 2a6528af..740dbe96 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -1455,6 +1455,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) @@ -1630,7 +1642,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: