modules.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /**
  2. * @file modules.h
  3. * @author Ambroz Bizjak <ambrop7@gmail.com>
  4. *
  5. * @section LICENSE
  6. *
  7. * This file is part of BadVPN.
  8. *
  9. * BadVPN is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2
  11. * as published by the Free Software Foundation.
  12. *
  13. * BadVPN is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License along
  19. * with this program; if not, write to the Free Software Foundation, Inc.,
  20. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  21. */
  22. #ifndef BADVPN_NCD_MODULES_MODULES_H
  23. #define BADVPN_NCD_MODULES_MODULES_H
  24. #include <stddef.h>
  25. #include <ncd/NCDModule.h>
  26. extern const struct NCDModuleGroup ncdmodule_var;
  27. extern const struct NCDModuleGroup ncdmodule_list;
  28. extern const struct NCDModuleGroup ncdmodule_depend;
  29. extern const struct NCDModuleGroup ncdmodule_multidepend;
  30. extern const struct NCDModuleGroup ncdmodule_dynamic_depend;
  31. extern const struct NCDModuleGroup ncdmodule_concat;
  32. extern const struct NCDModuleGroup ncdmodule_concatv;
  33. extern const struct NCDModuleGroup ncdmodule_if;
  34. extern const struct NCDModuleGroup ncdmodule_strcmp;
  35. extern const struct NCDModuleGroup ncdmodule_regex_match;
  36. extern const struct NCDModuleGroup ncdmodule_logical;
  37. extern const struct NCDModuleGroup ncdmodule_sleep;
  38. extern const struct NCDModuleGroup ncdmodule_print;
  39. extern const struct NCDModuleGroup ncdmodule_blocker;
  40. extern const struct NCDModuleGroup ncdmodule_ip_in_network;
  41. extern const struct NCDModuleGroup ncdmodule_run;
  42. extern const struct NCDModuleGroup ncdmodule_runonce;
  43. extern const struct NCDModuleGroup ncdmodule_daemon;
  44. extern const struct NCDModuleGroup ncdmodule_spawn;
  45. extern const struct NCDModuleGroup ncdmodule_call;
  46. extern const struct NCDModuleGroup ncdmodule_imperative;
  47. extern const struct NCDModuleGroup ncdmodule_ref;
  48. extern const struct NCDModuleGroup ncdmodule_index;
  49. extern const struct NCDModuleGroup ncdmodule_alias;
  50. extern const struct NCDModuleGroup ncdmodule_process_manager;
  51. extern const struct NCDModuleGroup ncdmodule_ondemand;
  52. extern const struct NCDModuleGroup ncdmodule_foreach;
  53. extern const struct NCDModuleGroup ncdmodule_choose;
  54. extern const struct NCDModuleGroup ncdmodule_net_backend_waitdevice;
  55. extern const struct NCDModuleGroup ncdmodule_net_backend_waitlink;
  56. extern const struct NCDModuleGroup ncdmodule_net_backend_badvpn;
  57. extern const struct NCDModuleGroup ncdmodule_net_backend_wpa_supplicant;
  58. #ifdef BADVPN_USE_LINUX_RFKILL
  59. extern const struct NCDModuleGroup ncdmodule_net_backend_rfkill;
  60. #endif
  61. extern const struct NCDModuleGroup ncdmodule_net_up;
  62. extern const struct NCDModuleGroup ncdmodule_net_dns;
  63. extern const struct NCDModuleGroup ncdmodule_net_iptables;
  64. extern const struct NCDModuleGroup ncdmodule_net_ipv4_addr;
  65. extern const struct NCDModuleGroup ncdmodule_net_ipv4_route;
  66. extern const struct NCDModuleGroup ncdmodule_net_ipv4_dhcp;
  67. extern const struct NCDModuleGroup ncdmodule_net_ipv4_arp_probe;
  68. extern const struct NCDModuleGroup ncdmodule_net_watch_interfaces;
  69. extern const struct NCDModuleGroup ncdmodule_sys_watch_input;
  70. extern const struct NCDModuleGroup ncdmodule_sys_watch_usb;
  71. #ifdef BADVPN_USE_LINUX_INPUT
  72. extern const struct NCDModuleGroup ncdmodule_sys_evdev;
  73. #endif
  74. #ifdef BADVPN_USE_INOTIFY
  75. extern const struct NCDModuleGroup ncdmodule_sys_watch_directory;
  76. #endif
  77. static const struct NCDModuleGroup *ncd_modules[] = {
  78. &ncdmodule_var,
  79. &ncdmodule_list,
  80. &ncdmodule_depend,
  81. &ncdmodule_multidepend,
  82. &ncdmodule_dynamic_depend,
  83. &ncdmodule_concat,
  84. &ncdmodule_concatv,
  85. &ncdmodule_if,
  86. &ncdmodule_strcmp,
  87. &ncdmodule_regex_match,
  88. &ncdmodule_logical,
  89. &ncdmodule_sleep,
  90. &ncdmodule_print,
  91. &ncdmodule_blocker,
  92. &ncdmodule_ip_in_network,
  93. &ncdmodule_run,
  94. &ncdmodule_runonce,
  95. &ncdmodule_daemon,
  96. &ncdmodule_spawn,
  97. &ncdmodule_call,
  98. &ncdmodule_imperative,
  99. &ncdmodule_ref,
  100. &ncdmodule_index,
  101. &ncdmodule_alias,
  102. &ncdmodule_process_manager,
  103. &ncdmodule_ondemand,
  104. &ncdmodule_foreach,
  105. &ncdmodule_choose,
  106. &ncdmodule_net_backend_waitdevice,
  107. &ncdmodule_net_backend_waitlink,
  108. &ncdmodule_net_backend_badvpn,
  109. &ncdmodule_net_backend_wpa_supplicant,
  110. #ifdef BADVPN_USE_LINUX_RFKILL
  111. &ncdmodule_net_backend_rfkill,
  112. #endif
  113. &ncdmodule_net_up,
  114. &ncdmodule_net_dns,
  115. &ncdmodule_net_iptables,
  116. &ncdmodule_net_ipv4_addr,
  117. &ncdmodule_net_ipv4_route,
  118. &ncdmodule_net_ipv4_dhcp,
  119. &ncdmodule_net_ipv4_arp_probe,
  120. &ncdmodule_net_watch_interfaces,
  121. &ncdmodule_sys_watch_input,
  122. &ncdmodule_sys_watch_usb,
  123. #ifdef BADVPN_USE_LINUX_INPUT
  124. &ncdmodule_sys_evdev,
  125. #endif
  126. #ifdef BADVPN_USE_INOTIFY
  127. &ncdmodule_sys_watch_directory,
  128. #endif
  129. NULL
  130. };
  131. #endif