client: Added support to override system capabilities
1) configure system capabilities enabled <capability_0,capability_1,...>
Override system capabilities with the provided value instead of using kernel information. Several capabilities can be specified separated by commas. Only available capabilities can be enabled. Valid capabilities are:
other
repeater
bridge
wlan
router
telephone
docsis
station
Here is an example of use:
lldpcli configure system capabilities enabled bridge,router
2) unconfigure system capabilities enabled
Do not override capabilities and use the kernel information. This option undoes the previous one.
Ignacio Sanchez Navarro (Ignacio.Sanchez@uws.ac.uk) - University of the West of Scotland - Supported by H2020-ICT-2020-2/
101017226 6G-BRAINS
-------------------------------------------------------------------------------
Modified files
lldpd-structs.h
- Added new attribute "c_cap_override" to "lldpd_config" struct
conf-system.c
- Added new function "cmd_capability" for new command to override the chassis capabilities
- Added new function "register_commands_capabilities" to registers new commands to override the chassis capabilities
- Added call to "register_commands_capabilities" in "register_commands_configure_system"
chassis.c
- Added new function "_lldpctl_atom_st_int_chassis" to set "int" type vars in chassis
- Added assignation of ".set_int" function in "chassis" var build
config.c
- Added case for "lldpctl_k_config_chassis_cap_override" to get value of "c_cap_override" in "_lldpctl_atom_get_int_config" function
- Added case for "lldpctl_k_config_chassis_cap_override" to set value of "c_cap_override" in "_lldpctl_atom_set_int_config" function
client.c
- Added changes check for "c_cap_override" var in "client_handle_set_configuration" function
- Added changes check for "c_cap_enabled" var in "client_handle_set_local_chassis" function
lldpctl.h
- Added new enum values un "lldpctl_key_t" enum : "lldpctl_k_chassis_cap_enabled" and "lldpctl_k_config_chassis_cap_override"
- Corrected some typos in previous comments
lldpd.c
- Added check of capabilities override before setting new values in "lldpd_update_localchassis" function
- Added check of capabilities override before setting initial value of "c_cap_enabled" to 0 in "lldpd_loop" function
- Added initial set of "cfg->g_config.c_cap_override" to 0 in "lldpd_main" function
interfaces.c
- Added check of capabilities override before setting new values in "interfaces_helper_chassis" function
display.c
- Added new line to display the status of capabilities override in "show configration" command
lldpcli.8.in
- Added new commands and descriptions to man file