Book Image

OpenFlow Cookbook

Book Image

OpenFlow Cookbook

Overview of this book

Table of Contents (17 chapters)
16
Index

Getting queue description using multipart messages

When the controller wants to fetch the details of the queues attached to OpenFlow ports in the switch, it sends an OFPMP_QUEUE_DESC multipart message (ofp_multipart_request) to the switch.

How to do it...

When the switch receives this OFPMP_QUEUE_DESC message, the switch should first fetch the queue information based on the port_no and queue_id fields in the multipart request message. Once it fetches the queue information, the switch should insert the information as shown in the following structure and should pack this structure in the body field of the multipart reply message and send the reply message back to the controller. 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_QUEUE_DESC request. */
struct ofp_queue_desc {
uint32_t...