Book Image

OpenFlow Cookbook

Book Image

OpenFlow Cookbook

Overview of this book

Table of Contents (17 chapters)
16
Index

Adding messages to a bundle

When the controller wants to add a new OpenFlow message to a bundle, the controller should send an OFPT_BUNDLE_ADD_MESSAGE message.

Getting started

The controller should have created the bundle as described in the Creation of a bundle recipe before sending the bundle add message to a switch.

How to do it...

The OFPT_BUNDLE_ADD_MESSAGE message contains an OpenFlow message whose operation needs to be executed/performed by the switch in a bundled fashion. The message format that should be used by the controller to add an OpenFlow message to a bundle is described as follows:

/* Message structure for OFPT_BUNDLE_ADD_MESSAGE.
* Adding a message in a bundle is done with. */
struct ofp_bundle_add_msg {
struct ofp_header header;
uint32_t bundle_id;        /* Identify the bundle. */
uint16_t pad;              /* Align to 64 bits. */
uint16_t flags;            /* Bitmap of OFPBF_* flags. */
struct ofp_header message; /* Message added to the bundle. */
/* If there is one property...