#include <stdarg.h>
Include dependency graph for cli.h:

Go to the source code of this file.
Data Structures | |
| struct | ast_cli_entry |
| A command line entry. More... | |
Defines | |
| #define | AST_CLI_COMPLETE_EOF "_EOF_" |
| #define | AST_MAX_ARGS 64 |
| #define | AST_MAX_CMD_LEN 16 |
| #define | RESULT_FAILURE 2 |
| #define | RESULT_SHOWUSAGE 1 |
| #define | RESULT_SUCCESS 0 |
Functions | |
| void | ast_cli (int fd, char *fmt,...) __attribute__((format(printf |
| int | ast_cli_command (int fd, char *s) |
| Interprets a command Interpret a command s, sending output to fd Returns 0 on succes, -1 on failure. | |
| char ** | ast_cli_completion_matches (char *, char *) |
| char * | ast_cli_generator (char *, char *, int) |
| Readline madness Useful for readline, that's about it Returns 0 on success, -1 on failure. | |
| int | ast_cli_generatornummatches (char *, char *) |
| int | ast_cli_register (struct ast_cli_entry *e) |
| Registers a command or an array of commands. | |
| void | ast_cli_register_multiple (struct ast_cli_entry *e, int len) |
| Register multiple commands. | |
| int | ast_cli_unregister (struct ast_cli_entry *e) |
| Unregisters a command or an array of commands. | |
| void | ast_cli_unregister_multiple (struct ast_cli_entry *e, int len) |
| Unregister multiple commands. | |
Definition in file cli.h.
| int ast_cli_register | ( | struct ast_cli_entry * | e | ) |
Registers a command or an array of commands.
| e | which cli entry to register Register your own command Returns 0 on success, -1 on failure |
| void ast_cli_register_multiple | ( | struct ast_cli_entry * | e, | |
| int | len | |||
| ) |
Register multiple commands.
| e | pointer to first cli entry to register | |
| len | number of entries to register |
| int ast_cli_unregister | ( | struct ast_cli_entry * | e | ) |
Unregisters a command or an array of commands.
| e | which cli entry to unregister Unregister your own command. You must pass a completed ast_cli_entry structure Returns 0. |
| void ast_cli_unregister_multiple | ( | struct ast_cli_entry * | e, | |
| int | len | |||
| ) |
Unregister multiple commands.
| e | pointer to first cli entry to unregister | |
| len | number of entries to unregister |
1.5.1