Book Image

OpenFlow Cookbook

Book Image

OpenFlow Cookbook

Overview of this book

Table of Contents (17 chapters)
16
Index

Getting the port description using multipart messages

When the controller wants to fetch the details of all the ports in the switch, they should send the OFPMP_PORT_DESCRIPTION multipart message (ofp_multipart_request) to the switch.

How to do it...

In order to get information about the port description from the switch, the controller should send a multipart request message with the type field set as OFPMP_PORT_DESCRIPTION. 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 left empty.

After sending the multipart request message to the switch, the controller should wait for the reply message from the switch. Once the controller receives the reply message, they should parse the reply message and should either store the data present in the reply message in their data structure, or invoke a callback API to inform the application...