Book Image

OpenFlow Cookbook

Book Image

OpenFlow Cookbook

Overview of this book

Table of Contents (17 chapters)
16
Index

Getting the meter feature using multipart messages

When the controller wants to fetch the features of the meter table in the switch, it sends OFPMT_METER_FEATURES multipart message (ofp_multipart_request) to switch.

How to do it...

When the switch receives this OFPMP_METER_FEATURES, the switch should insert the information as shown in the following structure and should pack this structure in body field of multipart reply message and send the reply message back to controller. For more information regarding the procedure to construct and send 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_FEATURES request. Meter features. */
struct ofp_meter_features {
uint32_t max_meter;  /* Maximum number of meters. */
uint32_t band_types;   /* Bitmaps of OFPMBT_* values supported. */
uint32_t capabilities; /* Bitmaps of "ofp_meter_flags"....