X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fofp-print.c;h=7b3b77c52f514b19fc358d5180fec9fa8ced8ba9;hb=def27fc2267328febc6b65cb779266fb8b2064ae;hp=91d6dbae87c584eb6e8e69fea6d75e645495f7c3;hpb=40a8ca3292a78639919e32ddd1558ce02ad938eb;p=sliver-openvswitch.git diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 91d6dbae8..7b3b77c52 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -1063,6 +1063,14 @@ static void print_port_stat(struct ds *string, const char *leader, } } +static void +ofp_port_stats_request(struct ds *string, const void *body_, + size_t len UNUSED, int verbosity UNUSED) +{ + const struct ofp_port_stats_request *psr = body_; + ds_put_format(string, "port_no=%"PRIu16, ntohs(psr->port_no)); +} + static void ofp_port_stats_reply(struct ds *string, const void *body, size_t len, int verbosity) @@ -1187,7 +1195,9 @@ print_stats(struct ds *string, int type, const void *body, size_t body_len, { OFPST_PORT, "port", - { 0, 0, NULL, }, + { sizeof(struct ofp_port_stats_request), + sizeof(struct ofp_port_stats_request), + ofp_port_stats_request }, { 0, SIZE_MAX, ofp_port_stats_reply }, }, {