Command Line Interface
[DES-SERT Library]
EXTERNAL / PUBLIC. More...
Collaboration diagram for Command Line Interface:
|
Functions | |
| int | dessert_cli_run (void) |
| Start up the command line interface. | |
| FILE * | dessert_cli_get_cfg (int argc, char **argv) |
| Get pointer to config file. | |
| int | dessert_set_cli_port (uint16_t port) |
| Set CLI port. | |
Variables | |
| struct cli_def * | dessert_cli |
| DES-SERT CLI. | |
| struct cli_command * | dessert_cli_show |
| CLI Anchor for show commands. | |
| struct cli_command * | dessert_cli_cfg_iface |
| CLI Anchor interface configuration commands. | |
| struct cli_command * | dessert_cli_cfg_no |
| CLI Anchor for deactivation commands. | |
| struct cli_command * | dessert_cli_cfg_no_iface |
| CLI Anchor for interface removal commands. | |
| struct cli_command * | dessert_cli_cfg_set |
| CLI Anchor for set commands. | |
| struct cli_command * | dessert_cli_cfg_logging |
| CLI Anchor to enable logging. | |
| struct cli_command * | dessert_cli_cfg_no_logging |
| CLI Anchor to disable logging. | |
Detailed Description
EXTERNAL / PUBLIC.
Function Documentation
| FILE* dessert_cli_get_cfg | ( | int | argc, | |
| char ** | argv | |||
| ) |
Get pointer to config file.
Try to get a valid file name from the arguments and if this fails, guess config file name based on the daemon's name. This function either terminates the daemon or returns a valid FILE pointer.
- Parameters:
-
[in] argc number of arguments in list [in] argv pointer to a list of arguments
- Returns:
- pointer to config file
| int dessert_cli_run | ( | void | ) |
Start up the command line interface.
- Return values:
-
DESSERT_OK on success -errno otherwise
DESCRIPTION:
| int dessert_set_cli_port | ( | uint16_t | port | ) |
Set CLI port.
Set the TCP port of the command line interface. The Daemon will accept one connection at a time.
- Parameters:
-
[in] port TCP port number
- Return values:
-
DESSERT_OK on success DESSERT_ERR otherwise