X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=utilities%2Fovs-ofctl.c;h=5a1f10658182ca8a50099a785a19546a82f84ec0;hb=f8e4867eafd076e94bdb5bcf7c7dc69ca7a9c8ae;hp=39aed8617dfa5e347f2d13c95a53e3689e95d255;hpb=6dcf2bc367acf876636e1a9542663bd95d28cf8c;p=sliver-openvswitch.git diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 39aed8617..5a1f10658 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -1418,17 +1418,13 @@ ofctl_snoop(int argc OVS_UNUSED, char *argv[]) static void ofctl_dump_ports(int argc, char *argv[]) { - struct ofp10_port_stats_request *req; struct ofpbuf *request; struct vconn *vconn; uint16_t port; open_vconn(argv[1], &vconn); - request = ofpraw_alloc(OFPRAW_OFPST_PORT_REQUEST, - vconn_get_version(vconn), 0); - req = ofpbuf_put_zeros(request, sizeof *req); port = argc > 2 ? str_to_port_no(argv[1], argv[2]) : OFPP_NONE; - req->port_no = htons(port); + request = ofputil_encode_dump_ports_request(vconn_get_version(vconn), port); dump_stats_transaction(vconn, request); vconn_close(vconn); }