1# Copyright (c) 2017 Intel Corporation.
2# SPDX-License-Identifier: Apache-2.0
3
4menuconfig NET_LLDP
5	bool "Link Layer Discovery Protocol (LLDP)"
6	select NET_MGMT
7	select NET_MGMT_EVENT
8	help
9	  Enable Link Layer Discovery Protocol (LLDP) Transmit support.
10	  Please refer to IEEE Std 802.1AB for more information.
11
12if NET_LLDP
13
14module = NET_LLDP
15module-dep = NET_LOG
16module-str = Log level for LLDP
17module-help = Enables core LLDP code to output debug messages.
18source "subsys/net/Kconfig.template.log_config.net"
19
20#
21# LLDP Tx state machine config
22#
23config NET_LLDP_TX_INTERVAL
24	int "Time between transmissions in seconds (msgTxInterval)"
25	default 30
26	range 1 3600
27	help
28	  Interval between transmissions of LLDPDUs during normal
29	  (non-fast mode) transmission periods. For further information
30	  please refer to section 9.2.5.7 of the LLDP spec.
31
32config NET_LLDP_TX_HOLD
33	int "Multiplier of Tx Interval to result on Time to Live value"
34	default 4
35	range 1 100
36	help
37	  This value (msgTxHold) is used as a multiplier of
38	  CONFIG_NET_LLDP_TX_INTERVAL, to determine the value to be used
39	  as Time to Live in LLDP frames. For further information please
40	  refer to section 9.2.5.6 of the LLDP spec.
41
42#
43# End of LLDPDU TLV CONFIG
44#
45config NET_LLDP_END_LLDPDU_TLV_ENABLED
46	bool "End of LLDPDU TLV"
47	default y
48	help
49	  Tells whether LLDPDU packet will have marker at the end of the packet.
50
51#
52# CHASSIS ID TLV CONFIG
53#
54config NET_LLDP_CHASSIS_ID_SUBTYPE
55	int "Chassis ID TLV subtype"
56	default 4
57	range 1 7
58	help
59	  Chassis ID subtype options are defined below.
60	  Please refer to section 8.5.2.2 of the 802.1AB for more info.
61	  Subtype 1 = Chassis component
62	  Subtype 2 = Interface alias
63	  Subtype 3 = Port component
64	  Subtype 4 = MAC address
65	  Subtype 5 = Network address
66	  Subtype 6 = Interface name
67	  Subtype 7 = Locally assigned
68	  If subtype 4 is selected, MAC address, then configs
69	  NET_LLDP_CHASSIS_ID_MAC0 through NET_LLDP_CHASSIS_ID_MAC5 must
70	  be defined, otherwise you must use NET_LLDP_CHASSIS_ID instead.
71
72if NET_LLDP_CHASSIS_ID_SUBTYPE = 4
73config NET_LLDP_CHASSIS_ID_MAC0
74	hex "Chassis ID MAC Address Byte 0"
75	default 0x00
76	range 0 0xff
77	help
78	  Byte 0 of the MAC address.
79
80config NET_LLDP_CHASSIS_ID_MAC1
81	hex "Chassis ID MAC Address Byte 1"
82	default 0x00
83	range 0 0xff
84	help
85	  Byte 1 of the MAC address.
86
87config NET_LLDP_CHASSIS_ID_MAC2
88	hex "Chassis ID MAC Address Byte 2"
89	default 0x5e
90	range 0 0xff
91	help
92	  Byte 2 of the MAC address.
93
94config NET_LLDP_CHASSIS_ID_MAC3
95	hex "Chassis ID MAC Address Byte 3"
96	default 0x00
97	range 0 0xff
98	help
99	  Byte 3 of the MAC address.
100
101config NET_LLDP_CHASSIS_ID_MAC4
102	hex "Chassis ID MAC Address Byte 4"
103	default 0x53
104	range 0 0xff
105	help
106	  Byte 4 of the MAC address.
107
108config NET_LLDP_CHASSIS_ID_MAC5
109	hex "Chassis ID MAC Address Byte 5"
110	default 0x8d
111	range 0 0xff
112	help
113	  Byte 5 of the MAC address.
114endif
115
116config NET_LLDP_CHASSIS_ID
117	string "Chassis ID value"
118	default "CHASSIS_ID_PLACEHOLDER"
119	depends on NET_LLDP_CHASSIS_ID_SUBTYPE != 4
120
121#
122# PORT ID TLV CONFIG
123#
124config NET_LLDP_PORT_ID_SUBTYPE
125	int "Port ID TLV subtype"
126	default 5
127	range 1 7
128	help
129	  Port ID subtype options are defined below.
130	  Please refer to section 8.5.3.2 of the 802.1AB for more info.
131	  Subtype 1 = Interface alias
132	  Subtype 2 = Port component
133	  Subtype 3 = MAC address
134	  Subtype 4 = Network address
135	  Subtype 5 = Interface name
136	  Subtype 6 = Agent circuit ID
137	  Subtype 7 = Locally assigned
138	  If subtype 3 is selected (MAC address) then configs
139	  NET_LLDP_PORT_ID_MAC0 through NET_LLDP_PORT_ID_MAC5 must
140	  be defined, otherwise you must use NET_LLDP_PORT_ID instead.
141
142if NET_LLDP_PORT_ID_SUBTYPE = 3
143config NET_LLDP_PORT_ID_MAC0
144	hex "Chassis ID MAC Address Byte 0"
145	default 0x00
146	range 0 0xff
147	help
148	  Byte 0 of the MAC address.
149
150config NET_LLDP_PORT_ID_MAC1
151	hex "Chassis ID MAC Address Byte 1"
152	default 0x00
153	range 0 0xff
154	help
155	  Byte 1 of the MAC address.
156
157config NET_LLDP_PORT_ID_MAC2
158	hex "Chassis ID MAC Address Byte 2"
159	default 0x5e
160	range 0 0xff
161	help
162	  Byte 2 of the MAC address.
163
164config NET_LLDP_PORT_ID_MAC3
165	hex "Chassis ID MAC Address Byte 3"
166	default 0x00
167	range 0 0xff
168	help
169	  Byte 3 of the MAC address.
170
171config NET_LLDP_PORT_ID_MAC4
172	hex "Chassis ID MAC Address Byte 4"
173	default 0x53
174	range 0 0xff
175	help
176	  Byte 4 of the MAC address.
177
178config NET_LLDP_PORT_ID_MAC5
179	hex "Chassis ID MAC Address Byte 5"
180	default 0x8d
181	range 0 0xff
182	help
183	  Byte 5 of the MAC address.
184endif
185
186config NET_LLDP_PORT_ID
187	string "Port ID value"
188	default "PORT_ID_PLACEHOLDER"
189	depends on NET_LLDP_PORT_ID_SUBTYPE != 3
190
191endif # NET_LLDP
192