sr_module.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. /* $Id$
  2. *
  3. * modules/plug-in structures declarations
  4. *
  5. *
  6. * Copyright (C) 2001-2003 FhG Fokus
  7. *
  8. * This file is part of ser, a free SIP server.
  9. *
  10. * ser is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or
  13. * (at your option) any later version
  14. *
  15. * For a license to use the ser software under conditions
  16. * other than those described here, or to purchase support for this
  17. * software, please contact iptel.org by e-mail at the following addresses:
  18. * [email protected]
  19. *
  20. * ser is distributed in the hope that it will be useful,
  21. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. * GNU General Public License for more details.
  24. *
  25. * You should have received a copy of the GNU General Public License
  26. * along with this program; if not, write to the Free Software
  27. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  28. */
  29. /*
  30. * History:
  31. * --------
  32. * 2003-03-10 changed module exports interface: added struct cmd_export
  33. * and param_export (andrei)
  34. * 2003-03-16 Added flags field to cmd_export_ (janakj)
  35. * 2003-04-05 s/reply_route/failure_route, onreply_route introduced (jiri)
  36. * 2004-03-12 extra flag USE_FUNC_PARAM added to modparam type -
  37. * instead of copying the param value, a func is called (bogdan)
  38. * 2004-09-19 switched to version.h for the module versions checks (andrei)
  39. * 2004-12-03 changed param_func_t to (modparam_t, void*), killed
  40. * param_func_param_t (andrei)
  41. * 2007-06-07 added PROC_INIT, called in the main process context
  42. * (same as PROC_MAIN), buf guaranteed to be called before
  43. * any other process is forked (andrei)
  44. * 2008-11-17 sip-router version: includes some of the openser/kamailio
  45. * changes: f(void) instead of f(), free_fixup_function()
  46. * dual module interface support: ser & kamailio (andrei)
  47. * 2008-11-18 prototypes for various fixed parameters numbers module
  48. * functions (3, 4, 5 & 6) and variable parameters (andrei)
  49. * 2008-11-26 added fparam_free_contents() and fix_param_types (andrei)
  50. */
  51. /** modules structures/exports declarations and utilities (fixups a.s.o).
  52. * @file sr_module.h
  53. */
  54. #ifndef sr_module_h
  55. #define sr_module_h
  56. #include <dlfcn.h>
  57. #include "parser/msg_parser.h" /* for sip_msg */
  58. #include "ver_defs.h"
  59. #include "rpc.h"
  60. #include "route_struct.h"
  61. #include "route.h"
  62. #include "str.h"
  63. /* kamailio compat */
  64. #include "kstats_types.h"
  65. #include "mi/mi_types.h"
  66. #include "pvar.h"
  67. #if defined KAMAILIO_MOD_INTERFACE || defined OPENSER_MOD_INTERFACE || \
  68. defined MOD_INTERFACE_V1
  69. #define MODULE_INTERFACE_VER 1
  70. #define cmd_export_t kam_cmd_export_t
  71. #define module_exports kam_module_exports
  72. #elif defined SER_MOD_INTERFACE || defined MOD_INTERFACE_V0
  73. #define MODULE_INTERFACE_VER 0
  74. #define cmd_export_t ser_cmd_export_t
  75. #define module_exports ser_module_exports
  76. #else
  77. /* do nothing for core */
  78. #endif
  79. /** type used for the mod_register function export.
  80. * mod_register is a function called when loading a module
  81. * (if present), prior to registering the module exports.
  82. * @param path - path to the module, including file name
  83. * @param dlflags - pointer to the dlflags used when loading the module.
  84. * If the value is changed to a different and non-zero
  85. * value, the module will be reloaded with the new flags.
  86. * @param reserved1 - reserved for future use.
  87. * @param reserved2 - reserver for future use
  88. * @return 0 on success, -1 on error, all the other values are reserved
  89. * for future use (<0 meaning error and >0 success)
  90. */
  91. typedef int (*mod_register_function)(char*, int*, void*, void*);
  92. typedef struct module_exports* (*module_register)(void);
  93. typedef int (*cmd_function)(struct sip_msg*, char*, char*);
  94. typedef int (*cmd_function3)(struct sip_msg*, char*, char*, char*);
  95. typedef int (*cmd_function4)(struct sip_msg*, char*, char*, char*, char*);
  96. typedef int (*cmd_function5)(struct sip_msg*, char*, char*, char*,
  97. char*, char*);
  98. typedef int (*cmd_function6)(struct sip_msg*, char*, char*, char*,
  99. char*, char*, char*);
  100. /* variable number of param module function, takes as param the sip_msg,
  101. extra paremeters number and a pointer to an array of parameters */
  102. typedef int (*cmd_function_var)(struct sip_msg*, int no, action_u_t* vals );
  103. typedef int (*fixup_function)(void** param, int param_no);
  104. typedef int (*free_fixup_function)(void** param, int param_no);
  105. typedef int (*response_function)(struct sip_msg*);
  106. typedef void (*onbreak_function)(struct sip_msg*);
  107. typedef void (*destroy_function)(void);
  108. typedef int (*init_function)(void);
  109. typedef int (*child_init_function)(int rank);
  110. #define PARAM_STRING (1U<<0) /* String (char *) parameter type */
  111. #define PARAM_INT (1U<<1) /* Integer parameter type */
  112. #define PARAM_STR (1U<<2) /* struct str parameter type */
  113. #define PARAM_USE_FUNC (1U<<(8*sizeof(int)-1))
  114. #define PARAM_TYPE_MASK(_x) ((_x)&(~PARAM_USE_FUNC))
  115. /* temporary, for backward compatibility only until all modules adjust it */
  116. #define STR_PARAM PARAM_STRING
  117. #define INT_PARAM PARAM_INT
  118. #define USE_FUNC_PARAM PARAM_USE_FUNC
  119. typedef unsigned int modparam_t;
  120. typedef int (*param_func_t)( modparam_t type, void* val);
  121. /* magic parameter number values */
  122. #define NO_SCRIPT -1 /* export not usable from scripts */
  123. #define VAR_PARAM_NO -128 /* function has variable number of parameters
  124. (see cmd_function_var for the prototype) */
  125. /* special fixup function flags.
  126. * They are kept in the first 2 bits inside the pointer
  127. */
  128. #define FIXUP_F_FPARAM_RVE (unsigned long)1 /* fparam fixup, rve ready */
  129. #define call_fixup(fixup, param, param_no) \
  130. ((fixup) ? (fixup)(param, param_no) : 0)
  131. /* Macros - used as rank in child_init function */
  132. #define PROC_MAIN 0 /* Main ser process */
  133. #define PROC_TIMER -1 /* Timer attendant process */
  134. #define PROC_RPC -2 /* RPC type process */
  135. #define PROC_FIFO PROC_RPC /* FIFO attendant process */
  136. #define PROC_TCP_MAIN -4 /* TCP main process */
  137. #define PROC_UNIXSOCK -5 /* Unix socket server */
  138. #define PROC_ATTENDANT -10 /* main "attendant process */
  139. #define PROC_INIT -127 /* special rank, the context is the main ser
  140. process, but this is guaranteed to be executed
  141. before any process is forked, so it can be used
  142. to setup shared variables that depend on some
  143. after mod_init available information (e.g.
  144. total number of processes).
  145. WARNING: child_init(PROC_MAIN) is again called
  146. in the same process (main), but latter
  147. (before tcp), so make sure you don't init things
  148. twice, bot in PROC_MAIN and PROC_INT */
  149. #define PROC_NOCHLDINIT -128 /* no child init functions will be called
  150. if this rank is used in fork_process() */
  151. #define PROC_MIN PROC_NOCHLDINIT /* Minimum process rank */
  152. #define DEFAULT_DLFLAGS 0 /* value that signals to module loader to
  153. use default dlopen flags in Kamailio */
  154. #ifndef RTLD_NOW
  155. /* for openbsd */
  156. #define RTLD_NOW DL_LAZY
  157. #endif
  158. #define KAMAILIO_DLFLAGS RTLD_NOW
  159. #define MODULE_VERSION \
  160. char *module_version=SER_FULL_VERSION; \
  161. char *module_flags=SER_COMPILE_FLAGS; \
  162. unsigned int module_interface_ver=MODULE_INTERFACE_VER;
  163. /* ser version */
  164. struct ser_cmd_export_ {
  165. char* name; /* null terminated command name */
  166. cmd_function function; /* pointer to the corresponding function */
  167. int param_no; /* number of parameters used by the function */
  168. fixup_function fixup; /* pointer to the function called to "fix" the
  169. parameters */
  170. int flags; /* Function flags */
  171. };
  172. /* kamailo/openser version */
  173. struct kam_cmd_export_ {
  174. char* name; /* null terminated command name */
  175. cmd_function function; /* pointer to the corresponding function */
  176. int param_no; /* number of parameters used by the function */
  177. fixup_function fixup; /* pointer to the function called to "fix" the
  178. parameters */
  179. free_fixup_function free_fixup; /* function called to free the "fixed"
  180. parameters */
  181. int flags; /* Function flags */
  182. };
  183. struct sr31_cmd_export_ {
  184. char* name; /* null terminated command name */
  185. cmd_function function; /* pointer to the corresponding function */
  186. int param_no; /* number of parameters used by the function */
  187. fixup_function fixup; /* pointer to the function called to "fix" the
  188. parameters */
  189. free_fixup_function free_fixup; /* function called to free the "fixed"
  190. parameters */
  191. int flags; /* Function flags */
  192. int fixup_flags;
  193. void* module_exports; /* pointer to module structure */
  194. };
  195. /* members situated at the same place in memory in both ser & kamailio
  196. cmd_export */
  197. struct cmd_export_common_ {
  198. char* name;
  199. cmd_function function;
  200. int param_no;
  201. fixup_function fixup;
  202. };
  203. struct param_export_ {
  204. char* name; /* null terminated param. name */
  205. modparam_t type; /* param. type */
  206. void* param_pointer; /* pointer to the param. memory location */
  207. };
  208. /** allowed parameter types.
  209. * the types _must_ be in "fallback" order,
  210. * e.g. FPARAM_STR should be the last to allow fallback to it,
  211. * F_PARAM_PVS should be in front of F_PARAM_AVP (so that
  212. * for fix_param_types(FPARAM_AVP|FPARAM_PVS|FPARAM_STR, param) and $foo
  213. * the pvars will be checked first and only if no pvar is found the
  214. * param will be resolved to an avp)
  215. */
  216. enum {
  217. FPARAM_UNSPEC = 0,
  218. FPARAM_INT = (1 << 0),
  219. FPARAM_SELECT = (1 << 1),
  220. FPARAM_PVS = (1 << 2),
  221. FPARAM_AVP = (1 << 3),
  222. FPARAM_STRING = (1 << 4),
  223. FPARAM_STR = (1 << 5),
  224. /* special types: no fallback between them possible */
  225. FPARAM_REGEX = (1 << 6),
  226. FPARAM_SUBST = (1 << 7),
  227. FPARAM_PVE = (1 << 8)
  228. };
  229. /*
  230. * Function parameter
  231. */
  232. typedef struct fparam {
  233. char* orig; /* The original value */
  234. int type; /* Type of parameter */
  235. union {
  236. char* asciiz; /* Zero terminated ASCII string */
  237. struct _str str; /* pointer/len string */
  238. int i; /* Integer value */
  239. regex_t* regex; /* Compiled regular expression */
  240. avp_ident_t avp; /* AVP identifier */
  241. select_t* select; /* select structure */
  242. struct subst_expr* subst; /* Regex substitution */
  243. pv_spec_t* pvs; /* kamailio pseudo-vars */
  244. pv_elem_t* pve; /* kamailio pseudo-vars in a string */
  245. } v;
  246. void *fixed;
  247. } fparam_t;
  248. typedef struct param_export_ param_export_t;
  249. typedef struct ser_cmd_export_ ser_cmd_export_t;
  250. typedef struct kam_cmd_export_ kam_cmd_export_t;
  251. typedef struct cmd_export_common_ cmd_export_common_t;
  252. typedef struct sr31_cmd_export_ sr31_cmd_export_t;
  253. #if 0
  254. union cmd_export_u{
  255. cmd_export_common_t c; /* common members for everybody */
  256. ser_cmd_export_t v0;
  257. kam_cmd_export_t v1;
  258. };
  259. #endif
  260. /* ser module exports version */
  261. struct ser_module_exports {
  262. char* name; /* null terminated module name */
  263. ser_cmd_export_t* cmds; /* null terminated array of the exported
  264. commands */
  265. rpc_export_t* rpc_methods; /* null terminated array of exported rpc methods */
  266. param_export_t* params; /* null terminated array of the exported
  267. module parameters */
  268. init_function init_f; /* Initialization function */
  269. response_function response_f; /* function used for responses,
  270. returns yes or no; can be null */
  271. destroy_function destroy_f; /* function called when the module should
  272. be "destroyed", e.g: on ser exit;
  273. can be null */
  274. onbreak_function onbreak_f;
  275. child_init_function init_child_f; /* function called by all processes
  276. after the fork */
  277. };
  278. /* kamailio/openser proc_export (missing from ser) */
  279. typedef void (*mod_proc)(int no);
  280. typedef int (*mod_proc_wrapper)(void);
  281. struct proc_export_ {
  282. char *name;
  283. mod_proc_wrapper pre_fork_function;
  284. mod_proc_wrapper post_fork_function;
  285. mod_proc function;
  286. unsigned int no;
  287. };
  288. typedef struct proc_export_ proc_export_t;
  289. /* kamailio/openser module exports version */
  290. struct kam_module_exports {
  291. char* name; /* null terminated module name */
  292. unsigned int dlflags; /*!< flags for dlopen */
  293. kam_cmd_export_t* cmds; /* null terminated array of the exported
  294. commands */
  295. param_export_t* params; /* null terminated array of the exported
  296. module parameters */
  297. stat_export_t* stats; /*!< null terminated array of the exported
  298. module statistics */
  299. mi_export_t* mi_cmds; /*!< null terminated array of the exported
  300. MI functions */
  301. pv_export_t* items; /*!< null terminated array of the exported
  302. module items (pseudo-variables) */
  303. proc_export_t* procs; /*!< null terminated array of the
  304. additional processes required by the
  305. module */
  306. init_function init_f; /* Initialization function */
  307. response_function response_f; /* function used for responses,
  308. returns yes or no; can be null */
  309. destroy_function destroy_f; /* function called when the module should
  310. be "destroyed", e.g: on ser exit;
  311. can be null */
  312. child_init_function init_child_f; /* function called by all processes
  313. after the fork */
  314. };
  315. /** sr/ser 3.1+ module exports version.
  316. * Includes ser and kamailio versions, re-arraranged + some extras.
  317. * Note: some of the members will be obsoleted and are kept only for
  318. * backward compatibility (avoid re-writing all the modules exports
  319. * declarations).
  320. */
  321. struct sr31_module_exports {
  322. char* name; /* null terminated module name */
  323. sr31_cmd_export_t* cmds; /* null terminated array of the exported
  324. commands */
  325. param_export_t* params; /* null terminated array of the exported
  326. module parameters */
  327. init_function init_f; /* Initialization function */
  328. response_function response_f; /* function used for responses,
  329. returns yes or no; can be null */
  330. destroy_function destroy_f; /* function called when the module should
  331. be "destroyed", e.g: on ser exit;
  332. can be null */
  333. onbreak_function onbreak_f;
  334. child_init_function init_child_f; /* function called by all processes
  335. after the fork */
  336. unsigned int dlflags; /**< flags for dlopen */
  337. /* ser specific exports
  338. (to be obsoleted and replaced by register_...) */
  339. rpc_export_t* rpc_methods; /* null terminated array of exported
  340. rpc methods */
  341. /* kamailio specific exports
  342. (to be obsoleted and replaced by register_...) */
  343. stat_export_t* stats; /*!< null terminated array of the exported
  344. module statistics */
  345. mi_export_t* mi_cmds; /*!< null terminated array of the exported
  346. MI functions */
  347. pv_export_t* items; /*!< null terminated array of the exported
  348. module items (pseudo-variables) */
  349. proc_export_t* procs; /*!< null terminated array of the
  350. additional processes required by the
  351. module */
  352. };
  353. /* module exports in the same place in memory in both ser & kamailio */
  354. struct module_exports_common{
  355. char* name;
  356. };
  357. union module_exports_u {
  358. struct module_exports_common c; /*common members for all the versions*/
  359. struct ser_module_exports v0;
  360. struct kam_module_exports v1;
  361. };
  362. struct sr_module{
  363. char* path;
  364. void* handle;
  365. unsigned int orig_mod_interface_ver;
  366. struct sr31_module_exports exports;
  367. struct sr_module* next;
  368. };
  369. extern struct sr_module* modules; /* global module list*/
  370. extern response_function* mod_response_cbks;/* response callback array */
  371. extern int mod_response_cbk_no; /* size of reponse callbacks array */
  372. int register_builtin_modules(void);
  373. int load_module(char* path);
  374. sr31_cmd_export_t* find_export_record(char* name, int param_no, int flags,
  375. unsigned *ver);
  376. cmd_function find_export(char* name, int param_no, int flags);
  377. cmd_function find_mod_export(char* mod, char* name, int param_no, int flags);
  378. rpc_export_t* find_rpc_export(char* name, int flags);
  379. void destroy_modules(void);
  380. int init_child(int rank);
  381. int init_modules(void);
  382. struct sr_module* find_module_by_name(char* mod);
  383. /* true if the module with name 'mod_name' is loaded */
  384. #define module_loaded(mod_name) (find_module_by_name(mod_name)!=0)
  385. /*! \brief
  386. * Find a parameter with given type and return it's
  387. * address in memory
  388. * If there is no such parameter, NULL is returned
  389. */
  390. void* find_param_export(struct sr_module* mod, char* name, modparam_t type_mask, modparam_t *param_type);
  391. /* modules function prototypes:
  392. * struct module_exports* mod_register(); (type module_register)
  393. * int foo_cmd(struct sip_msg* msg, char* param);
  394. * - returns >0 if ok , <0 on error, 0 to stop processing (==DROP)
  395. * int response_f(struct sip_msg* msg)
  396. * - returns >0 if ok, 0 to drop message
  397. */
  398. /* API function to get other parameters from fixup */
  399. action_u_t *fixup_get_param(void **cur_param, int cur_param_no, int required_param_no);
  400. int fixup_get_param_count(void **cur_param, int cur_param_no);
  401. int fix_flag( modparam_t type, void* val,
  402. char* mod_name, char* param_name, int* flag);
  403. /*
  404. * Common function parameter fixups
  405. */
  406. /*
  407. * Generic parameter fixup function which creates
  408. * fparam_t structure. type parameter contains allowed
  409. * parameter types
  410. */
  411. int fix_param(int type, void** param);
  412. void fparam_free_contents(fparam_t* fp);
  413. /** fix a param to one of the given types (mask).
  414. */
  415. int fix_param_types(int types, void** param);
  416. /*
  417. * Fixup variable string, the parameter can be
  418. * AVP, SELECT, or ordinary string. AVP and select
  419. * identifiers will be resolved to their values during
  420. * runtime
  421. *
  422. * The parameter value will be converted to fparam structure
  423. * This function returns -1 on an error
  424. */
  425. int fixup_var_str_12(void** param, int param_no);
  426. /* Same as fixup_var_str_12 but applies to the 1st parameter only */
  427. int fixup_var_str_1(void** param, int param_no);
  428. /* Same as fixup_var_str_12 but applies to the 2nd parameter only */
  429. int fixup_var_str_2(void** param, int param_no);
  430. /** fixup variable-pve-string.
  431. * The parameter can be a PVAR, AVP, SELECT, PVE (pv based format string)
  432. * or string.
  433. */
  434. int fixup_var_pve_str_12(void** param, int param_no);
  435. /* same as fixup_var_pve_str_12 but applies to the 1st parameter only */
  436. int fixup_var_pve_str_1(void** param, int param_no);
  437. /* same as fixup_var_pve_str_12 but applies to the 2nd parameter only */
  438. int fixup_var_pve_str_2(void** param, int param_no);
  439. /*
  440. * Fixup variable integer, the parameter can be
  441. * AVP, SELECT, or ordinary integer. AVP and select
  442. * identifiers will be resolved to their values and
  443. * converted to int if necessary during runtime
  444. *
  445. * The parameter value will be converted to fparam structure
  446. * This function returns -1 on an error
  447. */
  448. int fixup_var_int_12(void** param, int param_no);
  449. /* Same as fixup_var_int_12 but applies to the 1st parameter only */
  450. int fixup_var_int_1(void** param, int param_no);
  451. /* Same as fixup_var_int_12 but applies to the 2nd parameter only */
  452. int fixup_var_int_2(void** param, int param_no);
  453. /*
  454. * The parameter must be a regular expression which must compile, the
  455. * parameter will be converted to compiled regex
  456. */
  457. int fixup_regex_12(void** param, int param_no);
  458. /* Same as fixup_regex_12 but applies to the 1st parameter only */
  459. int fixup_regex_1(void** param, int param_no);
  460. /* Same as fixup_regex_12 but applies to the 2nd parameter only */
  461. int fixup_regex_2(void** param, int param_no);
  462. /*
  463. * The string parameter will be converted to integer
  464. */
  465. int fixup_int_12(void** param, int param_no);
  466. /* Same as fixup_int_12 but applies to the 1st parameter only */
  467. int fixup_int_1(void** param, int param_no);
  468. /* Same as fixup_int_12 but applies to the 2nd parameter only */
  469. int fixup_int_2(void** param, int param_no);
  470. /*
  471. * Parse the parameter as static string, do not resolve
  472. * AVPs or selects, convert the parameter to str structure
  473. */
  474. int fixup_str_12(void** param, int param_no);
  475. /* Same as fixup_str_12 but applies to the 1st parameter only */
  476. int fixup_str_1(void** param, int param_no);
  477. /* Same as fixup_str_12 but applies to the 2nd parameter only */
  478. int fixup_str_2(void** param, int param_no);
  479. /*
  480. * Get the function parameter value as string
  481. * Return values: 0 - Success
  482. * -1 - Cannot get value
  483. */
  484. int get_str_fparam(str* dst, struct sip_msg* msg, fparam_t* param);
  485. /*
  486. * Get the function parameter value as integer
  487. * Return values: 0 - Success
  488. * -1 - Cannot get value
  489. */
  490. int get_int_fparam(int* dst, struct sip_msg* msg, fparam_t* param);
  491. /**
  492. * Retrieve the compiled RegExp.
  493. * @return: 0 for success, negative on error.
  494. */
  495. int get_regex_fparam(regex_t *dst, struct sip_msg* msg, fparam_t* param);
  496. int is_fparam_rve_fixup(fixup_function f);
  497. /** generic free fixup type function for a fixed fparam.
  498. * It will free whatever was allocated during the initial fparam fixup
  499. * and restore the original param value.
  500. */
  501. void fparam_free_restore(void** param);
  502. int fixup_free_fparam_all(void** param, int param_no);
  503. int fixup_free_fparam_1(void** param, int param_no);
  504. int fixup_free_fparam_2(void** param, int param_no);
  505. free_fixup_function get_fixup_free(fixup_function f);
  506. #endif /* sr_module_h */