First page Back Continue Last page Graphics
Asterisk Module CLI
load_module() should register CLI commands via a call to ast_cli_register_multiple() with an ast_cli_entry structure:
struct ast_cli_entry {
/* Null terminated list of the words of the command */
char *cmda[AST_MAX_CMD_LEN];
/* Handler for command (fd for output, # of args, arg list) */
int (*handler)(int fd, int argc, char *argv[]);
/* Summary of the command (<60 characters) */
char *summary;
/* Detailed usage information */
char *usage;
...
}