SIP Express Router v0.8.8 - Developer's Guide | ||
---|---|---|
<<< Previous | Next >>> |
The server can load additional functionality through modules. Module loading related functions and module interface will be described in this section.
All the data structures and functions mentioned in this section can be found in files sr_module.h and sr_module.c.
Each loaded module is represented by an instance of sr_module structure. All the instances are linked. There is a global variable modules defined in file sr_module.c which is head of linked-list of all loaded modules.
Detailed description of the structure follows:
struct sr_module{ char* path; void* handle; struct module_exports* exports; struct sr_module* next; }; |
Fields and their description:
path - Path to the module. This is the path you pass as parameter to loadmodule function in the config file.
handle - Handle returned by dlopen.
exports - Pointer to structure describing interface of the module (will be described later).
next - Pointer to the next sr_module structure in the linked list.
<<< Previous | Home | Next >>> |
The Parser Organization | Structure module_exports |