}
}
-static int
-cmd_faststart(struct lldpctl_conn_t *conn, struct writer *w, struct cmd_env *env,
- const void *arg)
-{
- log_debug("lldpctl", "configure fast interval support");
-
- lldpctl_atom_t *config = lldpctl_get_configuration(conn);
- if (config == NULL) {
- log_warnx("lldpctl", "unable to get configuration from lldpd. %s",
- lldpctl_last_strerror(conn));
- return 0;
- }
-
- const char *action = arg;
- if ((!strcmp(action, "enable") &&
- (lldpctl_atom_set_int(config, lldpctl_k_config_fast_start_enabled, 1) ==
- NULL)) ||
- (!strcmp(action, "disable") &&
- (lldpctl_atom_set_int(config, lldpctl_k_config_fast_start_enabled, 0) ==
- NULL)) ||
- (!strcmp(action, "delay") &&
- (lldpctl_atom_set_str(config, lldpctl_k_config_fast_start_interval,
- cmdenv_get(env, "tx-interval")) == NULL))) {
- log_warnx("lldpctl", "unable to setup fast start. %s",
- lldpctl_last_strerror(conn));
- lldpctl_atom_dec_ref(config);
- return 0;
- }
- log_info("lldpctl", "configuration for fast start applied");
- lldpctl_atom_dec_ref(config);
- return 1;
-}
-
-/**
- * Register "configure med fast-start *"
- */
-static void
-register_commands_medfast(struct cmd_node *med, struct cmd_node *nomed)
-{
- struct cmd_node *configure_fast = commands_new(med, "fast-start",
- "Fast start configuration", cmd_check_no_env, NULL, "ports");
- struct cmd_node *unconfigure_fast = commands_new(nomed, "fast-start",
- "Fast start configuration", cmd_check_no_env, NULL, "ports");
-
- /* Enable */
- commands_new(commands_new(configure_fast, "enable", "Enable fast start", NULL,
- NULL, NULL),
- NEWLINE, "Enable fast start", NULL, cmd_faststart, "enable");
-
- /* Set TX delay */
- commands_new(commands_new(commands_new(configure_fast, "tx-interval",
- "Set LLDP fast transmit delay", NULL, NULL, NULL),
- NULL, "LLDP fast transmit delay in seconds", NULL,
- cmd_store_env_value, "tx-interval"),
- NEWLINE, "Set LLDP fast transmit delay", NULL, cmd_faststart, "delay");
-
- /* Disable */
- commands_new(commands_new(unconfigure_fast, NEWLINE, "Disable fast start", NULL,
- cmd_faststart, "disable"),
- NEWLINE, "Disable fast start", NULL, cmd_faststart, "disable");
-}
-
/**
* Register "configure med *"
*/
is specified, remove specific instances of custom TLV.
.Ed
-.Cd configure med fast-start
+.Cd configure lldp fast-start
.Cd enable | tx-interval Ar interval
.Bd -ragged -offset XXXXXX
-Configure LLDP-MED fast start mechanism. When a new LLDP-MED-enabled
+Configure LLDP fast start mechanism. When a new LLDP
neighbor is detected, fast start allows
.Nm lldpd
to shorten the interval between two LLDPDU.
.Cd enable
-should enable LLDP-MED fast start while
+should enable LLDP fast start while
.Cd tx-interval
specifies the interval between two LLDPDU in seconds. The valid interval
range is 1 through 3600 in seconds. The default interval is 1 second. Once
neighbor is detected.
.Ed
-.Cd unconfigure med fast-start
+.Cd unconfigure lldp fast-start
.Bd -ragged -offset XXXXXX
-Disable LLDP-MED fast start mechanism.
+Disable LLDP fast start mechanism.
.Ed
.Cd configure
("configure lldp tx-interval 20", "tx-delay", 20),
("configure lldp tx-hold 5", "tx-hold", 5),
("configure lldp portidsubtype ifname", "lldp-portid-type", "ifname"),
- pytest.param(
- "unconfigure med fast-start",
- "lldpmed-faststart",
- "no",
- marks=pytest.mark.skipif(
- "'LLDP-MED' not in config.lldpd.features",
- reason="LLDP-MED not supported",
- ),
- ),
- pytest.param(
- "configure med fast-start tx-interval 2",
- "lldpmed-faststart-interval",
- 2,
- marks=pytest.mark.skipif(
- "'LLDP-MED' not in config.lldpd.features",
- reason="LLDP-MED not supported",
- ),
- ),
+ ("unconfigure lldp fast-start", "fast-start", "no"),
+ ("configure lldp fast-start tx-interval 2", "fast-start-interval", 2),
("configure system interface pattern eth*", "iface-pattern", "eth*"),
("configure system interface permanent eth*", "perm-iface-pattern", "eth*"),
("configure system ip management pattern 10.*", "mgmt-pattern", "10.*"),
configure lldp custom-tlv replace oui 33,44,55 subtype 44 oui-info 66,66,66,66,66
unconfigure lldp custom-tlv oui 33,44,55 subtype 55
unconfigure lldp custom-tlv
+configure lldp fast-start enable
+configure lldp fast-start tx-interval 3
+unconfigure lldp fast-start
configure system bond-slave-src-mac-type fixed
configure system bond-slave-src-mac-type local
-configure med fast-start enable
-configure med fast-start tx-interval 3
-unconfigure med fast-start
configure med location coordinate latitude 48.58667N longitude 2.2014E altitude 117.47 m datum WGS84
configure med location address country US language en_US street "Commercial Road" city "Roseville"
configure med location elin 911