modules.h 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. /**
  2. * @file modules.h
  3. * @author Ambroz Bizjak <ambrop7@gmail.com>
  4. *
  5. * @section LICENSE
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions are met:
  9. * 1. Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. * 2. Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in the
  13. * documentation and/or other materials provided with the distribution.
  14. * 3. Neither the name of the author nor the
  15. * names of its contributors may be used to endorse or promote products
  16. * derived from this software without specific prior written permission.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  19. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  20. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  21. * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  22. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  23. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  24. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  25. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  27. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. */
  29. #ifndef BADVPN_NCD_MODULES_MODULES_H
  30. #define BADVPN_NCD_MODULES_MODULES_H
  31. #include <stddef.h>
  32. #include <ncd/NCDModule.h>
  33. extern const struct NCDModuleGroup ncdmodule_var;
  34. extern const struct NCDModuleGroup ncdmodule_list;
  35. extern const struct NCDModuleGroup ncdmodule_depend;
  36. extern const struct NCDModuleGroup ncdmodule_multidepend;
  37. extern const struct NCDModuleGroup ncdmodule_dynamic_depend;
  38. extern const struct NCDModuleGroup ncdmodule_concat;
  39. extern const struct NCDModuleGroup ncdmodule_concatv;
  40. extern const struct NCDModuleGroup ncdmodule_if;
  41. extern const struct NCDModuleGroup ncdmodule_strcmp;
  42. extern const struct NCDModuleGroup ncdmodule_regex_match;
  43. extern const struct NCDModuleGroup ncdmodule_logical;
  44. extern const struct NCDModuleGroup ncdmodule_sleep;
  45. extern const struct NCDModuleGroup ncdmodule_print;
  46. extern const struct NCDModuleGroup ncdmodule_blocker;
  47. extern const struct NCDModuleGroup ncdmodule_ip_in_network;
  48. extern const struct NCDModuleGroup ncdmodule_run;
  49. extern const struct NCDModuleGroup ncdmodule_runonce;
  50. extern const struct NCDModuleGroup ncdmodule_daemon;
  51. extern const struct NCDModuleGroup ncdmodule_spawn;
  52. extern const struct NCDModuleGroup ncdmodule_call;
  53. extern const struct NCDModuleGroup ncdmodule_imperative;
  54. extern const struct NCDModuleGroup ncdmodule_ref;
  55. extern const struct NCDModuleGroup ncdmodule_index;
  56. extern const struct NCDModuleGroup ncdmodule_alias;
  57. extern const struct NCDModuleGroup ncdmodule_process_manager;
  58. extern const struct NCDModuleGroup ncdmodule_ondemand;
  59. extern const struct NCDModuleGroup ncdmodule_foreach;
  60. extern const struct NCDModuleGroup ncdmodule_choose;
  61. extern const struct NCDModuleGroup ncdmodule_from_string;
  62. extern const struct NCDModuleGroup ncdmodule_to_string;
  63. extern const struct NCDModuleGroup ncdmodule_value;
  64. extern const struct NCDModuleGroup ncdmodule_net_backend_waitdevice;
  65. extern const struct NCDModuleGroup ncdmodule_net_backend_waitlink;
  66. extern const struct NCDModuleGroup ncdmodule_net_backend_badvpn;
  67. extern const struct NCDModuleGroup ncdmodule_net_backend_wpa_supplicant;
  68. #ifdef BADVPN_USE_LINUX_RFKILL
  69. extern const struct NCDModuleGroup ncdmodule_net_backend_rfkill;
  70. #endif
  71. extern const struct NCDModuleGroup ncdmodule_net_up;
  72. extern const struct NCDModuleGroup ncdmodule_net_dns;
  73. extern const struct NCDModuleGroup ncdmodule_net_iptables;
  74. extern const struct NCDModuleGroup ncdmodule_net_ipv4_addr;
  75. extern const struct NCDModuleGroup ncdmodule_net_ipv4_route;
  76. extern const struct NCDModuleGroup ncdmodule_net_ipv4_dhcp;
  77. extern const struct NCDModuleGroup ncdmodule_net_ipv4_arp_probe;
  78. extern const struct NCDModuleGroup ncdmodule_net_watch_interfaces;
  79. extern const struct NCDModuleGroup ncdmodule_sys_watch_input;
  80. extern const struct NCDModuleGroup ncdmodule_sys_watch_usb;
  81. #ifdef BADVPN_USE_LINUX_INPUT
  82. extern const struct NCDModuleGroup ncdmodule_sys_evdev;
  83. #endif
  84. #ifdef BADVPN_USE_INOTIFY
  85. extern const struct NCDModuleGroup ncdmodule_sys_watch_directory;
  86. #endif
  87. static const struct NCDModuleGroup *ncd_modules[] = {
  88. &ncdmodule_var,
  89. &ncdmodule_list,
  90. &ncdmodule_depend,
  91. &ncdmodule_multidepend,
  92. &ncdmodule_dynamic_depend,
  93. &ncdmodule_concat,
  94. &ncdmodule_concatv,
  95. &ncdmodule_if,
  96. &ncdmodule_strcmp,
  97. &ncdmodule_regex_match,
  98. &ncdmodule_logical,
  99. &ncdmodule_sleep,
  100. &ncdmodule_print,
  101. &ncdmodule_blocker,
  102. &ncdmodule_ip_in_network,
  103. &ncdmodule_run,
  104. &ncdmodule_runonce,
  105. &ncdmodule_daemon,
  106. &ncdmodule_spawn,
  107. &ncdmodule_call,
  108. &ncdmodule_imperative,
  109. &ncdmodule_ref,
  110. &ncdmodule_index,
  111. &ncdmodule_alias,
  112. &ncdmodule_process_manager,
  113. &ncdmodule_ondemand,
  114. &ncdmodule_foreach,
  115. &ncdmodule_choose,
  116. &ncdmodule_from_string,
  117. &ncdmodule_to_string,
  118. &ncdmodule_value,
  119. &ncdmodule_net_backend_waitdevice,
  120. &ncdmodule_net_backend_waitlink,
  121. &ncdmodule_net_backend_badvpn,
  122. &ncdmodule_net_backend_wpa_supplicant,
  123. #ifdef BADVPN_USE_LINUX_RFKILL
  124. &ncdmodule_net_backend_rfkill,
  125. #endif
  126. &ncdmodule_net_up,
  127. &ncdmodule_net_dns,
  128. &ncdmodule_net_iptables,
  129. &ncdmodule_net_ipv4_addr,
  130. &ncdmodule_net_ipv4_route,
  131. &ncdmodule_net_ipv4_dhcp,
  132. &ncdmodule_net_ipv4_arp_probe,
  133. &ncdmodule_net_watch_interfaces,
  134. &ncdmodule_sys_watch_input,
  135. &ncdmodule_sys_watch_usb,
  136. #ifdef BADVPN_USE_LINUX_INPUT
  137. &ncdmodule_sys_evdev,
  138. #endif
  139. #ifdef BADVPN_USE_INOTIFY
  140. &ncdmodule_sys_watch_directory,
  141. #endif
  142. NULL
  143. };
  144. #endif