DAHDI timing interface.
More...
#include "asterisk.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <math.h>
#include <dahdi/user.h>
#include "asterisk/module.h"
#include "asterisk/timing.h"
#include "asterisk/utils.h"
Go to the source code of this file.
|
#define | SEE_TIMING "For more information on Asterisk timing modules, including ways to potentially fix this problem, please see https://wiki.asterisk.org/wiki/display/AST/Timing+Interfaces\n" |
|
|
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "DAHDI Timing Interface" , .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 = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_TIMING, } |
|
static const struct ast_module_info * | ast_module_info = &__mod_info |
|
static struct ast_timing_interface | dahdi_timing |
|
static void * | timing_funcs_handle |
|
DAHDI timing interface.
- Author
- Russell Bryant russe.nosp@m.ll@d.nosp@m.igium.nosp@m..com
Definition in file res_timing_dahdi.c.
◆ SEE_TIMING
#define SEE_TIMING "For more information on Asterisk timing modules, including ways to potentially fix this problem, please see https://wiki.asterisk.org/wiki/display/AST/Timing+Interfaces\n" |
◆ __reg_module()
static void __reg_module |
( |
void |
| ) |
|
|
static |
◆ __unreg_module()
static void __unreg_module |
( |
void |
| ) |
|
|
static |
◆ AST_MODULE_SELF_SYM()
◆ dahdi_test_timer()
static int dahdi_test_timer |
( |
void |
| ) |
|
|
static |
Definition at line 175 of file res_timing_dahdi.c.
References ast_log, ast_wait_for_input(), dahdi_timer::fd, LOG_ERROR, and SEE_TIMING.
Referenced by load_module().
180 fd = open(
"/dev/dahdi/timer", O_RDWR);
186 if (ioctl(fd, DAHDI_TIMERCONFIG, &x)) {
187 ast_log(
LOG_ERROR,
"You have DAHDI built and drivers loaded, but the DAHDI timer test failed to set DAHDI_TIMERCONFIG to %d.\n" SEE_TIMING, x);
193 ast_log(
LOG_ERROR,
"You have DAHDI built and drivers loaded, but the DAHDI timer could not be polled during the DAHDI timer test.\n" SEE_TIMING);
199 const char dahdi_timer_error[] = {
200 "Asterisk has detected a problem with your DAHDI configuration and will shutdown for your protection. You have options:" 201 "\n\t1. You only have to compile DAHDI support into Asterisk if you need it. One option is to recompile without DAHDI support." 202 "\n\t2. You only have to load DAHDI drivers if you want to take advantage of DAHDI services. One option is to unload DAHDI modules if you don't need them." 203 "\n\t3. If you need DAHDI services, you must correctly configure DAHDI."
int ast_wait_for_input(int fd, int ms)
◆ dahdi_timer_ack()
static int dahdi_timer_ack |
( |
void * |
data, |
|
|
unsigned int |
quantity |
|
) |
| |
|
static |
◆ dahdi_timer_close()
static void dahdi_timer_close |
( |
void * |
data | ) |
|
|
static |
◆ dahdi_timer_disable_continuous()
static int dahdi_timer_disable_continuous |
( |
void * |
data | ) |
|
|
static |
◆ dahdi_timer_enable_continuous()
static int dahdi_timer_enable_continuous |
( |
void * |
data | ) |
|
|
static |
◆ dahdi_timer_fd()
static int dahdi_timer_fd |
( |
void * |
data | ) |
|
|
static |
◆ dahdi_timer_get_event()
◆ dahdi_timer_get_max_rate()
static unsigned int dahdi_timer_get_max_rate |
( |
void * |
data | ) |
|
|
static |
◆ dahdi_timer_open()
static void * dahdi_timer_open |
( |
void |
| ) |
|
|
static |
Definition at line 74 of file res_timing_dahdi.c.
References ast_calloc, ast_free, ast_log, errno, dahdi_timer::fd, LOG_ERROR, NULL, and timer.
78 if (!(timer =
ast_calloc(1,
sizeof(*timer)))) {
82 if ((timer->
fd = open(
"/dev/dahdi/timer", O_RDWR)) < 0) {
#define ast_calloc(num, len)
A wrapper for calloc()
static struct ast_timer * timer
◆ dahdi_timer_set_rate()
static int dahdi_timer_set_rate |
( |
void * |
data, |
|
|
unsigned int |
rate |
|
) |
| |
|
static |
◆ load_module()
static int load_module |
( |
void |
| ) |
|
|
static |
◆ unload_module()
static int unload_module |
( |
void |
| ) |
|
|
static |
◆ __mod_info
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "DAHDI Timing Interface" , .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 = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_TIMING, } |
|
static |
◆ ast_module_info
◆ dahdi_timing
◆ timing_funcs_handle
void* timing_funcs_handle |
|
static |