Book Image

OpenFlow Cookbook

Book Image

OpenFlow Cookbook

Overview of this book

Table of Contents (17 chapters)
16
Index

Getting meter configuration using multipart messages

When the controller wants to fetch the configuration detail of one or more meters in the switch, it sends an OFPMT_METER_CONFIG multipart message (ofp_multipart_request) to the switch.

How to do it...

When the switch receives this OFPMT_METER_CONFIG message, the switch should first fetch the meter entry from the meter table using meter_id, then it should insert the information as shown in the following structure, and pack this structure in the body field of the multipart reply message. For more information regarding the procedure to construct and the multipart reply message refer to the Introduction section of Chapter 5, Handling Multipart Statistics Messages (Part 1).

The body field should take the following format:

/* Body of reply to OFPMP_METER_CONFIG request. Meter configuration. */
struct ofp_meter_config {
uint16_t length;                      /* Length of this entry. */
uint16_t flags;                       /* All OFPMC_* that apply...