Asterisk - The Open Source Telephony Project GIT-master-67613d1
Data Fields
ast_module_info Struct Reference

#include <module.h>

Collaboration diagram for ast_module_info:
Collaboration graph
[legend]

Data Fields

const char buildopt_sum [33]
 
const char * description
 
const char * enhances
 Modules that we provide enhanced functionality for. More...
 
unsigned int flags
 
const char * key
 
enum ast_module_load_result(* load )(void)
 
unsigned char load_pri
 
const char * name
 
const char *const char * optional_modules
 Comma-separated list of optionally required modules. More...
 
int(* reload )(void)
 
void * reserved1
 
void * reserved2
 
void * reserved3
 
void * reserved4
 
struct ast_moduleself
 
enum ast_module_support_level support_level
 
int(* unload )(void)
 

Detailed Description

Definition at line 336 of file module.h.

Field Documentation

◆ buildopt_sum

const char buildopt_sum[33]

The value of AST_BUILDOPT_SUM when this module was compiled

Definition at line 363 of file module.h.

Referenced by inspect_module().

◆ description

const char* description

◆ enhances

const char* enhances

Modules that we provide enhanced functionality for.

This is similar to a "requires" but specifies that we add functionality to the other modules. Any module that requires something we "enhances" will also require us, but only if we are dlopen'ed.

Example:

  • res_fax_spandsp has .enhances = "res_fax".
  • res_my_module has .requires = "res_fax" but has no direct knowledge of res_fax_spandsp.

This forces the following startup order among the 3 modules: 1) res_fax starts. 2) res_fax_spandsp starts, holds a reference to res_fax. 3) res_mymod starts, holds a reference to res_fax and res_fax_spandsp.

If res_fax_spandsp were not being loaded res_mymod would load with res_fax only. If res_fax_spandsp were later loaded res_mymod would get a reference to it.

Definition at line 406 of file module.h.

Referenced by module_post_register().

◆ flags

unsigned int flags

Definition at line 360 of file module.h.

◆ key

const char* key

This holds the ASTERISK_GPL_KEY, signifying that you agree to the terms of the Asterisk license as stated in the ASTERISK_GPL_KEY. Your module will not load if it does not return the EXACT key string.

Definition at line 359 of file module.h.

Referenced by inspect_module().

◆ load

enum ast_module_load_result(* load) (void)

Register stuff etc. Optional.

Definition at line 342 of file module.h.

Referenced by ApiDeclaration::load_file(), ResourceListing::load_file(), and start_resource().

◆ load_pri

unsigned char load_pri

This value represents the order in which a module's load() function is initialized. The lower this value, the higher the priority. The value is only checked if the AST_MODFLAG_LOAD_ORDER flag is set. If the AST_MODFLAG_LOAD_ORDER flag is not set, this value will never be read and the module will be given the lowest possible priority on load.

Definition at line 370 of file module.h.

Referenced by start_resource_attempt().

◆ name

const char* name

Name of the module for loader reference and CLI commands

Definition at line 350 of file module.h.

Referenced by ast_module_name(), PathSegment::get_child(), Parameter::load(), Property::load(), SwaggerType::load(), module_reffed_deps_add(), module_reffed_deps_add_dep_enhancers(), and start_resource().

◆ optional_modules

const char* const char* optional_modules

Comma-separated list of optionally required modules.

Modules which must always be started first, in comma-separated string format.

The listed modules are optional, but load order is enforced. For example app_voicemail optionally requires res_adsi. This means that app_voicemail will happily load without res_adsi, but if both are being loaded the module loader will force res_adsi to start first.

Definition at line 383 of file module.h.

Referenced by module_post_register().

◆ reload

int(* reload) (void)

Config etc. Optional.

Definition at line 346 of file module.h.

Referenced by module_matches_helper_type().

◆ reserved1

void* reserved1

These reserved fields should be NULL, they exist to allow addition to this structure in a non-breaking way.

Definition at line 410 of file module.h.

◆ reserved2

void* reserved2

Definition at line 411 of file module.h.

◆ reserved3

void* reserved3

Definition at line 412 of file module.h.

◆ reserved4

void* reserved4

Definition at line 413 of file module.h.

◆ self

struct ast_module* self

◆ support_level

enum ast_module_support_level support_level

The support level for the given module

Definition at line 416 of file module.h.

Referenced by ast_update_module_list(), ast_update_module_list_condition(), ast_update_module_list_data(), and load_modules().

◆ unload

int(* unload) (void)

Unload. called with the module locked

Definition at line 348 of file module.h.

Referenced by ast_unload_resource(), and modules_shutdown().


The documentation for this struct was generated from the following file: