mod.c File Reference


Detailed Description

CDiameterPeer SER module interface and definitions.

Author:
Dragos Vingarzan vingarzan -at- fokus dot fraunhofer dot de

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_configconfig
 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.


Function Documentation

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.

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 }


Variable Documentation

MODULE_VERSION char* config_file = "DiameterPeer.xml"

default DiameterPeer configuration filename

Definition at line 66 of file mod.c.

Referenced by cdp_init().

dp_config* config

DiameterPeer configuration structure.

Definition at line 76 of file diameter_peer.c.

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.

Definition at line 104 of file mod.c.

param_export_t cdp_params[] [static]

Initial value:

 {  
    { "config_file",PARAM_STRING,&config_file}, 
    { 0, 0, 0 }
}
Exported parameters.

Definition at line 144 of file mod.c.

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 
}
Exported module interface.

Definition at line 153 of file mod.c.


Generated on Fri Jul 18 04:14:01 2008 for Open IMS Core CSCFs by  doxygen 1.5.2