Book Image

OpenFlow Cookbook

Book Image

OpenFlow Cookbook

Overview of this book

Table of Contents (17 chapters)
16
Index

Getting port queue statistics using multipart messages

When the controller wants to get port queue statistics of one or more queues in one or more OpenFlow ports, it should send OFPMP_QUEUE_STATS multipart message (ofp_multipart_request) to switch.

How to do it...

The message format that should be used by controller for sending the multipart request message is defined in the Introduction section of this Chapter.

For getting the statistics of a flow entry, the controller should set the type field as OFPMP_QUEUE_STATS.

The body field should be filled with the following message format:

/* Body for ofp_multipart_request of type OFPMP_QUEUE_STATS. */
struct ofp_queue_stats_request {
uint32_t port_no;   /* All ports if OFPP_ANY. */
uint32_t queue_id;  /* All queues if OFPQ_ALL. */
};
How to do it...

The port_no. field should be filled with the port number whose queue statistics are to be fetched by the switch. If the controller wants to get queue statistics of all the ports in the system, then this value should be...