From 3731490fda71cc9330c40362aa13361108443cfa Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 7 Dec 2010 14:41:19 -0800 Subject: [PATCH] ofp-print: Print OFPUTIL_NXT_STATUS_REQUEST and OFPUTIL_NXT_STATUS_REPLY. --- lib/ofp-print.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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: -- 2.30.2