summaryrefslogtreecommitdiffstats
path: root/src/daemon/lldp-tlv.h
blob: a9bf7cf742d490d23199cac9afd1a50f152e5471 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* -*- 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_ADDR_NEAREST_BRIDGE       \
  {                                    \
    0x01, 0x80, 0xc2, 0x00, 0x00, 0x0e \
  }
#define LLDP_ADDR_NEAREST_NONTPMR_BRIDGE \
  {                                      \
    0x01, 0x80, 0xc2, 0x00, 0x00, 0x03   \
  }
#define LLDP_ADDR_NEAREST_CUSTOMER_BRIDGE \
  {                                       \
    0x01, 0x80, 0xc2, 0x00, 0x00, 0x00    \
  }

#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_DOT1 \
  {                       \
    0x00, 0x80, 0xc2      \
  }
#define LLDP_TLV_ORG_DOT3 \
  {                       \
    0x00, 0x12, 0x0f      \
  }
#define LLDP_TLV_ORG_MED \
  {                      \
    0x00, 0x12, 0xbb     \
  }
#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

#endif