aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-lldp-types.yang
blob: cc7f9f57328075346d04bb4e9416a9ccd43b614d (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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
module openconfig-lldp-types {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/lldp/types";

  prefix "oc-lldp-types";

  // import some basic types
  import openconfig-extensions { prefix oc-ext; }


  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    www.openconfig.net";

  description
    "This module defines types related to the LLDP protocol model.";

  oc-ext:openconfig-version "0.1.0";

  revision "2016-05-16" {
    description
      "Initial public revision";
    reference "0.1.0";
  }


  // identity statements

  identity LLDP_SYSTEM_CAPABILITY {
    description
      "Base identity for standard LLDP system capabilities.
      The system capabilities field contains a bit-map of the
      capabilities that define the primary function(s) of
      the system. A system may advertise more than one capability.";
    reference
      "Table 8-4 System Capabilities, IEEE 802.1AB-2009";
  }

  identity OTHER {
    base LLDP_SYSTEM_CAPABILITY;
    description
      "Other capability not specified; bit position 1";
  }

  identity REPEATER {
    base LLDP_SYSTEM_CAPABILITY;
    description
      "Repeater capability; bit position 2";
    reference
      "IETF RFC 2108";
  }

  identity MAC_BRIDGE {
    base LLDP_SYSTEM_CAPABILITY;
    description
      "MAC bridge capability; bit position 3";
    reference
      "IEEE Std 802.1D";
  }

  identity WLAN_ACCESS_POINT {
    base LLDP_SYSTEM_CAPABILITY;
    description
      "WLAN access point capability; bit position 4";
    reference
      "IEEE Std 802.11 MIB";
  }

  identity ROUTER {
    base LLDP_SYSTEM_CAPABILITY;
    description
      "Router; bit position 5";
    reference
      "IETF RFC 1812";
  }

  identity TELEPHONE {
    base LLDP_SYSTEM_CAPABILITY;
    description
      "Telephone capability; bit position 6";
    reference
      "IETF RFC 4293";
  }

  identity DOCSIS_CABLE_DEVICE {
    base LLDP_SYSTEM_CAPABILITY;
    description
      "DOCSIS cable device; bit position 7";
    reference
      "IETF RFC 4639 and IETF RFC 4546";
  }

  identity STATION_ONLY {
    base LLDP_SYSTEM_CAPABILITY;
    description
      "Station only capability, for devices that implement only an
      end station capability, and for which none of the other
      capabilities apply; bit position 8";
    reference
      "IETF RFC 4293";
  }

  identity C_VLAN {
    base LLDP_SYSTEM_CAPABILITY;
    description
      "C-VLAN component of a VLAN Bridge; bit position 9";
    reference
      "IEEE Std 802.1Q";
  }

  identity S_VLAN {
    base LLDP_SYSTEM_CAPABILITY;
    description
      "S-VLAN component of a VLAN Bridge; bit position 10";
    reference
      "IEEE Std 802.1Q";
  }

  identity TWO_PORT_MAC_RELAY {
    base LLDP_SYSTEM_CAPABILITY;
    description
      "Two-port MAC Relay (TPMR) capability; bit position 11";
    reference
      "IEEE Std 802.1Q";
  }

  identity LLDP_TLV {
    description
      "A base identity which describes the TLVs in LLDP";
  }

  identity CHASSIS_ID {
    base LLDP_TLV;
    description
      "The chassis identifier of the device associated with
      the transmitting LLDP agent";
    reference "IEEE Std 802.1AB";
  }

  identity PORT_ID {
    base LLDP_TLV;
    description
      "The port identifier associated with the interface
      on with the LLDP agent is transmitting";
    reference "IEEE Std 802.1AB";
  }

  identity PORT_DESCRIPTION {
    base LLDP_TLV;
    description
      "The description of the port that is associated with
      the interface on which the LLDP agent is transmitting";
    reference "IEEE Std 802.1AB";
  }

  identity SYSTEM_NAME {
    base LLDP_TLV;
    description
      "The assigned name (sysName or hostname) of the device
      which is transmitting the LLDP PDU";
    reference "IEEE Std 802.1AB";
  }

  identity SYSTEM_DESCRIPTION {
    base LLDP_TLV;
    description
      "The description (sysDescr) of the device which is
      transmitting the LLDP PDU";
    reference "IEEE Std 802.1AB";
  }

  identity SYSTEM_CAPABILITIES {
    base LLDP_TLV;
    description
      "The primary functions of the device transmitting the
      LLDP PDU and their administrative status";
    reference "IEEE Std 802.1AB";
  }

  identity MANAGEMENT_ADDRESS {
    base LLDP_TLV;
    description
      "The address associated with the device transmitting the
      LLDP PDU which can be used for higher-layer network
      management";
    reference "IEEE Std 802.1AB";
  }

  // typedef statements

  typedef chassis-id-type {
    type enumeration {
      enum CHASSIS_COMPONENT {
        description
          "Chassis identifier based on the value of entPhysicalAlias
          object defined in IETF RFC 2737";
      }
      enum INTERFACE_ALIAS {
        description
          "Chassis identifier based on the value of ifAlias object
          defined in IETF RFC 2863";
      }
      enum PORT_COMPONENT {
        description
          "Chassis identifier based on the value of entPhysicalAlias
          object defined in IETF RFC 2737 for a port or backplane
          component";
      }
      enum MAC_ADDRESS {
        description
          "Chassis identifier based on the value of a unicast source
          address (encoded in network byte order and IEEE 802.3
          canonical bit order), of a port on the containing chassis
          as defined in IEEE Std 802-2001";
      }
      enum NETWORK_ADDRESS {
        description
          "Chassis identifier based on a network address,
          associated with a particular chassis.  The encoded address
          is composed of two fields.  The first field is a single
          octet, representing the IANA AddressFamilyNumbers value
          for the specific address type, and the second field is the
          network address value";
      }
      enum INTERFACE_NAME {
        description
          "Chassis identifier based on the name of the interface,
          e.g., the value of ifName object defined in IETF RFC 2863";
      }
      enum LOCAL {
        description
          "Chassis identifier based on a locally defined value";
      }
    }
    description
      "Type definition with enumerations describing the source of
      the chassis identifier";
    reference
      "IEEE 802.1AB LLDP MIB";
  }

  typedef port-id-type {
    type enumeration {
      enum INTERFACE_ALIAS {
        description
          "Chassis identifier based on the value of ifAlias object
          defined in IETF RFC 2863";
      }
      enum PORT_COMPONENT {
        description
          "Port identifier based on the value of entPhysicalAlias
          object defined in IETF RFC 2737 for a port component";
      }
      enum MAC_ADDRESS {
        description
          "Port identifier based on the value of a unicast source
          address (encoded in network byte order and IEEE 802.3
          canonical bit order) associated with a port";
      }
      enum NETWORK_ADDRESS {
        description
          "Port identifier based on a network address,
          associated with a particular port";
      }
      enum INTERFACE_NAME {
        description
          "Port identifier based on the name of the interface,
          e.g., the value of ifName object defined in IETF RFC 2863";
      }
      enum AGENT_CIRCUIT_ID {
        description
          "Port identifer based on the circuit id in the DHCP
          relay agent information option as defined in IETF
          RFC 3046";
      }
      enum LOCAL {
        description
          "Port identifier based on a locally defined alphanumeric
          string";
      }
    }
    description
      "Type definition with enumerations describing the basis of
      the port identifier";
    reference
      "IEEE 802.1AB LLDP MIB";
  }


}