CLI Callbacks
[Callbacks]
CLI Callbacks. More...
Collaboration diagram for CLI Callbacks:
![]() |
Functions | |
int | dessert_cli_cmd_addsysif (struct cli_def *cli, char *command, char *argv[], int argc) |
Add TAP interface. | |
int | dessert_cli_cmd_addsysif_tun (struct cli_def *cli, char *command, char *argv[], int argc) |
Add TUN interface. | |
int | dessert_cli_cmd_addmeshif (struct cli_def *cli, char *command, char *argv[], int argc) |
Add mesh mesh interface. | |
int | dessert_cli_cmd_ping (struct cli_def *cli, char *command, char *argv[], int argc) |
Send a ping packet. | |
int | dessert_cli_cmd_traceroute (struct cli_def *cli, char *command, char *argv[], int argc) |
Trace route to destination. |
Detailed Description
CLI Callbacks.
Function Documentation
int dessert_cli_cmd_addmeshif | ( | struct cli_def * | cli, | |
char * | command, | |||
char * | argv[], | |||
int | argc | |||
) |
Add mesh mesh interface.
Adds an interface as mesh interface to the daemon. libpcap is used to receive packets in the promiscuous mode. The interface is put in the up state.
COMMAND: interface mesh $iface
- Parameters:
-
cli the handle of the cli structure. This must be passed to all cli functions, including cli_print(). command the entire command which was entered. This is after command expansion. argv the list of arguments entered argc the number of arguments entered
- Return values:
-
CLI_OK if interface added and in up state CLI_ERROR on error
int dessert_cli_cmd_addsysif | ( | struct cli_def * | cli, | |
char * | command, | |||
char * | argv[], | |||
int | argc | |||
) |
Add TAP interface.
This callback can be used to create a TAP device as sys interface.
COMMAND: interface sys $iface, $ipv4-addr, $netmask
- Parameters:
-
cli the handle of the cli structure. This must be passed to all cli functions, including cli_print(). command the entire command which was entered. This is after command expansion. argv the list of arguments entered argc the number of arguments entered
- Return values:
-
CLI_OK if TAP interface added CLI_ERROR on error
int dessert_cli_cmd_addsysif_tun | ( | struct cli_def * | cli, | |
char * | command, | |||
char * | argv[], | |||
int | argc | |||
) |
Add TUN interface.
This callback can be used to create a TUN device as sys interface.
COMMAND: interface sys $iface, $ipv4-addr, $netmask
- Parameters:
-
cli the handle of the cli structure. This must be passed to all cli functions, including cli_print(). command the entire command which was entered. This is after command expansion. argv the list of arguments entered argc the number of arguments entered
- Return values:
-
CLI_OK if TUN interface added CLI_ERROR on error
int dessert_cli_cmd_ping | ( | struct cli_def * | cli, | |
char * | command, | |||
char * | argv[], | |||
int | argc | |||
) |
Send a ping packet.
- Parameters:
-
cli the handle of the cli structure. This must be passed to all cli functions, including cli_print(). command the entire command which was entered. This is after command expansion. argv the list of arguments entered argc the number of arguments entered
- Return values:
-
CLI_OK if ping sent CLI_ERROR on error
int dessert_cli_cmd_traceroute | ( | struct cli_def * | cli, | |
char * | command, | |||
char * | argv[], | |||
int | argc | |||
) |
Trace route to destination.
Sends a packet with a trace request to a host. You will asynchronously receive a reply if the destination is present in in the network and no packet is lost.
- Parameters:
-
cli the handle of the cli structure. This must be passed to all cli functions, including cli_print(). command the entire command which was entered. This is after command expansion. argv the list of arguments entered argc the number of arguments entered
- Return values:
-
CLI_OK if trace packet sent CLI_ERROR on error