sr_module.xml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
  4. <section id="sr_module" xmlns:xi="http://www.w3.org/2001/XInclude">
  5. <sectioninfo>
  6. <revhistory>
  7. <revision>
  8. <revnumber>$Revision$</revnumber>
  9. <date>$Date$</date>
  10. </revision>
  11. </revhistory>
  12. </sectioninfo>
  13. <title>Structure <structname>sr_module</structname></title>
  14. <para>
  15. Each loaded module is represented by an instance of
  16. <structname>sr_module</structname> structure. All the instances are
  17. linked. There is a global variable <varname>modules</varname> defined
  18. in file <filename>sr_module.c</filename> which is head of linked-list
  19. of all loaded modules.
  20. </para>
  21. <para>
  22. Detailed description of the structure follows:
  23. </para>
  24. <programlisting>
  25. struct sr_module{
  26. char* path;
  27. void* handle;
  28. struct module_exports* exports;
  29. struct sr_module* next;
  30. };
  31. </programlisting>
  32. <para>
  33. <emphasis>Fields and their description:</emphasis>
  34. <itemizedlist>
  35. <listitem>
  36. <para>
  37. <structfield>path</structfield> - Path to the module. This
  38. is the path you pass as parameter to
  39. <function>loadmodule</function> function in the config
  40. file.
  41. </para>
  42. </listitem>
  43. <listitem>
  44. <para>
  45. <structfield>handle</structfield> - Handle returned by
  46. <function>dlopen</function>.
  47. </para>
  48. </listitem>
  49. <listitem>
  50. <para>
  51. <structfield>exports</structfield> - Pointer to structure
  52. describing interface of the module (will be described
  53. later).
  54. </para>
  55. </listitem>
  56. <listitem>
  57. <para>
  58. <structfield>next</structfield> - Pointer to the next <structname>sr_module</structname> structure
  59. in the linked list.
  60. </para>
  61. </listitem>
  62. </itemizedlist>
  63. </para>
  64. </section>