ofproto: Querying port stats for individual ports (OpenFlow 1.0)
[sliver-openvswitch.git] / extras / ezio / ovs-switchui.c
index 79f5552..67f9747 100644 (file)
@@ -1105,6 +1105,7 @@ do_show_data_rates(void *rates_)
     }
     if (!rates->xid) {
         struct ofp_stats_request *rq;
+        struct ofp_port_stats_request *psr;
         struct ofpbuf *b;
 
         rates->xid = random_uint32();
@@ -1112,6 +1113,10 @@ do_show_data_rates(void *rates_)
                                rates->xid, &b);
         rq->type = htons(OFPST_PORT);
         rq->flags = htons(0);
+        psr = ofbuf_put_uninit(b, sizeof *psr);
+        memset(psr, 0, sizeof *psr);
+        psr->port_no = htons(OFPP_NONE);
+        update_openflow_length(b);
         rconn_send_with_limit(rates->rconn, b, counter, 10);
     }