sr_module.c File Reference

modules/plug-in structures declarations More...

#include "sr_module.h"
#include "dprint.h"
#include "error.h"
#include "mem/mem.h"
#include "pt.h"
#include <strings.h>
#include <stdlib.h>
#include <string.h>

Include dependency graph for sr_module.c:

Go to the source code of this file.

Functions

int count_module_procs (void)
 Counts the additional the number of processes requested by modules.
void destroy_modules (void)
cmd_export_tfind_cmd_export_t (char *name, int param_no, int flags)
cmd_function find_export (char *name, int param_no, int flags)
cmd_function find_mod_export (char *mod, char *name, int param_no, int flags)
void * find_param_export (char *mod, char *name, modparam_t type)
 Find a parameter with given type and return it's address in memory If there is no such parameter, NULL is returned.
int init_child (int rank)
static int init_mod (struct sr_module *m)
static int init_mod_child (struct sr_module *m, int rank, char *type)
int init_modules (void)
int module_loaded (char *name)
 Check if module is loaded.
int register_module (struct module_exports *e, char *path, void *handle)
int sr_load_module (char *path)
int start_module_procs (void)
 Forks and starts the additional processes required by modules.
static int version_control (void *handle, char *path)

Variables

struct sr_modulemodules = 0


Detailed Description

modules/plug-in structures declarations

Definition in file sr_module.c.


Function Documentation

int count_module_procs ( void   ) 

Counts the additional the number of processes requested by modules.

Definition at line 468 of file sr_module.c.

References sr_module::exports, proc_export_::function, LM_DBG, proc_export_::name, sr_module::next, proc_export_::no, and module_exports::procs.

Referenced by init_multi_proc_support().

void destroy_modules ( void   ) 

cmd_export_t* find_cmd_export_t ( char *  name,
int  param_no,
int  flags 
)

cmd_function find_export ( char *  name,
int  param_no,
int  flags 
)

cmd_function find_mod_export ( char *  mod,
char *  name,
int  param_no,
int  flags 
)

void* find_param_export ( char *  mod,
char *  name,
modparam_t  type 
)

Find a parameter with given type and return it's address in memory If there is no such parameter, NULL is returned.

Definition at line 289 of file sr_module.c.

References sr_module::exports, LM_DBG, param_export_::name, module_exports::name, sr_module::next, param_export_::param_pointer, module_exports::params, sr_module::path, and param_export_::type.

Referenced by mod_init().

int init_child ( int  rank  ) 

Definition at line 368 of file sr_module.c.

References init_mod_child(), PROC_MAIN, PROC_TCP_MAIN, and PROC_TIMER.

Referenced by main_loop(), and start_timer_processes().

static int init_mod ( struct sr_module m  )  [static]

static int init_mod_child ( struct sr_module m,
int  rank,
char *  type 
) [static]

int init_modules ( void   ) 

Definition at line 446 of file sr_module.c.

References init_mod().

Referenced by main().

int module_loaded ( char *  name  ) 

Check if module is loaded.

Returns:
Returns 1 if the module with name 'name' is loaded, and zero otherwise.

Definition at line 452 of file sr_module.c.

References sr_module::exports, module_exports::name, and sr_module::next.

Referenced by handle_openserSIPProxyAuthMethod(), handle_openserSIPProxyRecordRoute(), handle_openserSIPProxyStatefulness(), init_openserSIPMethodSupportedTable(), and mod_init().

int register_module ( struct module_exports e,
char *  path,
void *  handle 
)

int sr_load_module ( char *  path  ) 

int start_module_procs ( void   ) 

static int version_control ( void *  handle,
char *  path 
) [inline, static]

Definition at line 99 of file sr_module.c.

References KAMAILIO_COMPILE_FLAGS, KAMAILIO_FULL_VERSION, LM_CRIT, and LM_ERR.

Referenced by sr_load_module().


Variable Documentation

struct sr_module* modules = 0

Definition at line 53 of file sr_module.c.

Referenced by forward_reply(), and set_mod_param_regex().


Generated on Thu May 24 12:00:43 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6