Asterisk Source/Con Sole
AsteriskSource/ConSole ¶* argument c
* option_console
* ast_register_verbose(console_verboser);
* ast_cli_register(&quit);
* consolethread = pthread_self();
* rl_callback_handler_install(tmp, consolehandler);
* rl_completion_entry_function = (void *)(Function *)cli_generator;
* for(;;)
//! A command line entry */ struct ast_cli_entry { /*! Null terminated list of the words of the command */ char *cmda[AST_MAX_CMD_LEN]; /*! Handler for the command (fd for output, # of arguments, argument list). Returns RESULT_SHOWUSAGE for improper arguments */ int (*handler)(int fd, int argc, char *argv[]); /*! Summary of the command (< 60 characters) */ char *summary; /*! Detailed usage information */ char *usage; /*! Generate a list of possible completions for a given word */ char *(*generator)(char *line, char *word, int pos, int state); /*! For linking */ struct ast_cli_entry *next; /*! For keeping track of usage */ int inuse; }; * aborthalt
* quit
* astshutdownnow
* astshutdowngracefully
* astrestartnow
* astrestartconvenient
* builtins
GNU Readline library ¶* void rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *lhandler)
|
Even the boldest zebra fears the hungry lion. |