#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/utils.h>#include <sys/signal.h>#include <stdio.h>#include <signal.h>#include <string.h>#include <pthread.h>#include "editline/readline/readline.h"#include "asterisk.h"#include "build.h"#include "astconf.h"Include dependency graph for cli.c:

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 | MIN (SECOND*60) |
| #define | HOUR (MIN*60) |
| #define | DAY (HOUR*24) |
| #define | WEEK (DAY*7) |
| #define | YEAR (DAY*365) |
| #define | FORMAT_STRING "%15s (%-10s %-12s %-4d) %7s %-12s %-15s\n" |
| #define | FORMAT_STRING2 "%15s (%-10s %-12s %-4s) %7s %-12s %-15s\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 38 of file cli.c. References free, and vasprintf.
|
|
||||||||||||
|
Interprets a command. Interpret a command s, sending output to fd Returns 0 on succes, -1 on failure Definition at line 1019 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 903 of file cli.c. References ast_cli_generator(), malloc, and realloc.
|
|
||||||||||||||||
|
Readline madness.
Definition at line 1014 of file cli.c. Referenced by ast_cli_completion_matches(), and ast_cli_generatornummatches().
|
|
||||||||||||
|
Definition at line 886 of file cli.c. References ast_cli_generator().
|
|
|
Registers a command.
Definition at line 709 of file cli.c. References ast_log(), ast_mutex_lock, ast_mutex_unlock, ast_cli_entry::cmda, helpers, LOG_WARNING, and ast_cli_entry::next. Referenced by ast_image_init(), ast_register_translator(), astdb_init(), init_framer(), init_logger(), init_manager(), load_pbx(), and main().
|
|
|
Unregisters a command.
Definition at line 683 of file cli.c. References ast_log(), ast_mutex_lock, ast_mutex_unlock, helpers, ast_cli_entry::inuse, LOG_WARNING, and ast_cli_entry::next.
|
|
|
|
|
|
|
|
|
Definition at line 51 of file cli.c. Referenced by ast_cli_register(), and ast_cli_unregister(). |
1.3.7