#include "asterisk.h"
#include "chan_misdn_config.h"
#include "asterisk/config.h"
#include "asterisk/channel.h"
#include "asterisk/lock.h"
#include "asterisk/pbx.h"
#include "asterisk/strings.h"
#include "asterisk/utils.h"
Go to the source code of this file.
Data Structures | |
union | misdn_cfg_pt |
struct | misdn_cfg_spec |
struct | msn_list |
Defines | |
#define | CLI_ERROR(name, value, section) |
#define | GEN_CFG 1 |
#define | NO_DEFAULT "<>" |
#define | NONE 0 |
#define | NUM_GEN_ELEMENTS (sizeof(gen_spec) / sizeof(struct misdn_cfg_spec)) |
#define | NUM_PORT_ELEMENTS (sizeof(port_spec) / sizeof(struct misdn_cfg_spec)) |
#define | PORT_CFG 2 |
Enumerations | |
enum | misdn_cfg_type { MISDN_CTYPE_STR, MISDN_CTYPE_INT, MISDN_CTYPE_BOOL, MISDN_CTYPE_BOOLINT, MISDN_CTYPE_MSNLIST, MISDN_CTYPE_ASTGROUP } |
Functions | |
static void | _build_general_config (struct ast_variable *v) |
static void | _build_port_config (struct ast_variable *v, char *cat) |
static int | _enum_array_map (void) |
static void | _fill_defaults (void) |
static void | _free_general_cfg (void) |
static void | _free_msn_list (struct msn_list *iter) |
static void | _free_port_cfg (void) |
static int | _parse (union misdn_cfg_pt *dest, const char *value, enum misdn_cfg_type type, int boolint_def) |
static int | get_cfg_position (const char *name, int type) |
void | misdn_cfg_destroy (void) |
void | misdn_cfg_get (int port, enum misdn_cfg_elements elem, void *buf, int bufsize) |
void | misdn_cfg_get_config_string (int port, enum misdn_cfg_elements elem, char *buf, int bufsize) |
void | misdn_cfg_get_desc (enum misdn_cfg_elements elem, void *buf, int bufsize, void *buf_default, int bufsize_default) |
enum misdn_cfg_elements | misdn_cfg_get_elem (char *name) |
void | misdn_cfg_get_name (enum misdn_cfg_elements elem, void *buf, int bufsize) |
int | misdn_cfg_get_next_port (int port) |
int | misdn_cfg_get_next_port_spin (int port) |
void | misdn_cfg_get_ports_string (char *ports) |
Generate a comma separated list of all active ports. | |
int | misdn_cfg_init (int this_max_ports, int reload) |
int | misdn_cfg_is_group_method (char *group, enum misdn_cfg_method meth) |
int | misdn_cfg_is_msn_valid (int port, char *msn) |
int | misdn_cfg_is_port_valid (int port) |
static void | misdn_cfg_lock (void) |
void | misdn_cfg_reload (void) |
static void | misdn_cfg_unlock (void) |
void | misdn_cfg_update_ptp (void) |
ast_jb_conf * | misdn_get_global_jbconf () |
Variables | |
static ast_mutex_t | config_mutex |
static struct ast_jb_conf | default_jbconf |
static struct misdn_cfg_spec | gen_spec [] |
static union misdn_cfg_pt * | general_cfg |
static struct ast_jb_conf | global_jbconf |
static int * | map |
static int | max_ports |
static union misdn_cfg_pt ** | port_cfg |
static struct misdn_cfg_spec | port_spec [] |
static const char | ports_description [] |
static int * | ptp |
Definition in file misdn_config.c.
#define CLI_ERROR | ( | name, | |||
value, | |||||
section | ) |
Value:
({ \ ast_log(LOG_WARNING, "misdn.conf: \"%s=%s\" (section: %s) invalid or out of range. " \ "Please edit your misdn.conf and then do a \"misdn reload\".\n", name, value, section); \ })
Definition at line 392 of file misdn_config.c.
Referenced by _build_general_config(), and _build_port_config().
#define GEN_CFG 1 |
Definition at line 45 of file misdn_config.c.
Referenced by _build_general_config(), get_cfg_position(), and misdn_cfg_get_elem().
#define NO_DEFAULT "<>" |
Definition at line 42 of file misdn_config.c.
Referenced by _fill_defaults(), and misdn_cfg_get_desc().
#define NONE 0 |
Definition at line 43 of file misdn_config.c.
#define NUM_GEN_ELEMENTS (sizeof(gen_spec) / sizeof(struct misdn_cfg_spec)) |
Definition at line 47 of file misdn_config.c.
Referenced by _enum_array_map(), _fill_defaults(), _free_general_cfg(), get_cfg_position(), and misdn_cfg_init().
#define NUM_PORT_ELEMENTS (sizeof(port_spec) / sizeof(struct misdn_cfg_spec)) |
Definition at line 48 of file misdn_config.c.
Referenced by _build_port_config(), _enum_array_map(), _fill_defaults(), _free_port_cfg(), get_cfg_position(), and misdn_cfg_init().
#define PORT_CFG 2 |
Definition at line 46 of file misdn_config.c.
Referenced by _build_port_config(), get_cfg_position(), and misdn_cfg_get_elem().
enum misdn_cfg_type |
MISDN_CTYPE_STR | |
MISDN_CTYPE_INT | |
MISDN_CTYPE_BOOL | |
MISDN_CTYPE_BOOLINT | |
MISDN_CTYPE_MSNLIST | |
MISDN_CTYPE_ASTGROUP |
Definition at line 61 of file misdn_config.c.
00061 { 00062 MISDN_CTYPE_STR, 00063 MISDN_CTYPE_INT, 00064 MISDN_CTYPE_BOOL, 00065 MISDN_CTYPE_BOOLINT, 00066 MISDN_CTYPE_MSNLIST, 00067 MISDN_CTYPE_ASTGROUP 00068 };
static void _build_general_config | ( | struct ast_variable * | v | ) | [static] |
Definition at line 933 of file misdn_config.c.
References _parse(), ast_jb_read_conf(), misdn_cfg_spec::boolint_def, CLI_ERROR, GEN_CFG, gen_spec, general_cfg, get_cfg_position(), global_jbconf, ast_variable::name, ast_variable::next, misdn_cfg_spec::type, and ast_variable::value.
Referenced by misdn_cfg_init().
00934 { 00935 int pos; 00936 00937 for (; v; v = v->next) { 00938 if (!ast_jb_read_conf(&global_jbconf, v->name, v->value)) 00939 continue; 00940 if (((pos = get_cfg_position(v->name, GEN_CFG)) < 0) || 00941 (_parse(&general_cfg[pos], v->value, gen_spec[pos].type, gen_spec[pos].boolint_def) < 0)) 00942 CLI_ERROR(v->name, v->value, "general"); 00943 } 00944 }
static void _build_port_config | ( | struct ast_variable * | v, | |
char * | cat | |||
) | [static] |
Definition at line 946 of file misdn_config.c.
References _parse(), ast_strdupa, misdn_cfg_spec::boolint_def, BUFFERSIZE, CLI_ERROR, get_cfg_position(), max_ports, ast_variable::name, ast_variable::next, NUM_PORT_ELEMENTS, PORT_CFG, port_spec, ptp, strsep(), misdn_cfg_spec::type, type, and ast_variable::value.
Referenced by misdn_cfg_init().
00947 { 00948 int pos, i; 00949 union misdn_cfg_pt cfg_tmp[NUM_PORT_ELEMENTS]; 00950 int cfg_for_ports[max_ports + 1]; 00951 00952 if (!v || !cat) 00953 return; 00954 00955 memset(cfg_tmp, 0, sizeof(cfg_tmp)); 00956 memset(cfg_for_ports, 0, sizeof(cfg_for_ports)); 00957 00958 if (!strcasecmp(cat, "default")) { 00959 cfg_for_ports[0] = 1; 00960 } 00961 00962 if (((pos = get_cfg_position("name", PORT_CFG)) < 0) || 00963 (_parse(&cfg_tmp[pos], cat, port_spec[pos].type, port_spec[pos].boolint_def) < 0)) { 00964 CLI_ERROR(v->name, v->value, cat); 00965 return; 00966 } 00967 00968 for (; v; v = v->next) { 00969 if (!strcasecmp(v->name, "ports")) { 00970 char *token, *tmp = ast_strdupa(v->value); 00971 char ptpbuf[BUFFERSIZE] = ""; 00972 int start, end; 00973 for (token = strsep(&tmp, ","); token; token = strsep(&tmp, ","), *ptpbuf = 0) { 00974 if (!*token) 00975 continue; 00976 if (sscanf(token, "%d-%d%s", &start, &end, ptpbuf) >= 2) { 00977 for (; start <= end; start++) { 00978 if (start <= max_ports && start > 0) { 00979 cfg_for_ports[start] = 1; 00980 ptp[start] = (strstr(ptpbuf, "ptp")) ? 1 : 0; 00981 } else 00982 CLI_ERROR(v->name, v->value, cat); 00983 } 00984 } else { 00985 if (sscanf(token, "%d%s", &start, ptpbuf)) { 00986 if (start <= max_ports && start > 0) { 00987 cfg_for_ports[start] = 1; 00988 ptp[start] = (strstr(ptpbuf, "ptp")) ? 1 : 0; 00989 } else 00990 CLI_ERROR(v->name, v->value, cat); 00991 } else 00992 CLI_ERROR(v->name, v->value, cat); 00993 } 00994 } 00995 } else { 00996 if (((pos = get_cfg_position(v->name, PORT_CFG)) < 0) || 00997 (_parse(&cfg_tmp[pos], v->value, port_spec[pos].type, port_spec[pos].boolint_def) < 0)) 00998 CLI_ERROR(v->name, v->value, cat); 00999 } 01000 } 01001 01002 for (i = 0; i < (max_ports + 1); ++i) { 01003 if (cfg_for_ports[i]) { 01004 memcpy(port_cfg[i], cfg_tmp, sizeof(cfg_tmp)); 01005 } 01006 } 01007 }
static int _enum_array_map | ( | void | ) | [static] |
Definition at line 397 of file misdn_config.c.
References ast_log(), gen_spec, LOG_WARNING, MISDN_CFG_FIRST, MISDN_CFG_LAST, MISDN_CFG_PTP, MISDN_GEN_FIRST, MISDN_GEN_LAST, NUM_GEN_ELEMENTS, NUM_PORT_ELEMENTS, and port_spec.
Referenced by misdn_cfg_init().
00398 { 00399 int i, j, ok; 00400 00401 for (i = MISDN_CFG_FIRST + 1; i < MISDN_CFG_LAST; ++i) { 00402 if (i == MISDN_CFG_PTP) 00403 continue; 00404 ok = 0; 00405 for (j = 0; j < NUM_PORT_ELEMENTS; ++j) { 00406 if (port_spec[j].elem == i) { 00407 map[i] = j; 00408 ok = 1; 00409 break; 00410 } 00411 } 00412 if (!ok) { 00413 ast_log(LOG_WARNING, "Enum element %d in misdn_cfg_elements (port section) has no corresponding element in the config struct!\n", i); 00414 return -1; 00415 } 00416 } 00417 for (i = MISDN_GEN_FIRST + 1; i < MISDN_GEN_LAST; ++i) { 00418 ok = 0; 00419 for (j = 0; j < NUM_GEN_ELEMENTS; ++j) { 00420 if (gen_spec[j].elem == i) { 00421 map[i] = j; 00422 ok = 1; 00423 break; 00424 } 00425 } 00426 if (!ok) { 00427 ast_log(LOG_WARNING, "Enum element %d in misdn_cfg_elements (general section) has no corresponding element in the config struct!\n", i); 00428 return -1; 00429 } 00430 } 00431 return 0; 00432 }
static void _fill_defaults | ( | void | ) | [static] |
Definition at line 1064 of file misdn_config.c.
References _parse(), misdn_cfg_pt::any, gen_spec, general_cfg, NO_DEFAULT, NUM_GEN_ELEMENTS, NUM_PORT_ELEMENTS, port_cfg, port_spec, and type.
Referenced by misdn_cfg_init().
01065 { 01066 int i; 01067 01068 for (i = 0; i < NUM_PORT_ELEMENTS; ++i) { 01069 if (!port_cfg[0][i].any && strcasecmp(port_spec[i].def, NO_DEFAULT)) 01070 _parse(&(port_cfg[0][i]), (char *)port_spec[i].def, port_spec[i].type, port_spec[i].boolint_def); 01071 } 01072 for (i = 0; i < NUM_GEN_ELEMENTS; ++i) { 01073 if (!general_cfg[i].any && strcasecmp(gen_spec[i].def, NO_DEFAULT)) 01074 _parse(&(general_cfg[i]), (char *)gen_spec[i].def, gen_spec[i].type, gen_spec[i].boolint_def); 01075 } 01076 }
static void _free_general_cfg | ( | void | ) | [static] |
Definition at line 507 of file misdn_config.c.
References misdn_cfg_pt::any, ast_free, general_cfg, and NUM_GEN_ELEMENTS.
Referenced by misdn_cfg_destroy(), and misdn_cfg_init().
00508 { 00509 int i; 00510 00511 for (i = 0; i < NUM_GEN_ELEMENTS; i++) 00512 if (general_cfg[i].any) 00513 ast_free(general_cfg[i].any); 00514 }
static void _free_msn_list | ( | struct msn_list * | iter | ) | [static] |
Definition at line 465 of file misdn_config.c.
References ast_free, msn_list::msn, and msn_list::next.
Referenced by _free_port_cfg().
00466 { 00467 if (iter->next) 00468 _free_msn_list(iter->next); 00469 if (iter->msn) 00470 ast_free(iter->msn); 00471 ast_free(iter); 00472 }
static void _free_port_cfg | ( | void | ) | [static] |
Definition at line 474 of file misdn_config.c.
References _free_msn_list(), misdn_cfg_pt::any, ast_free, MISDN_CFG_GROUPNAME, MISDN_CTYPE_MSNLIST, misdn_cfg_pt::ml, NUM_PORT_ELEMENTS, port_cfg, port_spec, str, and type.
Referenced by misdn_cfg_destroy(), and misdn_cfg_init().
00475 { 00476 int i, j; 00477 int gn = map[MISDN_CFG_GROUPNAME]; 00478 union misdn_cfg_pt* free_list[max_ports + 2]; 00479 00480 memset(free_list, 0, sizeof(free_list)); 00481 free_list[0] = port_cfg[0]; 00482 for (i = 1; i <= max_ports; ++i) { 00483 if (port_cfg[i][gn].str) { 00484 /* we always have a groupname in the non-default case, so this is fine */ 00485 for (j = 1; j <= max_ports; ++j) { 00486 if (free_list[j] && free_list[j][gn].str == port_cfg[i][gn].str) 00487 break; 00488 else if (!free_list[j]) { 00489 free_list[j] = port_cfg[i]; 00490 break; 00491 } 00492 } 00493 } 00494 } 00495 for (j = 0; free_list[j]; ++j) { 00496 for (i = 0; i < NUM_PORT_ELEMENTS; ++i) { 00497 if (free_list[j][i].any) { 00498 if (port_spec[i].type == MISDN_CTYPE_MSNLIST) 00499 _free_msn_list(free_list[j][i].ml); 00500 else 00501 ast_free(free_list[j][i].any); 00502 } 00503 } 00504 } 00505 }
static int _parse | ( | union misdn_cfg_pt * | dest, | |
const char * | value, | |||
enum misdn_cfg_type | type, | |||
int | boolint_def | |||
) | [static] |
Definition at line 867 of file misdn_config.c.
References ast_calloc, ast_get_group(), ast_malloc, ast_strdupa, ast_true(), misdn_cfg_pt::grp, len(), MISDN_CTYPE_ASTGROUP, MISDN_CTYPE_BOOL, MISDN_CTYPE_BOOLINT, MISDN_CTYPE_INT, MISDN_CTYPE_MSNLIST, MISDN_CTYPE_STR, misdn_cfg_pt::ml, misdn_cfg_pt::num, misdn_cfg_pt::str, and strsep().
Referenced by _build_general_config(), _build_port_config(), and _fill_defaults().
00868 { 00869 int re = 0; 00870 int len, tmp; 00871 char *valtmp; 00872 char *tmp2 = ast_strdupa(value); 00873 00874 switch (type) { 00875 case MISDN_CTYPE_STR: 00876 if ((len = strlen(value))) { 00877 dest->str = ast_malloc((len + 1) * sizeof(char)); 00878 strncpy(dest->str, value, len); 00879 dest->str[len] = 0; 00880 } else { 00881 dest->str = ast_malloc(sizeof(char)); 00882 dest->str[0] = 0; 00883 } 00884 break; 00885 case MISDN_CTYPE_INT: 00886 { 00887 int res; 00888 00889 if (strchr(value,'x')) { 00890 res = sscanf(value, "%x", &tmp); 00891 } else { 00892 res = sscanf(value, "%d", &tmp); 00893 } 00894 if (res) { 00895 dest->num = ast_malloc(sizeof(int)); 00896 memcpy(dest->num, &tmp, sizeof(int)); 00897 } else 00898 re = -1; 00899 } 00900 break; 00901 case MISDN_CTYPE_BOOL: 00902 dest->num = ast_malloc(sizeof(int)); 00903 *(dest->num) = (ast_true(value) ? 1 : 0); 00904 break; 00905 case MISDN_CTYPE_BOOLINT: 00906 dest->num = ast_malloc(sizeof(int)); 00907 if (sscanf(value, "%d", &tmp)) { 00908 memcpy(dest->num, &tmp, sizeof(int)); 00909 } else { 00910 *(dest->num) = (ast_true(value) ? boolint_def : 0); 00911 } 00912 break; 00913 case MISDN_CTYPE_MSNLIST: 00914 for (valtmp = strsep(&tmp2, ","); valtmp; valtmp = strsep(&tmp2, ",")) { 00915 if ((len = strlen(valtmp))) { 00916 struct msn_list *ml = ast_malloc(sizeof(*ml)); 00917 ml->msn = ast_calloc(len+1, sizeof(char)); 00918 strncpy(ml->msn, valtmp, len); 00919 ml->next = dest->ml; 00920 dest->ml = ml; 00921 } 00922 } 00923 break; 00924 case MISDN_CTYPE_ASTGROUP: 00925 dest->grp = ast_malloc(sizeof(ast_group_t)); 00926 *(dest->grp) = ast_get_group(value); 00927 break; 00928 } 00929 00930 return re; 00931 }
static int get_cfg_position | ( | const char * | name, | |
int | type | |||
) | [static] |
Definition at line 434 of file misdn_config.c.
References GEN_CFG, gen_spec, NUM_GEN_ELEMENTS, NUM_PORT_ELEMENTS, PORT_CFG, and port_spec.
Referenced by _build_general_config(), _build_port_config(), and misdn_cfg_get_elem().
00435 { 00436 int i; 00437 00438 switch (type) { 00439 case PORT_CFG: 00440 for (i = 0; i < NUM_PORT_ELEMENTS; ++i) { 00441 if (!strcasecmp(name, port_spec[i].name)) 00442 return i; 00443 } 00444 break; 00445 case GEN_CFG: 00446 for (i = 0; i < NUM_GEN_ELEMENTS; ++i) { 00447 if (!strcasecmp(name, gen_spec[i].name)) 00448 return i; 00449 } 00450 } 00451 00452 return -1; 00453 }
void misdn_cfg_destroy | ( | void | ) |
Definition at line 1083 of file misdn_config.c.
References _free_general_cfg(), _free_port_cfg(), ast_free, ast_mutex_destroy(), config_mutex, general_cfg, map, misdn_cfg_lock(), misdn_cfg_unlock(), port_cfg, and ptp.
Referenced by unload_module().
01084 { 01085 misdn_cfg_lock(); 01086 01087 _free_port_cfg(); 01088 _free_general_cfg(); 01089 01090 ast_free(port_cfg); 01091 ast_free(general_cfg); 01092 ast_free(ptp); 01093 ast_free(map); 01094 01095 misdn_cfg_unlock(); 01096 ast_mutex_destroy(&config_mutex); 01097 }
void misdn_cfg_get | ( | int | port, | |
enum misdn_cfg_elements | elem, | |||
void * | buf, | |||
int | bufsize | |||
) |
Definition at line 516 of file misdn_config.c.
References misdn_cfg_pt::any, ast_copy_string(), ast_log(), gen_spec, general_cfg, LOG_WARNING, misdn_cfg_is_port_valid(), MISDN_CFG_LAST, misdn_cfg_lock(), MISDN_CFG_PTP, misdn_cfg_unlock(), MISDN_CTYPE_STR, port_cfg, port_spec, S_OR, str, and type.
Referenced by add_in_calls(), add_out_calls(), cb_events(), dialtone_indicate(), load_module(), misdn_bridge(), misdn_call(), misdn_cfg_update_ptp(), misdn_check_l2l1(), misdn_new(), misdn_request(), misdn_set_opt_exec(), process_ast_dsp(), read_config(), reload_config(), update_config(), and update_ec_config().
00517 { 00518 int place; 00519 00520 if ((elem < MISDN_CFG_LAST) && !misdn_cfg_is_port_valid(port)) { 00521 memset(buf, 0, bufsize); 00522 ast_log(LOG_WARNING, "Invalid call to misdn_cfg_get! Port number %d is not valid.\n", port); 00523 return; 00524 } 00525 00526 misdn_cfg_lock(); 00527 if (elem == MISDN_CFG_PTP) { 00528 if (!memcpy(buf, &ptp[port], (bufsize > ptp[port]) ? sizeof(ptp[port]) : bufsize)) 00529 memset(buf, 0, bufsize); 00530 } else { 00531 if ((place = map[elem]) < 0) { 00532 memset(buf, 0, bufsize); 00533 ast_log(LOG_WARNING, "Invalid call to misdn_cfg_get! Invalid element (%d) requested.\n", elem); 00534 } else { 00535 if (elem < MISDN_CFG_LAST) { 00536 switch (port_spec[place].type) { 00537 case MISDN_CTYPE_STR: 00538 if (port_cfg[port][place].str) { 00539 ast_copy_string(buf, port_cfg[port][place].str, bufsize); 00540 } else if (port_cfg[0][place].str) { 00541 ast_copy_string(buf, port_cfg[0][place].str, bufsize); 00542 } else 00543 memset(buf, 0, bufsize); 00544 break; 00545 default: 00546 if (port_cfg[port][place].any) 00547 memcpy(buf, port_cfg[port][place].any, bufsize); 00548 else if (port_cfg[0][place].any) 00549 memcpy(buf, port_cfg[0][place].any, bufsize); 00550 else 00551 memset(buf, 0, bufsize); 00552 } 00553 } else { 00554 switch (gen_spec[place].type) { 00555 case MISDN_CTYPE_STR: 00556 ast_copy_string(buf, S_OR(general_cfg[place].str, ""), bufsize); 00557 break; 00558 default: 00559 if (general_cfg[place].any) 00560 memcpy(buf, general_cfg[place].any, bufsize); 00561 else 00562 memset(buf, 0, bufsize); 00563 } 00564 } 00565 } 00566 } 00567 misdn_cfg_unlock(); 00568 }
void misdn_cfg_get_config_string | ( | int | port, | |
enum misdn_cfg_elements | elem, | |||
char * | buf, | |||
int | bufsize | |||
) |
Definition at line 741 of file misdn_config.c.
References ast_log(), ast_print_group(), BUFFERSIZE, gen_spec, general_cfg, LOG_WARNING, map, MISDN_CFG_FIRST, misdn_cfg_is_port_valid(), MISDN_CFG_LAST, misdn_cfg_lock(), MISDN_CFG_PTP, misdn_cfg_unlock(), MISDN_CTYPE_ASTGROUP, MISDN_CTYPE_BOOL, MISDN_CTYPE_BOOLINT, MISDN_CTYPE_INT, MISDN_CTYPE_MSNLIST, MISDN_CTYPE_STR, MISDN_GEN_FIRST, MISDN_GEN_LAST, misdn_cfg_pt::ml, msn_list::msn, name, msn_list::next, num, port_cfg, port_spec, ptp, str, and type.
00742 { 00743 int place; 00744 char tempbuf[BUFFERSIZE] = ""; 00745 struct msn_list *iter; 00746 00747 if ((elem < MISDN_CFG_LAST) && !misdn_cfg_is_port_valid(port)) { 00748 *buf = 0; 00749 ast_log(LOG_WARNING, "Invalid call to misdn_cfg_get_config_string! Port number %d is not valid.\n", port); 00750 return; 00751 } 00752 00753 place = map[elem]; 00754 00755 misdn_cfg_lock(); 00756 if (elem == MISDN_CFG_PTP) { 00757 snprintf(buf, bufsize, " -> ptp: %s", ptp[port] ? "yes" : "no"); 00758 } 00759 else if (elem > MISDN_CFG_FIRST && elem < MISDN_CFG_LAST) { 00760 switch (port_spec[place].type) { 00761 case MISDN_CTYPE_INT: 00762 case MISDN_CTYPE_BOOLINT: 00763 if (port_cfg[port][place].num) 00764 snprintf(buf, bufsize, " -> %s: %d", port_spec[place].name, *port_cfg[port][place].num); 00765 else if (port_cfg[0][place].num) 00766 snprintf(buf, bufsize, " -> %s: %d", port_spec[place].name, *port_cfg[0][place].num); 00767 else 00768 snprintf(buf, bufsize, " -> %s:", port_spec[place].name); 00769 break; 00770 case MISDN_CTYPE_BOOL: 00771 if (port_cfg[port][place].num) 00772 snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, *port_cfg[port][place].num ? "yes" : "no"); 00773 else if (port_cfg[0][place].num) 00774 snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, *port_cfg[0][place].num ? "yes" : "no"); 00775 else 00776 snprintf(buf, bufsize, " -> %s:", port_spec[place].name); 00777 break; 00778 case MISDN_CTYPE_ASTGROUP: 00779 if (port_cfg[port][place].grp) 00780 snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, 00781 ast_print_group(tempbuf, sizeof(tempbuf), *port_cfg[port][place].grp)); 00782 else if (port_cfg[0][place].grp) 00783 snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, 00784 ast_print_group(tempbuf, sizeof(tempbuf), *port_cfg[0][place].grp)); 00785 else 00786 snprintf(buf, bufsize, " -> %s:", port_spec[place].name); 00787 break; 00788 case MISDN_CTYPE_MSNLIST: 00789 if (port_cfg[port][place].ml) 00790 iter = port_cfg[port][place].ml; 00791 else 00792 iter = port_cfg[0][place].ml; 00793 if (iter) { 00794 for (; iter; iter = iter->next) { 00795 strncat(tempbuf, iter->msn, sizeof(tempbuf) - strlen(tempbuf) - 1); 00796 } 00797 tempbuf[strlen(tempbuf)-2] = 0; 00798 } 00799 snprintf(buf, bufsize, " -> msns: %s", *tempbuf ? tempbuf : "none"); 00800 break; 00801 case MISDN_CTYPE_STR: 00802 if ( port_cfg[port][place].str) { 00803 snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, port_cfg[port][place].str); 00804 } else if (port_cfg[0][place].str) { 00805 snprintf(buf, bufsize, " -> %s: %s", port_spec[place].name, port_cfg[0][place].str); 00806 } else { 00807 snprintf(buf, bufsize, " -> %s:", port_spec[place].name); 00808 } 00809 break; 00810 } 00811 } else if (elem > MISDN_GEN_FIRST && elem < MISDN_GEN_LAST) { 00812 switch (gen_spec[place].type) { 00813 case MISDN_CTYPE_INT: 00814 case MISDN_CTYPE_BOOLINT: 00815 if (general_cfg[place].num) 00816 snprintf(buf, bufsize, " -> %s: %d", gen_spec[place].name, *general_cfg[place].num); 00817 else 00818 snprintf(buf, bufsize, " -> %s:", gen_spec[place].name); 00819 break; 00820 case MISDN_CTYPE_BOOL: 00821 if (general_cfg[place].num) 00822 snprintf(buf, bufsize, " -> %s: %s", gen_spec[place].name, *general_cfg[place].num ? "yes" : "no"); 00823 else 00824 snprintf(buf, bufsize, " -> %s:", gen_spec[place].name); 00825 break; 00826 case MISDN_CTYPE_STR: 00827 if ( general_cfg[place].str) { 00828 snprintf(buf, bufsize, " -> %s: %s", gen_spec[place].name, general_cfg[place].str); 00829 } else { 00830 snprintf(buf, bufsize, " -> %s:", gen_spec[place].name); 00831 } 00832 break; 00833 default: 00834 snprintf(buf, bufsize, " -> type of %s not handled yet", gen_spec[place].name); 00835 break; 00836 } 00837 } else { 00838 *buf = 0; 00839 ast_log(LOG_WARNING, "Invalid call to misdn_cfg_get_config_string! Invalid config element (%d) requested.\n", elem); 00840 } 00841 misdn_cfg_unlock(); 00842 }
void misdn_cfg_get_desc | ( | enum misdn_cfg_elements | elem, | |
void * | buf, | |||
int | bufsize, | |||
void * | buf_default, | |||
int | bufsize_default | |||
) |
Definition at line 617 of file misdn_config.c.
References ast_copy_string(), misdn_cfg_spec::def, desc, gen_spec, MISDN_CFG_FIRST, MISDN_CFG_GROUPNAME, MISDN_CFG_LAST, MISDN_GEN_FIRST, MISDN_GEN_LAST, NO_DEFAULT, and port_spec.
Referenced by show_config_description().
00618 { 00619 int place = map[elem]; 00620 struct misdn_cfg_spec *spec = NULL; 00621 00622 /* here comes a hack to replace the (not existing) "name" element with the "ports" element */ 00623 if (elem == MISDN_CFG_GROUPNAME) { 00624 ast_copy_string(buf, ports_description, bufsize); 00625 if (buf_default && bufsize_default) 00626 memset(buf_default, 0, 1); 00627 return; 00628 } 00629 00630 if ((elem > MISDN_CFG_FIRST) && (elem < MISDN_CFG_LAST)) 00631 spec = (struct misdn_cfg_spec *)port_spec; 00632 else if ((elem > MISDN_GEN_FIRST) && (elem < MISDN_GEN_LAST)) 00633 spec = (struct misdn_cfg_spec *)gen_spec; 00634 00635 if (!spec || !spec[place].desc) 00636 memset(buf, 0, 1); 00637 else { 00638 ast_copy_string(buf, spec[place].desc, bufsize); 00639 if (buf_default && bufsize) { 00640 if (!strcmp(spec[place].def, NO_DEFAULT)) 00641 memset(buf_default, 0, 1); 00642 else 00643 ast_copy_string(buf_default, spec[place].def, bufsize_default); 00644 } 00645 } 00646 }
enum misdn_cfg_elements misdn_cfg_get_elem | ( | char * | name | ) |
Definition at line 570 of file misdn_config.c.
References misdn_cfg_spec::elem, GEN_CFG, gen_spec, get_cfg_position(), MISDN_CFG_FIRST, MISDN_CFG_GROUPNAME, PORT_CFG, and port_spec.
Referenced by handle_cli_misdn_show_config().
00571 { 00572 int pos; 00573 00574 /* here comes a hack to replace the (not existing) "name" element with the "ports" element */ 00575 if (!strcmp(name, "ports")) 00576 return MISDN_CFG_GROUPNAME; 00577 if (!strcmp(name, "name")) 00578 return MISDN_CFG_FIRST; 00579 00580 pos = get_cfg_position(name, PORT_CFG); 00581 if (pos >= 0) 00582 return port_spec[pos].elem; 00583 00584 pos = get_cfg_position(name, GEN_CFG); 00585 if (pos >= 0) 00586 return gen_spec[pos].elem; 00587 00588 return MISDN_CFG_FIRST; 00589 }
void misdn_cfg_get_name | ( | enum misdn_cfg_elements | elem, | |
void * | buf, | |||
int | bufsize | |||
) |
Definition at line 591 of file misdn_config.c.
References ast_copy_string(), gen_spec, MISDN_CFG_FIRST, MISDN_CFG_GROUPNAME, MISDN_CFG_LAST, MISDN_CFG_PTP, MISDN_GEN_FIRST, MISDN_GEN_LAST, name, and port_spec.
Referenced by complete_show_config(), and show_config_description().
00592 { 00593 struct misdn_cfg_spec *spec = NULL; 00594 int place = map[elem]; 00595 00596 /* the ptp hack */ 00597 if (elem == MISDN_CFG_PTP) { 00598 memset(buf, 0, 1); 00599 return; 00600 } 00601 00602 /* here comes a hack to replace the (not existing) "name" element with the "ports" element */ 00603 if (elem == MISDN_CFG_GROUPNAME) { 00604 if (!snprintf(buf, bufsize, "ports")) 00605 memset(buf, 0, 1); 00606 return; 00607 } 00608 00609 if ((elem > MISDN_CFG_FIRST) && (elem < MISDN_CFG_LAST)) 00610 spec = (struct misdn_cfg_spec *)port_spec; 00611 else if ((elem > MISDN_GEN_FIRST) && (elem < MISDN_GEN_LAST)) 00612 spec = (struct misdn_cfg_spec *)gen_spec; 00613 00614 ast_copy_string(buf, spec ? spec[place].name : "", bufsize); 00615 }
int misdn_cfg_get_next_port | ( | int | port | ) |
Definition at line 844 of file misdn_config.c.
References map, max_ports, MISDN_CFG_GROUPNAME, misdn_cfg_lock(), misdn_cfg_unlock(), port_cfg, and str.
Referenced by complete_show_config(), handle_cli_misdn_show_ports_stats(), handle_cli_misdn_show_stacks(), load_module(), misdn_cfg_get_next_port_spin(), misdn_check_l2l1(), misdn_new(), misdn_request(), and update_name().
00845 { 00846 int p = -1; 00847 int gn = map[MISDN_CFG_GROUPNAME]; 00848 00849 misdn_cfg_lock(); 00850 for (port++; port <= max_ports; port++) { 00851 if (port_cfg[port][gn].str) { 00852 p = port; 00853 break; 00854 } 00855 } 00856 misdn_cfg_unlock(); 00857 00858 return p; 00859 }
int misdn_cfg_get_next_port_spin | ( | int | port | ) |
Definition at line 861 of file misdn_config.c.
References misdn_cfg_get_next_port().
Referenced by misdn_request().
00862 { 00863 int p = misdn_cfg_get_next_port(port); 00864 return (p > 0) ? p : misdn_cfg_get_next_port(0); 00865 }
void misdn_cfg_get_ports_string | ( | char * | ports | ) |
Generate a comma separated list of all active ports.
Definition at line 715 of file misdn_config.c.
References map, max_ports, MISDN_CFG_GROUPNAME, misdn_cfg_lock(), misdn_cfg_unlock(), port_cfg, ptp, and str.
Referenced by load_module().
00716 { 00717 char tmp[16]; 00718 int l, i; 00719 int gn = map[MISDN_CFG_GROUPNAME]; 00720 00721 *ports = 0; 00722 00723 misdn_cfg_lock(); 00724 for (i = 1; i <= max_ports; i++) { 00725 if (port_cfg[i][gn].str) { 00726 if (ptp[i]) 00727 sprintf(tmp, "%dptp,", i); 00728 else 00729 sprintf(tmp, "%d,", i); 00730 strcat(ports, tmp); 00731 } 00732 } 00733 misdn_cfg_unlock(); 00734 00735 if ((l = strlen(ports))) { 00736 /* Strip trailing ',' */ 00737 ports[l-1] = 0; 00738 } 00739 }
int misdn_cfg_init | ( | int | this_max_ports, | |
int | reload | |||
) |
Definition at line 1099 of file misdn_config.c.
References _build_general_config(), _build_port_config(), _enum_array_map(), _fill_defaults(), _free_general_cfg(), _free_port_cfg(), ast_calloc, ast_category_browse(), ast_config_destroy(), ast_config_load2(), ast_log(), ast_mutex_init(), ast_variable_browse(), config, CONFIG_FLAG_FILEUNCHANGED, config_flags, config_mutex, CONFIG_STATUS_FILEUNCHANGED, default_jbconf, general_cfg, global_jbconf, LOG_WARNING, map, max_ports, misdn_cfg_lock(), misdn_cfg_unlock(), MISDN_GEN_LAST, NUM_GEN_ELEMENTS, NUM_PORT_ELEMENTS, port_cfg, and ptp.
Referenced by load_module(), and misdn_cfg_reload().
01100 { 01101 char config[] = "misdn.conf"; 01102 char *cat, *p; 01103 int i; 01104 struct ast_config *cfg; 01105 struct ast_variable *v; 01106 struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 }; 01107 01108 if (!(cfg = ast_config_load2(config, "chan_misdn", config_flags))) { 01109 ast_log(LOG_WARNING, "missing file: misdn.conf\n"); 01110 return -1; 01111 } else if (cfg == CONFIG_STATUS_FILEUNCHANGED) 01112 return 0; 01113 01114 ast_mutex_init(&config_mutex); 01115 01116 /* Copy the default jb config over global_jbconf */ 01117 memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf)); 01118 01119 misdn_cfg_lock(); 01120 01121 if (this_max_ports) { 01122 /* this is the first run */ 01123 max_ports = this_max_ports; 01124 map = ast_calloc(MISDN_GEN_LAST + 1, sizeof(int)); 01125 if (_enum_array_map()) 01126 return -1; 01127 p = ast_calloc(1, (max_ports + 1) * sizeof(union misdn_cfg_pt *) 01128 + (max_ports + 1) * NUM_PORT_ELEMENTS * sizeof(union misdn_cfg_pt)); 01129 port_cfg = (union misdn_cfg_pt **)p; 01130 p += (max_ports + 1) * sizeof(union misdn_cfg_pt *); 01131 for (i = 0; i <= max_ports; ++i) { 01132 port_cfg[i] = (union misdn_cfg_pt *)p; 01133 p += NUM_PORT_ELEMENTS * sizeof(union misdn_cfg_pt); 01134 } 01135 general_cfg = ast_calloc(1, sizeof(union misdn_cfg_pt *) * NUM_GEN_ELEMENTS); 01136 ptp = ast_calloc(max_ports + 1, sizeof(int)); 01137 } 01138 else { 01139 /* misdn reload */ 01140 _free_port_cfg(); 01141 _free_general_cfg(); 01142 memset(port_cfg[0], 0, NUM_PORT_ELEMENTS * sizeof(union misdn_cfg_pt) * (max_ports + 1)); 01143 memset(general_cfg, 0, sizeof(union misdn_cfg_pt *) * NUM_GEN_ELEMENTS); 01144 memset(ptp, 0, sizeof(int) * (max_ports + 1)); 01145 } 01146 01147 cat = ast_category_browse(cfg, NULL); 01148 01149 while(cat) { 01150 v = ast_variable_browse(cfg, cat); 01151 if (!strcasecmp(cat, "general")) { 01152 _build_general_config(v); 01153 } else { 01154 _build_port_config(v, cat); 01155 } 01156 cat = ast_category_browse(cfg, cat); 01157 } 01158 01159 _fill_defaults(); 01160 01161 misdn_cfg_unlock(); 01162 ast_config_destroy(cfg); 01163 01164 return 0; 01165 }
int misdn_cfg_is_group_method | ( | char * | group, | |
enum misdn_cfg_method | meth | |||
) |
Definition at line 680 of file misdn_config.c.
References map, max_ports, METHOD_ROUND_ROBIN, METHOD_STANDARD, METHOD_STANDARD_DEC, MISDN_CFG_GROUPNAME, misdn_cfg_lock(), MISDN_CFG_METHOD, misdn_cfg_unlock(), port_cfg, misdn_cfg_pt::str, and str.
Referenced by misdn_request().
00681 { 00682 int i, re = 0; 00683 char *method ; 00684 00685 misdn_cfg_lock(); 00686 00687 method = port_cfg[0][map[MISDN_CFG_METHOD]].str; 00688 00689 for (i = 1; i <= max_ports; i++) { 00690 if (port_cfg[i] && port_cfg[i][map[MISDN_CFG_GROUPNAME]].str) { 00691 if (!strcasecmp(port_cfg[i][map[MISDN_CFG_GROUPNAME]].str, group)) 00692 method = (port_cfg[i][map[MISDN_CFG_METHOD]].str ? 00693 port_cfg[i][map[MISDN_CFG_METHOD]].str : port_cfg[0][map[MISDN_CFG_METHOD]].str); 00694 } 00695 } 00696 00697 if (method) { 00698 switch (meth) { 00699 case METHOD_STANDARD: re = !strcasecmp(method, "standard"); 00700 break; 00701 case METHOD_ROUND_ROBIN: re = !strcasecmp(method, "round_robin"); 00702 break; 00703 case METHOD_STANDARD_DEC: re = !strcasecmp(method, "standard_dec"); 00704 break; 00705 } 00706 } 00707 misdn_cfg_unlock(); 00708 00709 return re; 00710 }
int misdn_cfg_is_msn_valid | ( | int | port, | |
char * | msn | |||
) |
Definition at line 648 of file misdn_config.c.
References ast_extension_match(), ast_log(), LOG_WARNING, misdn_cfg_is_port_valid(), misdn_cfg_lock(), MISDN_CFG_MSNS, misdn_cfg_pt::ml, msn_list::msn, msn_list::next, and port_cfg.
Referenced by cb_events().
00649 { 00650 int re = 0; 00651 struct msn_list *iter; 00652 00653 if (!misdn_cfg_is_port_valid(port)) { 00654 ast_log(LOG_WARNING, "Invalid call to misdn_cfg_is_msn_valid! Port number %d is not valid.\n", port); 00655 return 0; 00656 } 00657 00658 misdn_cfg_lock(); 00659 if (port_cfg[port][map[MISDN_CFG_MSNS]].ml) 00660 iter = port_cfg[port][map[MISDN_CFG_MSNS]].ml; 00661 else 00662 iter = port_cfg[0][map[MISDN_CFG_MSNS]].ml; 00663 for (; iter; iter = iter->next) 00664 if (*(iter->msn) == '*' || ast_extension_match(iter->msn, msn)) { 00665 re = 1; 00666 break; 00667 } 00668 misdn_cfg_unlock(); 00669 00670 return re; 00671 }
int misdn_cfg_is_port_valid | ( | int | port | ) |
Definition at line 673 of file misdn_config.c.
References map, max_ports, MISDN_CFG_GROUPNAME, port_cfg, and str.
Referenced by misdn_cfg_get(), misdn_cfg_get_config_string(), misdn_cfg_is_msn_valid(), and misdn_cfg_update_ptp().
00674 { 00675 int gn = map[MISDN_CFG_GROUPNAME]; 00676 00677 return (port >= 1 && port <= max_ports && port_cfg[port][gn].str); 00678 }
static void misdn_cfg_lock | ( | void | ) | [inline, static] |
Definition at line 455 of file misdn_config.c.
References ast_mutex_lock().
Referenced by misdn_cfg_destroy(), misdn_cfg_get(), misdn_cfg_get_config_string(), misdn_cfg_get_next_port(), misdn_cfg_get_ports_string(), misdn_cfg_init(), misdn_cfg_is_group_method(), misdn_cfg_is_msn_valid(), and misdn_cfg_update_ptp().
00456 { 00457 ast_mutex_lock(&config_mutex); 00458 }
void misdn_cfg_reload | ( | void | ) |
Definition at line 1078 of file misdn_config.c.
References misdn_cfg_init().
Referenced by reload_config().
01079 { 01080 misdn_cfg_init(0, 1); 01081 }
static void misdn_cfg_unlock | ( | void | ) | [inline, static] |
Definition at line 460 of file misdn_config.c.
References ast_mutex_unlock().
Referenced by misdn_cfg_destroy(), misdn_cfg_get(), misdn_cfg_get_config_string(), misdn_cfg_get_next_port(), misdn_cfg_get_ports_string(), misdn_cfg_init(), misdn_cfg_is_group_method(), and misdn_cfg_update_ptp().
00461 { 00462 ast_mutex_unlock(&config_mutex); 00463 }
void misdn_cfg_update_ptp | ( | void | ) |
Definition at line 1009 of file misdn_config.c.
References ast_log(), ast_strlen_zero(), BUFFERSIZE, errno, LOG_WARNING, max_ports, misdn_cfg_get(), misdn_cfg_is_port_valid(), misdn_cfg_lock(), misdn_cfg_unlock(), MISDN_GEN_MISDN_INIT, and ptp.
Referenced by load_module(), and reload_config().
01010 { 01011 #ifndef MISDN_1_2 01012 char misdn_init[BUFFERSIZE]; 01013 char line[BUFFERSIZE]; 01014 FILE *fp; 01015 char *tok, *p, *end; 01016 int port; 01017 01018 misdn_cfg_get(0, MISDN_GEN_MISDN_INIT, &misdn_init, sizeof(misdn_init)); 01019 01020 if (!ast_strlen_zero(misdn_init)) { 01021 fp = fopen(misdn_init, "r"); 01022 if (fp) { 01023 while(fgets(line, sizeof(line), fp)) { 01024 if (!strncmp(line, "nt_ptp", 6)) { 01025 for (tok = strtok_r(line,",=", &p); 01026 tok; 01027 tok = strtok_r(NULL,",=", &p)) { 01028 port = strtol(tok, &end, 10); 01029 if (end != tok && misdn_cfg_is_port_valid(port)) { 01030 misdn_cfg_lock(); 01031 ptp[port] = 1; 01032 misdn_cfg_unlock(); 01033 } 01034 } 01035 } 01036 } 01037 fclose(fp); 01038 } else { 01039 ast_log(LOG_WARNING,"Couldn't open %s: %s\n", misdn_init, strerror(errno)); 01040 } 01041 } 01042 #else 01043 int i; 01044 int proto; 01045 char filename[128]; 01046 FILE *fp; 01047 01048 for (i = 1; i <= max_ports; ++i) { 01049 snprintf(filename, sizeof(filename), "/sys/class/mISDN-stacks/st-%08x/protocol", i << 8); 01050 fp = fopen(filename, "r"); 01051 if (!fp) { 01052 ast_log(LOG_WARNING, "Could not open %s: %s\n", filename, strerror(errno)); 01053 continue; 01054 } 01055 if (fscanf(fp, "0x%08x", &proto) != 1) 01056 ast_log(LOG_WARNING, "Could not parse contents of %s!\n", filename); 01057 else 01058 ptp[i] = proto & 1<<5 ? 1 : 0; 01059 fclose(fp); 01060 } 01061 #endif 01062 }
struct ast_jb_conf* misdn_get_global_jbconf | ( | void | ) |
Definition at line 1167 of file misdn_config.c.
References global_jbconf.
Referenced by misdn_new().
01167 { 01168 return &global_jbconf; 01169 }
ast_mutex_t config_mutex [static] |
Definition at line 390 of file misdn_config.c.
Referenced by misdn_cfg_destroy(), and misdn_cfg_init().
struct ast_jb_conf default_jbconf [static] |
Global jitterbuffer configuration - by default, jb is disabled
Definition at line 51 of file misdn_config.c.
struct misdn_cfg_spec gen_spec[] [static] |
Definition at line 341 of file misdn_config.c.
Referenced by _build_general_config(), _enum_array_map(), _fill_defaults(), get_cfg_position(), misdn_cfg_get(), misdn_cfg_get_config_string(), misdn_cfg_get_desc(), misdn_cfg_get_elem(), and misdn_cfg_get_name().
union misdn_cfg_pt* general_cfg [static] |
Definition at line 384 of file misdn_config.c.
Referenced by _build_general_config(), _fill_defaults(), _free_general_cfg(), misdn_cfg_destroy(), misdn_cfg_get(), misdn_cfg_get_config_string(), and misdn_cfg_init().
struct ast_jb_conf global_jbconf [static] |
Definition at line 59 of file misdn_config.c.
int* map [static] |
Definition at line 388 of file misdn_config.c.
Referenced by append_mapping(), build_mapping(), build_translators(), clear_config_maps(), destroy_map(), dundi_lookup_local(), dundi_show_mappings(), find_engine(), find_transcoders(), get_mapping_weight(), handle_cli_core_show_config_mappings(), last_message_index(), mark_mappings(), misdn_cfg_destroy(), misdn_cfg_get_config_string(), misdn_cfg_get_next_port(), misdn_cfg_get_ports_string(), misdn_cfg_init(), misdn_cfg_is_group_method(), misdn_cfg_is_port_valid(), and prune_mappings().
int max_ports [static] |
Definition at line 382 of file misdn_config.c.
union misdn_cfg_pt** port_cfg [static] |
Definition at line 380 of file misdn_config.c.
Referenced by _fill_defaults(), _free_port_cfg(), misdn_cfg_destroy(), misdn_cfg_get(), misdn_cfg_get_config_string(), misdn_cfg_get_next_port(), misdn_cfg_get_ports_string(), misdn_cfg_init(), misdn_cfg_is_group_method(), misdn_cfg_is_msn_valid(), and misdn_cfg_is_port_valid().
struct misdn_cfg_spec port_spec[] [static] |
Definition at line 96 of file misdn_config.c.
Referenced by _build_port_config(), _enum_array_map(), _fill_defaults(), _free_port_cfg(), get_cfg_position(), misdn_cfg_get(), misdn_cfg_get_config_string(), misdn_cfg_get_desc(), misdn_cfg_get_elem(), and misdn_cfg_get_name().
const char ports_description[] [static] |
Initial value:
"Define your ports, e.g. 1,2 (depends on mISDN-driver loading order)."
Definition at line 93 of file misdn_config.c.
int* ptp [static] |
Definition at line 386 of file misdn_config.c.
Referenced by _build_port_config(), misdn_cfg_destroy(), misdn_cfg_get_config_string(), misdn_cfg_get_ports_string(), misdn_cfg_init(), misdn_cfg_update_ptp(), and misdn_lib_init().