#include <unistd.h>#include <stdlib.h>#include <asterisk/logger.h>#include <asterisk/options.h>#include <asterisk/cli.h>#include <asterisk/module.h>#include <asterisk/channel.h>#include <asterisk/channel_pvt.h>#include <asterisk/manager.h>#include <asterisk/utils.h>#include <asterisk/lock.h>#include <sys/signal.h>#include <stdio.h>#include <signal.h>#include <string.h>#include "readline/readline.h"#include "asterisk.h"#include "build.h"#include "astconf.h"Go to the source code of this file.
Defines | |
| #define | VERSION_INFO |
| #define | MODLIST_FORMAT "%-25s %-40.40s %-10d\n" |
| #define | MODLIST_FORMAT2 "%-25s %-40.40s %-10s\n" |
| #define | SECOND (1) |
| #define | MINUTE (SECOND*60) |
| #define | HOUR (MINUTE*60) |
| #define | DAY (HOUR*24) |
| #define | WEEK (DAY*7) |
| #define | YEAR (DAY*365) |
| #define | ESS(x) ((x == 1) ? "" : "s") |
| #define | FORMAT_STRING "%15s (%-10s %-12s %-4d) %7s %-12s %-15s\n" |
| #define | FORMAT_STRING2 "%15s (%-10s %-12s %-4s) %7s %-12s %-15s\n" |
| #define | CONCISE_FORMAT_STRING "%s:%s:%s:%d:%s:%s:%s:%s:%s:%d\n" |
Functions | |
| void | ast_cli (int fd, char *fmt,...) |
| AST_MUTEX_DEFINE_STATIC (clilock) | |
| AST_MUTEX_DEFINE_STATIC (climodentrylock) | |
| int | ast_cli_unregister (struct ast_cli_entry *e) |
| Unregisters a command. | |
| int | ast_cli_register (struct ast_cli_entry *e) |
| Registers a command. | |
| int | ast_cli_generatornummatches (char *text, char *word) |
| char ** | ast_cli_completion_matches (char *text, char *word) |
| char * | ast_cli_generator (char *text, char *word, int state) |
| Readline madness. | |
| int | ast_cli_command (int fd, char *s) |
| Interprets a command. | |
Variables | |
| ast_cli_entry * | helpers = NULL |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: Definition at line 36 of file cli.c. |
|
|
|
|
|
|
|
||||||||||||||||
|
Definition at line 39 of file cli.c. References ast_carefulwrite(), ast_log(), free, LOG_ERROR, and vasprintf.
|
|
||||||||||||
|
Interprets a command. Interpret a command s, sending output to fd Returns 0 on succes, -1 on failure Definition at line 1061 of file cli.c. References ast_cli(), ast_log(), AST_MAX_ARGS, ast_mutex_lock, ast_mutex_unlock, free, LOG_WARNING, RESULT_SHOWUSAGE, and s.
|
|
||||||||||||
|
Definition at line 945 of file cli.c. References ast_cli_generator(), malloc, and realloc.
|
|
||||||||||||||||
|
Readline madness. Definition at line 1056 of file cli.c. Referenced by ast_cli_completion_matches(), and ast_cli_generatornummatches().
|
|
||||||||||||
|
Definition at line 928 of file cli.c. References ast_cli_generator().
|
|
|
Registers a command.
References ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_cli_entry::cmda, helpers, LOG_WARNING, and ast_cli_entry::next. Referenced by ast_file_init(), ast_image_init(), ast_register_translator(), astdb_init(), init_framer(), init_logger(), init_manager(), load_pbx(), main(), and register_config_cli().
|
|
|
Unregisters a command.
References ast_log(), ast_mutex_lock, ast_mutex_unlock, helpers, ast_cli_entry::inuse, LOG_WARNING, and ast_cli_entry::next.
|
|
|
|
|
|
|
|
|
Definition at line 58 of file cli.c. Referenced by ast_cli_register(), and ast_cli_unregister(). |
1.3.8