[strongSwan-dev] Add custom plugin
Tobias Brunner
tobias at strongswan.org
Tue Mar 14 11:50:43 CET 2017
Hi Anand,
> Apart from creating the .c and .h files for my plugin, what else should
> i do to successfully include my plugin in charon?
Each plugin has its own Makefile.am and the Makefile.am of the library
the plugin is located in needs also some additions.
Andreas once created an example plugin in the demo-plugin branch [1].
However, you don't actually need to build your plugin within the source
tree (i.e. you don't have to change any existing files). You could just
write your own Makefile and link the plugin to the strongSwan libraries
(just make sure to add -include <path/to/strongswan/config.h> to
CFLAGS). Then just copy the resulting .so file to the directory where
the other plugins are installed and load it using the modular plugin
load mechanism (see [2]).
Regards,
Tobias
[1]
https://git.strongswan.org/?p=strongswan.git;a=shortlog;h=refs/heads/demo-plugin
[2]
https://wiki.strongswan.org/projects/strongswan/wiki/PluginLoad#Modular-Configuration
More information about the Dev
mailing list