# Structure

sr_module

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.