Book Image

OpenFlow Cookbook

Book Image

OpenFlow Cookbook

Overview of this book

Table of Contents (17 chapters)
16
Index

Getting the meter configuration using multipart messages

When the controller wants to fetch the configuration details of one or more meters in the switch, it should send the OFPMT_METER_CONFIG multipart message (ofp_multipart_request) to the switch.

How to do it...

To get the configuration details of one or more meter entries in the switch, the controller should send a multipart request message with the type field set as OFPMT_METER_CONFIG. The message format that should be used by the controller to form the multipart request message is defined in the Introduction section in Chapter 5, Handling Multipart Statistics Messages (Part 2).

The body field should be filled with the following structure by the controller:

/* Body of OFPMP_METER and OFPMP_METER_CONFIG requests. */
struct ofp_meter_multipart_request {
uint32_t meter_id;  /* Meter instance, or OFPM_ALL. */
uint8_t pad[4];     /* Align to 64 bits. */
};

The meter_id field should be filled with the meter ID. The meter_id field is defined in...