Hi Tobias,

I modified the files similar to what Andreas did and my plugin was constructed 
successfully.


Even callback feature worked.


Thanks a lot for the help.


-Anand

________________________________
From: Tobias Brunner <[email protected]>
Sent: Tuesday, March 14, 2017 4:20:43 PM
To: Anand Murali; [email protected]
Subject: Re: [strongSwan-dev] Add custom plugin

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

_______________________________________________
Dev mailing list
[email protected]
https://lists.strongswan.org/mailman/listinfo/dev

Reply via email to