strongswan有许多插件,这些插件可以在配置阶段(执行./configure)使能或禁止,编译后,插件动态加载。

以stroke插件为例,stroke插件通过函数plugin_t *stroke_plugin_create()函数创建,然而,搜索整个工程代码,却找不到调用的地方。那么,stroke插件究竟是什么时候,怎样挂到主进程(charon进程)上去的呢?

阅读代码可知,charon进程在执行进程的main函数时,会对daemon进行初始化。初始化函数的第二个参数,是通过strongswan.conf读到的装载插件列表字符串。如下图:

strongswan--插件的加载

strongswan.conf的load配置如下:

strongswan--插件的加载

图中的load = xxx,xxx即待加载插件的列表。

 

相关文章:

  • 2021-06-12
  • 2021-08-13
  • 2021-09-24
  • 2022-03-07
  • 2021-06-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-13
  • 2022-01-06
  • 2021-11-27
  • 2021-11-27
  • 2021-04-14
相关资源
相似解决方案