Execute an ISDN RAS. More...
#include "asterisk.h"
#include <sys/ioctl.h>
#include <sys/wait.h>
#include <signal.h>
#include <fcntl.h>
#include <dahdi/user.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/app.h"
Go to the source code of this file.
Macros | |
#define | PPP_EXEC "/usr/sbin/pppd" |
#define | PPP_MAX_ARGS 32 |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | dahdiras_exec (struct ast_channel *chan, const char *data) |
static int | load_module (void) |
static void | run_ras (struct ast_channel *chan, char *args) |
static pid_t | spawn_ras (struct ast_channel *chan, char *args) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "DAHDI ISDN Remote Access Server" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, } |
static const char | app [] = "DAHDIRAS" |
static struct ast_module_info * | ast_module_info = &__mod_info |
Execute an ISDN RAS.
Definition in file app_dahdiras.c.
#define PPP_EXEC "/usr/sbin/pppd" |
Definition at line 80 of file app_dahdiras.c.
Referenced by spawn_ras().
#define PPP_MAX_ARGS 32 |
Definition at line 79 of file app_dahdiras.c.
Referenced by spawn_ras().
|
static |
Definition at line 236 of file app_dahdiras.c.
|
static |
Definition at line 236 of file app_dahdiras.c.
|
static |
Definition at line 191 of file app_dahdiras.c.
References ast_channel::_state, args, ast_answer(), ast_log(), AST_STATE_UP, ast_strdupa, ast_verb, ast_channel::fds, LOG_WARNING, ast_channel::name, run_ras(), ast_channel::tech, and ast_channel_tech::type.
Referenced by load_module().
|
static |
Definition at line 231 of file app_dahdiras.c.
References AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_SUCCESS, ast_register_application_xml, and dahdiras_exec().
|
static |
Definition at line 133 of file app_dahdiras.c.
References ast_check_hangup(), ast_debug, ast_log(), ast_safe_fork_cleanup(), ast_verb, errno, ast_channel::fds, LOG_WARNING, ast_channel::name, spawn_ras(), status, WEXITSTATUS, and WIFEXITED.
Referenced by dahdiras_exec().
|
static |
Definition at line 82 of file app_dahdiras.c.
References args, ast_close_fds_above_n(), ast_opt_high_priority, ast_safe_fork(), ast_set_priority(), ast_channel::fds, PPP_EXEC, PPP_MAX_ARGS, and strsep().
Referenced by run_ras().
|
static |
Definition at line 226 of file app_dahdiras.c.
References ast_unregister_application().
|
static |
Definition at line 236 of file app_dahdiras.c.
|
static |
Definition at line 77 of file app_dahdiras.c.
|
static |
Definition at line 236 of file app_dahdiras.c.