Definition in file mod.c.
#include "mod.h"
#include "diameter_peer.h"
#include "config.h"
#include "cdp_load.h"
Go to the source code of this file.
Functions | |
| static int | cdp_init (void) |
| Module init function. | |
| static int | cdp_child_init (int rank) |
| Child init function. | |
| static int | cdp_exit (void) |
| Module termination function. | |
Variables | |
| MODULE_VERSION char * | config_file = "DiameterPeer.xml" |
| default DiameterPeer configuration filename | |
| dp_config * | config |
| DiameterPeer configuration structure. | |
| static cmd_export_t | cdp_cmds [] |
| Exported functions. | |
| static param_export_t | cdp_params [] |
| Exported parameters. | |
| module_exports | exports |
| Exported module interface. | |
| static int cdp_init | ( | void | ) | [static] |
Module init function.
Definition at line 174 of file mod.c.
References config, config_file, diameter_peer_init(), M_NAME, dp_config::peers_cnt, and dp_config::workers.
00175 { 00176 LOG(L_INFO,"INFO:"M_NAME":cdp_init(): CDiameterPeer initializing\n"); 00177 if (!diameter_peer_init(config_file)){ 00178 LOG(L_CRIT,"ERR:"M_NAME":cdp_init(): error initializing the diameter peer\n"); 00179 return 1; 00180 } 00181 register_procs(2+config->workers + 2 * config->peers_cnt); 00182 return 0; 00183 }
| static int cdp_child_init | ( | int | rank | ) | [static] |
Child init function.
| rank | - id of the child |
Definition at line 190 of file mod.c.
References diameter_peer_start(), and M_NAME.
00191 { 00192 if (rank == PROC_MAIN) { 00193 LOG(L_INFO,"INFO:"M_NAME":cdp_child_init(): CDiameterPeer starting ...\n"); 00194 diameter_peer_start(0); 00195 LOG(L_INFO,"INFO:"M_NAME":cdp_child_init(): ... CDiameterPeer started\n"); 00196 } 00197 00198 return 0; 00199 }
| static int cdp_exit | ( | void | ) | [static] |
Module termination function.
Definition at line 206 of file mod.c.
References diameter_peer_destroy(), and M_NAME.
00207 { 00208 LOG(L_INFO,"INFO:"M_NAME":cdp_exit(): CDiameterPeer stoping ...\n"); 00209 diameter_peer_destroy(); 00210 LOG(L_INFO,"INFO:"M_NAME":cdp_exit(): ... CDiameterPeer stoped\n"); 00211 return 0; 00212 }
| MODULE_VERSION char* config_file = "DiameterPeer.xml" |
default DiameterPeer configuration filename
Definition at line 66 of file mod.c.
Referenced by cdp_init().
cmd_export_t cdp_cmds[] [static] |
Exported functions.
This is the API available for use from other SER modules. If you require more, please add them here.
param_export_t cdp_params[] [static] |
Initial value:
{
{ "config_file",PARAM_STRING,&config_file},
{ 0, 0, 0 }
}
| struct module_exports exports |
Initial value:
{
"cdp",
cdp_cmds,
0,
cdp_params,
cdp_init,
(response_function) 0,
(destroy_function) cdp_exit,
0,
(child_init_function) cdp_child_init
}
1.5.2