References: * http://www.rfc-editor.org/rfc/rfc5415.txt The CAPWAP header layout is summarized as follows: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |CAPWAP Preamble| HLEN | RID | WBID |T|F|L|W|M|K|Flags| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Fragment ID | Frag Offset |Rsvd | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | (optional) Radio MAC Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | (optional) Wireless Specific Information | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Payload .... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The spec defines an optional Wireless Specific Information field which can be used to pass arbitrary data in the encapsulation layer: Wireless Specific Information: This optional field may be used to carry per-packet information. This field is only present if the 'W' bit is set. The WBID field in the CAPWAP Header is used to identify the format of the WSI optional field. The HLEN field assumes 4-byte alignment, and this field MUST be padded with zeroes (0x00) if it is not 4-byte aligned. The Wireless-Specific Information field uses the following format: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length | Data... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Length: The 8-bit field contains the length of the data field, with a maximum size of 255. Data: Wireless-specific information, defined by the wireless- specific binding specified in the CAPWAP Header's WBID field. WBID: A 5-bit field that is the wireless binding identifier. The identifier will indicate the type of wireless packet associated with the radio. The following values are defined: 0 - Reserved 1 - IEEE 802.11 2 - Reserved 3 - EPCGlobal [EPCGlobal] When Open vSwitch uses this field, it writes the value: 30 - Open vSwitch data Open vSwitch can make use of this field to pass additional packet routing information. When needed, it sets the 'W' bit to indicates the WSI field is added, and fills the field as follows: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | WSI_LEN |K| Flags | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | (optional) 64bit Tunnel Key | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ K - flag bit to identify presence of a 64bit tunnel key. Adding WSI fields: Fields must be written and read in consitent order. New fields may be added, but the existing fields always come first.