Book Image

OpenFlow Cookbook

Book Image

OpenFlow Cookbook

Overview of this book

Table of Contents (17 chapters)
16
Index

Modifying a meter entry in a meter table

When the controller wants to modify a meter entry, the controller sends a meter modification message (OFPT_METER_MOD) with the command value set as OFPMC_MODIFY to the switch. This meter modification message contains the information required to identify and modify the meter.

Tip

The OFPT_METER_MOD message is used for all the meter operations such as adding a new meter, deleting an existing meter, and modifying a meter.

How to do it...

The message format used by the controller to send the OFPT_METER_MOD is defined in the Adding a new meter in a meter table recipe in Chapter 4, Group Table and Meter Table modification Messages (Part 2). Here, to modify a meter entry, the command field is set as OFPMC_MODIFY.

When the switch receives a meter modification message with the command OFPMC_MODIFY, the switch should fetch the meter entry based on the meter identifier in the message.

If the switch can fetch a meter entry, then the existing entry, along with its...