Book Image

OpenFlow Cookbook

Book Image

OpenFlow Cookbook

Overview of this book

Table of Contents (17 chapters)
16
Index

Getting statistics of group/aggregate of flow table entries using multipart messages

When the controller wants to get statistics for aggregate or set of flow entries, it should send OFPMP_AGGREGATE 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_AGGREGATE.

The body field should be filled with the following structure:

/* Body for ofp_multipart_request of type OFPMP_AGGREGATE. */
struct ofp_aggregate_stats_request {
uint8_t table_id;    /* ID of table to read (from
                      * ofp_table_stats) OFPTT_ALL for
                      * all tables. */
uint8_t pad[3];      /* Align to 32 bits. */
uint32_t out_port;   /* Require matching entries to include this
                      * as an output port. A value of OFPP_ANY
    ...