]> git.ipfire.org Git - thirdparty/lldpd.git/blob - src/client/conf-lldp.c
client: add show interfaces command (#240)
[thirdparty/lldpd.git] / src / client / conf-lldp.c
1 /* -*- mode: c; c-file-style: "openbsd" -*- */
2 /*
3 * Copyright (c) 2013 Vincent Bernat <bernat@luffy.cx>
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18 #include <unistd.h>
19 #include <string.h>
20
21 #include "client.h"
22 #include "../log.h"
23
24 static int
25 cmd_txdelay(struct lldpctl_conn_t *conn, struct writer *w,
26 struct cmd_env *env, void *arg)
27 {
28 log_debug("lldpctl", "set transmit delay");
29
30 lldpctl_atom_t *config = lldpctl_get_configuration(conn);
31 if (config == NULL) {
32 log_warnx("lldpctl", "unable to get configuration from lldpd. %s",
33 lldpctl_last_strerror(conn));
34 return 0;
35 }
36 if (lldpctl_atom_set_str(config,
37 lldpctl_k_config_tx_interval, cmdenv_get(env, "tx-interval")) == NULL) {
38 log_warnx("lldpctl", "unable to set transmit delay. %s",
39 lldpctl_last_strerror(conn));
40 lldpctl_atom_dec_ref(config);
41 return 0;
42 }
43 log_info("lldpctl", "transmit delay set to new value");
44 lldpctl_atom_dec_ref(config);
45 return 1;
46 }
47
48 static int
49 cmd_txhold(struct lldpctl_conn_t *conn, struct writer *w,
50 struct cmd_env *env, void *arg)
51 {
52 log_debug("lldpctl", "set transmit hold");
53
54 lldpctl_atom_t *config = lldpctl_get_configuration(conn);
55 if (config == NULL) {
56 log_warnx("lldpctl", "unable to get configuration from lldpd. %s",
57 lldpctl_last_strerror(conn));
58 return 0;
59 }
60 if (lldpctl_atom_set_str(config,
61 lldpctl_k_config_tx_hold, cmdenv_get(env, "tx-hold")) == NULL) {
62 log_warnx("lldpctl", "unable to set transmit hold. %s",
63 lldpctl_last_strerror(conn));
64 lldpctl_atom_dec_ref(config);
65 return 0;
66 }
67 log_info("lldpctl", "transmit hold set to new value %s", cmdenv_get(env, "tx-hold"));
68 lldpctl_atom_dec_ref(config);
69 return 1;
70 }
71
72 static int
73 cmd_status(struct lldpctl_conn_t *conn, struct writer *w,
74 struct cmd_env *env, void *arg)
75 {
76 lldpctl_atom_t *port;
77 const char *name;
78 const char *status = cmdenv_get(env, "status");
79
80 log_debug("lldpctl", "lldp administrative port status set to '%s'", status);
81
82 if (!status || !strlen(status)) {
83 log_warnx("lldpctl", "no status specified");
84 return 0;
85 }
86
87 while ((port = cmd_iterate_on_ports(conn, env, &name))) {
88 if (lldpctl_atom_set_str(port, lldpctl_k_port_status, status) == NULL) {
89 log_warnx("lldpctl", "unable to set LLDP status for %s."
90 " %s", name, lldpctl_last_strerror(conn));
91 }
92 }
93
94 return 1;
95 }
96
97 static int
98 cmd_agent_type(struct lldpctl_conn_t *conn, struct writer *w,
99 struct cmd_env *env, void *arg)
100 {
101 const char *str = arg;
102 int value = -1;
103
104 log_debug("lldpctl", "set agent type to '%s'", str);
105
106 lldpctl_atom_t *config = lldpctl_get_configuration(conn);
107 if (config == NULL) {
108 log_warnx("lldpctl",
109 "unable to get configuration from lldpd. %s",
110 lldpctl_last_strerror(conn));
111 return 0;
112 }
113
114 for (lldpctl_map_t *b_map =
115 lldpctl_key_get_map(lldpctl_k_config_lldp_agent_type);
116 b_map->string; b_map++) {
117 if (!strcmp(b_map->string, str)) {
118 value = b_map->value;
119 break;
120 }
121 }
122
123 if (value == -1) {
124 log_warnx("lldpctl", "invalid value");
125 lldpctl_atom_dec_ref(config);
126 return 0;
127 }
128
129 if (lldpctl_atom_set_int(config,
130 lldpctl_k_config_lldp_agent_type, value) == NULL) {
131 log_warnx("lldpctl", "unable to set LLDP agent type."
132 " %s", lldpctl_last_strerror(conn));
133 lldpctl_atom_dec_ref(config);
134 return 0;
135 }
136
137 log_info("lldpctl", "agent type set to new value : %s", str);
138 lldpctl_atom_dec_ref(config);
139
140 return 1;
141 }
142
143 static int
144 cmd_portid_type_local(struct lldpctl_conn_t *conn, struct writer *w,
145 struct cmd_env *env, void *arg)
146 {
147 lldpctl_atom_t *port;
148 const char *name;
149 const char *id = cmdenv_get(env, "port-id");
150 const char *descr = cmdenv_get(env, "port-descr");
151
152 log_debug("lldpctl", "lldp PortID TLV Subtype Local port-id '%s' port-descr '%s'", id, descr);
153
154 if (!id || !strlen(id)) {
155 log_warnx("lldpctl", "no id specified");
156 return 0;
157 }
158
159 while ((port = cmd_iterate_on_ports(conn, env, &name))) {
160 if (lldpctl_atom_set_str(port, lldpctl_k_port_id, id) == NULL) {
161 log_warnx("lldpctl", "unable to set LLDP PortID for %s."
162 " %s", name, lldpctl_last_strerror(conn));
163 }
164 if (descr && lldpctl_atom_set_str(port, lldpctl_k_port_descr, descr) == NULL) {
165 log_warnx("lldpctl", "unable to set LLDP Port Description for %s."
166 " %s", name, lldpctl_last_strerror(conn));
167 }
168 }
169
170 return 1;
171 }
172
173 static int
174 cmd_portid_type(struct lldpctl_conn_t *conn, struct writer *w,
175 struct cmd_env *env, void *arg)
176 {
177 char *value_str;
178 int value = -1;
179
180 log_debug("lldpctl", "lldp PortID TLV Subtype");
181
182 lldpctl_atom_t *config = lldpctl_get_configuration(conn);
183 if (config == NULL) {
184 log_warnx("lldpctl",
185 "unable to get configuration from lldpd. %s",
186 lldpctl_last_strerror(conn));
187 return 0;
188 }
189
190 value_str = arg;
191 for (lldpctl_map_t *b_map =
192 lldpctl_key_get_map(lldpctl_k_config_lldp_portid_type);
193 b_map->string; b_map++) {
194 if (!strcmp(b_map->string, value_str)) {
195 value = b_map->value;
196 break;
197 }
198 }
199
200 if (value == -1) {
201 log_warnx("lldpctl", "invalid value");
202 lldpctl_atom_dec_ref(config);
203 return 0;
204 }
205
206 if (lldpctl_atom_set_int(config,
207 lldpctl_k_config_lldp_portid_type, value) == NULL) {
208 log_warnx("lldpctl", "unable to set LLDP PortID type."
209 " %s", lldpctl_last_strerror(conn));
210 lldpctl_atom_dec_ref(config);
211 return 0;
212 }
213
214 log_info("lldpctl", "LLDP PortID TLV type set to new value : %s", value_str);
215 lldpctl_atom_dec_ref(config);
216
217 return 1;
218 }
219
220 static int
221 cmd_chassis_cap_advertise(struct lldpctl_conn_t *conn, struct writer *w,
222 struct cmd_env *env, void *arg)
223 {
224 log_debug("lldpctl", "lldp capabilities-advertisements %s", arg?"enable":"disable");
225
226 lldpctl_atom_t *config = lldpctl_get_configuration(conn);
227 if (config == NULL) {
228 log_warnx("lldpctl", "unable to get configuration from lldpd. %s",
229 lldpctl_last_strerror(conn));
230 return 0;
231 }
232 if (lldpctl_atom_set_int(config,
233 lldpctl_k_config_chassis_cap_advertise,
234 arg?1:0) == NULL) {
235 log_warnx("lldpctl", "unable to %s chassis capabilities advertisement: %s",
236 arg?"enable":"disable",
237 lldpctl_last_strerror(conn));
238 lldpctl_atom_dec_ref(config);
239 return 0;
240 }
241 log_info("lldpctl", "chassis capabilities advertisement %s",
242 arg?"enabled":"disabled");
243 lldpctl_atom_dec_ref(config);
244 return 1;
245 }
246
247 /* FIXME: see about compressing this with other functions */
248 static int
249 cmd_chassis_mgmt_advertise(struct lldpctl_conn_t *conn, struct writer *w,
250 struct cmd_env *env, void *arg)
251 {
252 log_debug("lldpctl", "lldp management-addresses-advertisements %s", arg?"enable":"disable");
253
254 lldpctl_atom_t *config = lldpctl_get_configuration(conn);
255 if (config == NULL) {
256 log_warnx("lldpctl", "unable to get configuration from lldpd. %s",
257 lldpctl_last_strerror(conn));
258 return 0;
259 }
260 if (lldpctl_atom_set_int(config,
261 lldpctl_k_config_chassis_mgmt_advertise,
262 arg?1:0) == NULL) {
263 log_warnx("lldpctl", "unable to %s management addresses advertisement: %s",
264 arg?"enable":"disable",
265 lldpctl_last_strerror(conn));
266 lldpctl_atom_dec_ref(config);
267 return 0;
268 }
269 log_info("lldpctl", "management addresses advertisement %s",
270 arg?"enabled":"disabled");
271 lldpctl_atom_dec_ref(config);
272 return 1;
273 }
274
275 #ifdef ENABLE_CUSTOM
276 static int
277 cmd_custom_tlv_set(struct lldpctl_conn_t *conn, struct writer *w,
278 struct cmd_env *env, void *arg)
279 {
280 lldpctl_atom_t *port;
281 const char *s;
282 const char *name;
283 uint8_t oui[LLDP_TLV_ORG_OUI_LEN];
284 uint8_t oui_info[LLDP_TLV_ORG_OUI_INFO_MAXLEN];
285 int oui_info_len = 0;
286 uint16_t subtype = 0;
287 char *op = "add";
288
289 if (!arg || !strcmp(arg, "remove"))
290 op = "remove";
291
292 log_debug("lldpctl", "lldp custom-tlv(s) %s", op);
293
294 if (!arg)
295 goto set;
296
297 s = cmdenv_get(env, "oui");
298 if (!s || (
299 sscanf(s, "%02hhx,%02hhx,%02hhx", &oui[0], &oui[1], &oui[2]) != 3 &&
300 sscanf(s, "%02hhX,%02hhX,%02hhX", &oui[0], &oui[1], &oui[2]) != 3) ) {
301 log_warnx("lldpctl", "invalid OUI value '%s'", s);
302 return 0;
303 }
304
305 s = cmdenv_get(env, "subtype");
306 if (!s) {
307 log_warnx("lldpctl", "no subtype specified");
308 return 0;
309 } else {
310 const char *errstr;
311 subtype = strtonum(s, 0, 255, &errstr);
312 if (errstr != NULL) {
313 log_warnx("lldpctl", "invalid subtype value `%s': %s",
314 s, errstr);
315 return 0;
316 }
317 }
318
319 s = cmdenv_get(env, "oui-info");
320 /* This info is optional */
321 if (s) {
322 const char delim[] = ",";
323 char *s_copy = strdup(s);
324 char *token = strtok(s_copy, delim);
325 while (token != NULL) {
326 if (sscanf(token, "%02hhx", &oui_info[oui_info_len]) == 1 ||
327 sscanf(token, "%02hhX", &oui_info[oui_info_len]) == 1)
328 oui_info_len++;
329 if (oui_info_len >= sizeof(oui_info))
330 break;
331 token = strtok(NULL, delim);
332 }
333 free(s_copy);
334 }
335
336 s = cmdenv_get(env, "replace");
337 /* This info is optional */
338 if (s) op = "replace";
339
340 set:
341 while ((port = cmd_iterate_on_ports(conn, env, &name))) {
342 lldpctl_atom_t *custom_tlvs;
343 if (!arg) {
344 lldpctl_atom_set(port, lldpctl_k_custom_tlvs_clear, NULL);
345 } else if (!(custom_tlvs = lldpctl_atom_get(port, lldpctl_k_custom_tlvs))) {
346 log_warnx("lldpctl", "unable to get custom TLVs for port %s", name);
347 } else {
348 lldpctl_atom_t *tlv = lldpctl_atom_create(custom_tlvs);
349 if (!tlv) {
350 log_warnx("lldpctl", "unable to create new custom TLV for port %s",
351 name);
352 } else {
353 /* Configure custom TLV */
354 lldpctl_atom_set_buffer(tlv, lldpctl_k_custom_tlv_oui, oui, sizeof(oui));
355 lldpctl_atom_set_int(tlv, lldpctl_k_custom_tlv_oui_subtype, subtype);
356 lldpctl_atom_set_buffer(tlv, lldpctl_k_custom_tlv_oui_info_string, oui_info, oui_info_len);
357 lldpctl_atom_set_str(tlv, lldpctl_k_custom_tlv_op, op);
358
359 /* Assign it to port */
360 lldpctl_atom_set(port, lldpctl_k_custom_tlv, tlv);
361
362 lldpctl_atom_dec_ref(tlv);
363 }
364 lldpctl_atom_dec_ref(custom_tlvs);
365 }
366 }
367
368 return 1;
369 }
370
371 static int
372 cmd_check_no_add_env(struct cmd_env *env, void *arg)
373 {
374 const char *what = arg;
375 if (cmdenv_get(env, "add")) return 0;
376 if (cmdenv_get(env, what)) return 0;
377 return 1;
378 }
379
380 static int
381 cmd_check_no_replace_env(struct cmd_env *env, void *arg)
382 {
383 const char *what = arg;
384 if (cmdenv_get(env, "replace")) return 0;
385 if (cmdenv_get(env, what)) return 0;
386 return 1;
387 }
388
389 void
390 register_commands_configure_lldp_custom_tlvs(struct cmd_node *configure_lldp,
391 struct cmd_node *unconfigure_lldp)
392 {
393 struct cmd_node *configure_custom_tlvs;
394 struct cmd_node *unconfigure_custom_tlvs;
395 struct cmd_node *configure_custom_tlvs_basic;
396 struct cmd_node *unconfigure_custom_tlvs_basic;
397
398 configure_custom_tlvs =
399 commands_new(configure_lldp,
400 "custom-tlv",
401 "Add custom TLV(s) to be broadcast on ports",
402 NULL, NULL, NULL);
403
404 unconfigure_custom_tlvs =
405 commands_new(unconfigure_lldp,
406 "custom-tlv",
407 "Remove ALL custom TLV(s)",
408 NULL, NULL, NULL);
409
410 commands_new(unconfigure_custom_tlvs,
411 NEWLINE, "Remove ALL custom TLV",
412 NULL, cmd_custom_tlv_set, NULL);
413
414 commands_new(configure_custom_tlvs,
415 "add", "Add custom TLV",
416 cmd_check_no_replace_env, cmd_store_env_and_pop, "add");
417 commands_new(configure_custom_tlvs,
418 "replace", "Replace custom TLV",
419 cmd_check_no_add_env, cmd_store_env_and_pop, "replace");
420
421 /* Basic form: 'configure lldp custom-tlv oui 11,22,33 subtype 44' */
422 configure_custom_tlvs_basic =
423 commands_new(
424 commands_new(
425 commands_new(
426 commands_new(configure_custom_tlvs,
427 "oui", "Organizationally Unique Identifier",
428 NULL, NULL, NULL),
429 NULL, "Organizationally Unique Identifier",
430 NULL, cmd_store_env_value, "oui"),
431 "subtype", "Organizationally Defined Subtype",
432 NULL, NULL, NULL),
433 NULL, "Organizationally Defined Subtype",
434 NULL, cmd_store_env_value, "subtype");
435
436 commands_new(configure_custom_tlvs_basic,
437 NEWLINE, "Add custom TLV(s) to be broadcast on ports",
438 NULL, cmd_custom_tlv_set, "enable");
439
440 /* Basic form: 'unconfigure lldp custom-tlv oui 11,22,33 subtype 44' */
441 unconfigure_custom_tlvs_basic =
442 commands_new(
443 commands_new(
444 commands_new(
445 commands_new(unconfigure_custom_tlvs,
446 "oui", "Organizationally Unique Identifier",
447 NULL, NULL, NULL),
448 NULL, "Organizationally Unique Identifier",
449 NULL, cmd_store_env_value, "oui"),
450 "subtype", "Organizationally Defined Subtype",
451 NULL, NULL, NULL),
452 NULL, "Organizationally Defined Subtype",
453 NULL, cmd_store_env_value, "subtype");
454
455 commands_new(unconfigure_custom_tlvs_basic,
456 NEWLINE, "Remove specific custom TLV",
457 NULL, cmd_custom_tlv_set, "remove");
458
459 /* Extended form: 'configure custom-tlv lldp oui 11,22,33 subtype 44 oui-info 55,66,77,...' */
460 commands_new(
461 commands_new(
462 commands_new(configure_custom_tlvs_basic,
463 "oui-info", "Organizationally Unique Identifier",
464 NULL, NULL, NULL),
465 NULL, "OUI Info String",
466 NULL, cmd_store_env_value, "oui-info"),
467 NEWLINE, "Add custom TLV(s) to be broadcast on ports",
468 NULL, cmd_custom_tlv_set, "enable");
469 }
470 #endif /* ENABLE_CUSTOM */
471
472 static int
473 cmd_store_status_env_value(struct lldpctl_conn_t *conn, struct writer *w,
474 struct cmd_env *env, void *value)
475 {
476 return cmd_store_something_env_value("status", env, value);
477 }
478
479 /**
480 * Register `configure lldp` commands.
481 *
482 * Those are the commands that are related to the LLDP protocol but not
483 * Dot1/Dot3/MED. Commands not related to LLDP should go in system instead.
484 */
485 void
486 register_commands_configure_lldp(struct cmd_node *configure,
487 struct cmd_node *unconfigure)
488 {
489 struct cmd_node *configure_lldp = commands_new(
490 configure,
491 "lldp", "LLDP configuration",
492 NULL, NULL, NULL);
493 struct cmd_node *unconfigure_lldp = commands_new(
494 unconfigure,
495 "lldp", "LLDP configuration",
496 NULL, NULL, NULL);
497
498 commands_new(
499 commands_new(
500 commands_new(configure_lldp,
501 "tx-interval", "Set LLDP transmit delay",
502 cmd_check_no_env, NULL, "ports"),
503 NULL, "LLDP transmit delay in seconds",
504 NULL, cmd_store_env_value, "tx-interval"),
505 NEWLINE, "Set LLDP transmit delay",
506 NULL, cmd_txdelay, NULL);
507
508 commands_new(
509 commands_new(
510 commands_new(configure_lldp,
511 "tx-hold", "Set LLDP transmit hold",
512 cmd_check_no_env, NULL, "ports"),
513 NULL, "LLDP transmit hold in seconds",
514 NULL, cmd_store_env_value, "tx-hold"),
515 NEWLINE, "Set LLDP transmit hold",
516 NULL, cmd_txhold, NULL);
517
518 struct cmd_node *status = commands_new(configure_lldp,
519 "status", "Set administrative status",
520 NULL, NULL, NULL);
521
522 for (lldpctl_map_t *status_map =
523 lldpctl_key_get_map(lldpctl_k_port_status);
524 status_map->string;
525 status_map++) {
526 const char *tag = strdup(totag(status_map->string));
527 SUPPRESS_LEAK(tag);
528 commands_new(
529 commands_new(status,
530 tag,
531 status_map->string,
532 NULL, cmd_store_status_env_value, status_map->string),
533 NEWLINE, "Set port administrative status",
534 NULL, cmd_status, NULL);
535 }
536
537 /* Configure the various agent type we can configure. */
538 struct cmd_node *configure_lldp_agent_type = commands_new(
539 configure_lldp,
540 "agent-type",
541 "LLDP agent type",
542 NULL, NULL, NULL);
543 for (lldpctl_map_t *b_map =
544 lldpctl_key_get_map(lldpctl_k_config_lldp_agent_type);
545 b_map->string; b_map++) {
546 const char *tag = strdup(totag(b_map->string));
547 SUPPRESS_LEAK(tag);
548 commands_new(
549 commands_new(configure_lldp_agent_type,
550 tag,
551 b_map->string,
552 NULL, NULL, NULL),
553 NEWLINE, "Set LLDP agent type",
554 NULL, cmd_agent_type, b_map->string);
555 }
556
557 /* Now handle the various portid subtypes we can configure. */
558 struct cmd_node *configure_lldp_portid_type = commands_new(
559 configure_lldp,
560 "portidsubtype", "LLDP PortID TLV Subtype",
561 NULL, NULL, NULL);
562
563 for (lldpctl_map_t *b_map =
564 lldpctl_key_get_map(lldpctl_k_config_lldp_portid_type);
565 b_map->string; b_map++) {
566 if (!strcmp(b_map->string, "ifname")) {
567 commands_new(
568 commands_new(configure_lldp_portid_type,
569 b_map->string, "Interface Name",
570 cmd_check_no_env, NULL, "ports"),
571 NEWLINE, NULL,
572 NULL, cmd_portid_type,
573 b_map->string);
574 } else if (!strcmp(b_map->string, "local")) {
575 struct cmd_node *port_id = commands_new(
576 commands_new(configure_lldp_portid_type,
577 b_map->string, "Local",
578 NULL, NULL, NULL),
579 NULL, "Port ID",
580 NULL, cmd_store_env_value, "port-id");
581 commands_new(port_id,
582 NEWLINE, "Set local port ID",
583 NULL, cmd_portid_type_local,
584 b_map->string);
585 commands_new(
586 commands_new(
587 commands_new(port_id,
588 "description",
589 "Also set port description",
590 NULL, NULL, NULL),
591 NULL, "Port description",
592 NULL, cmd_store_env_value, "port-descr"),
593 NEWLINE, "Set local port ID and description",
594 NULL, cmd_portid_type_local, NULL);
595 } else if (!strcmp(b_map->string, "macaddress")) {
596 commands_new(
597 commands_new(configure_lldp_portid_type,
598 b_map->string, "MAC Address",
599 cmd_check_no_env, NULL, "ports"),
600 NEWLINE, NULL,
601 NULL, cmd_portid_type,
602 b_map->string);
603 }
604 }
605
606 commands_new(
607 commands_new(configure_lldp,
608 "capabilities-advertisements",
609 "Enable chassis capabilities advertisement",
610 cmd_check_no_env, NULL, "ports"),
611 NEWLINE, "Enable chassis capabilities advertisement",
612 NULL, cmd_chassis_cap_advertise, "enable");
613 commands_new(
614 commands_new(unconfigure_lldp,
615 "capabilities-advertisements",
616 "Don't enable chassis capabilities advertisement",
617 NULL, NULL, NULL),
618 NEWLINE, "Don't enable chassis capabilities advertisement",
619 NULL, cmd_chassis_cap_advertise, NULL);
620
621 commands_new(
622 commands_new(configure_lldp,
623 "management-addresses-advertisements",
624 "Enable management addresses advertisement",
625 NULL, NULL, NULL),
626 NEWLINE, "Enable management addresses advertisement",
627 NULL, cmd_chassis_mgmt_advertise, "enable");
628 commands_new(
629 commands_new(unconfigure_lldp,
630 "management-addresses-advertisements",
631 "Don't enable management addresses advertisement",
632 NULL, NULL, NULL),
633 NEWLINE, "Don't enable management addresses advertisement",
634 NULL, cmd_chassis_mgmt_advertise, NULL);
635
636
637 #ifdef ENABLE_CUSTOM
638 register_commands_configure_lldp_custom_tlvs(configure_lldp, unconfigure_lldp);
639 #endif
640 }