Book Image

OpenFlow Cookbook

Book Image

OpenFlow Cookbook

Overview of this book

Table of Contents (17 chapters)
16
Index

Handling a multipart request message to get statistics of an individual flow table entry

If the controller wants to get statistics for a particular flow entry, then it sends a OFPMP_FLOW multipart message (ofp_multipart_request) to the switch.

How to do it...

The message format that will be used by the controller to get the statistics of a flow entry using a multipart message is defined in the Getting statistics of an individual flow table entry using multipart messages recipe of Chapter 5, Handling Multipart Statistics Messages (Part 2).

When the switch receives this OFPMP_FLOW message, it should first fetch the matching flow entry from its flow table. Once it fetches the matching flow entry, it should construct a reply message. The format of the reply message is defined in the Introduction section of this chapter.

The type field represents the type of multipart message and should be set to the value as OFPMP_FLOW. The body field should take the following format:

/* Body of reply to OFPMP_FLOW...