mirror of
https://github.com/openvswitch/ovs
synced 2025-10-15 14:17:18 +00:00
This commit provides the initial delivery of support for the Auto-Attach standard to Open vSwitch. This standard describes a compact method of using IEEE 802.1AB Link Layer Discovery Protocol (LLDP) with a IEEE 802.1aq Shortest Path Bridging (SPB) network to automatically attach network devices not supporting IEEE 802.1ah to individual services in a SPB network. Specifically this commit adds base LLDP support to OVS along with the LLDP extension required to support Auto-Attach. The base LLDP code within this commit is adapted from the open source LLDPD project headed by Vincent Bernat. This base code is augmented with OVS specific logic which integrates LLDP into OVS and which extends LLDP to support Auto-Attach. The required build system changes are provided to include this new Auto-Attach feature. This is the first of a series of commits. Subsequent commits will be provided to complete the task of adding Auto-Attach to OVS. Signed-off-by: Ludovic Beliveau <ludovic.beliveau@windriver.com> Signed-off-by: Dennis Flynn <drflynn@avaya.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
80 lines
2.8 KiB
C
80 lines
2.8 KiB
C
/* -*- mode: c; c-file-style: "openbsd" -*- */
|
|
/*
|
|
* Copyright (c) 2012 Vincent Bernat <bernat@luffy.cx>
|
|
*
|
|
* Permission to use, copy, modify, and/or distribute this software for any
|
|
* purpose with or without fee is hereby granted, provided that the above
|
|
* copyright notice and this permission notice appear in all copies.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
|
|
#ifndef _LLDP_TLV_H
|
|
#define _LLDP_TLV_H
|
|
|
|
#define LLDP_MULTICAST_ADDR { \
|
|
0x01, 0x80, 0xc2, 0x00, 0x00, 0x0e \
|
|
}
|
|
|
|
#define LLDP_TLV_END 0
|
|
#define LLDP_TLV_CHASSIS_ID 1
|
|
#define LLDP_TLV_PORT_ID 2
|
|
#define LLDP_TLV_TTL 3
|
|
#define LLDP_TLV_PORT_DESCR 4
|
|
#define LLDP_TLV_SYSTEM_NAME 5
|
|
#define LLDP_TLV_SYSTEM_DESCR 6
|
|
#define LLDP_TLV_SYSTEM_CAP 7
|
|
#define LLDP_TLV_MGMT_ADDR 8
|
|
#define LLDP_TLV_ORG 127
|
|
|
|
#define LLDP_TLV_ORG_DOT1 {0x00, 0x80, 0xc2}
|
|
#define LLDP_TLV_ORG_DOT3 {0x00, 0x12, 0x0f}
|
|
#define LLDP_TLV_ORG_MED {0x00, 0x12, 0xbb}
|
|
#define LLDP_TLV_ORG_AVAYA {0x00, 0x40, 0x0D}
|
|
#define LLDP_TLV_ORG_DCBX {0x00, 0x1b, 0x21}
|
|
|
|
#define LLDP_TLV_DOT1_PVID 1
|
|
#define LLDP_TLV_DOT1_PPVID 2
|
|
#define LLDP_TLV_DOT1_VLANNAME 3
|
|
#define LLDP_TLV_DOT1_PI 4
|
|
|
|
#define LLDP_TLV_DOT3_MAC 1
|
|
#define LLDP_TLV_DOT3_POWER 2
|
|
#define LLDP_TLV_DOT3_LA 3
|
|
#define LLDP_TLV_DOT3_MFS 4
|
|
|
|
#define LLDP_TLV_MED_CAP 1
|
|
#define LLDP_TLV_MED_POLICY 2
|
|
#define LLDP_TLV_MED_LOCATION 3
|
|
#define LLDP_TLV_MED_MDI 4
|
|
#define LLDP_TLV_MED_IV_HW 5
|
|
#define LLDP_TLV_MED_IV_FW 6
|
|
#define LLDP_TLV_MED_IV_SW 7
|
|
#define LLDP_TLV_MED_IV_SN 8
|
|
#define LLDP_TLV_MED_IV_MANUF 9
|
|
#define LLDP_TLV_MED_IV_MODEL 10
|
|
#define LLDP_TLV_MED_IV_ASSET 11
|
|
|
|
#define LLDP_TLV_AA_ELEMENT_SUBTYPE 0x08
|
|
#define LLDP_TLV_AA_ISID_VLAN_ASGNS_SUBTYPE 0x09
|
|
#define LLDP_TLV_AA_ISID_VLAN_DIGEST_LENGTH 32
|
|
#define LLDP_TLV_AA_ELEM_TYPE_UNKNOWN 1
|
|
#define LLDP_TLV_AA_ELEM_TYPE_SERVER 2
|
|
#define LLDP_TLV_AA_ELEM_TYPE_PROXY 3
|
|
#define LLDP_TLV_AA_ELEM_TYPE_UNTAG_CLIENT 4
|
|
#define LLDP_TLV_AA_ELEM_TYPE_TAG_CLIENT 5
|
|
#define LLDP_TLV_AA_ELEM_TYPE_SERV_NO_AUTH 6
|
|
#define LLDP_TLV_AA_ELEM_TYPE_PROXY_NO_AUTH 7
|
|
#define LLDP_TLV_AA_ELEM_CONN_TYPE_SINGLE 0
|
|
#define LLDP_TLV_AA_ELEM_CONN_TYPE_MLT 1
|
|
#define LLDP_TLV_AA_ELEM_CONN_TYPE_SLT 2
|
|
#define LLDP_TLV_AA_ELEM_CONN_TYPE_SMLT 3
|
|
|
|
#endif
|