diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2011-10-20 14:05:59 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2011-10-20 14:06:12 +0200 |
commit | e50c85359764f3a49054ffed0074ee3fbe839ff0 (patch) | |
tree | 266a864115fef80b477a0534bba3d57c44bf2c84 /src/libcharon/plugins/tnccs_20 | |
parent | 039a976745172ab2e5df3cf67ef3d635d66dbf72 (diff) | |
download | strongswan-e50c85359764f3a49054ffed0074ee3fbe839ff0.tar.bz2 strongswan-e50c85359764f3a49054ffed0074ee3fbe839ff0.tar.xz |
Add features support to tnccs plugins
Diffstat (limited to 'src/libcharon/plugins/tnccs_20')
-rw-r--r-- | src/libcharon/plugins/tnccs_20/tnccs_20_plugin.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/libcharon/plugins/tnccs_20/tnccs_20_plugin.c b/src/libcharon/plugins/tnccs_20/tnccs_20_plugin.c index e6dc699e6..a44c614d5 100644 --- a/src/libcharon/plugins/tnccs_20/tnccs_20_plugin.c +++ b/src/libcharon/plugins/tnccs_20/tnccs_20_plugin.c @@ -24,11 +24,22 @@ METHOD(plugin_t, get_name, char*, return "tnccs-20"; } +METHOD(plugin_t, get_features, int, + tnccs_20_plugin_t *this, plugin_feature_t *features[]) +{ + static plugin_feature_t f[] = { + PLUGIN_CALLBACK(tnccs_method_register, tnccs_20_create), + PLUGIN_PROVIDE(CUSTOM, "tnccs-2.0"), + PLUGIN_DEPENDS(EAP_SERVER, EAP_TNC), + PLUGIN_DEPENDS(EAP_PEER, EAP_TNC), + }; + *features = f; + return countof(f); +} + METHOD(plugin_t, destroy, void, tnccs_20_plugin_t *this) { - charon->tnccs->remove_method(charon->tnccs, - (tnccs_constructor_t)tnccs_20_create); free(this); } @@ -42,14 +53,11 @@ plugin_t *tnccs_20_plugin_create() INIT(this, .plugin = { .get_name = _get_name, - .reload = (void*)return_false, + .get_features = _get_features, .destroy = _destroy, }, ); - charon->tnccs->add_method(charon->tnccs, TNCCS_2_0, - (tnccs_constructor_t)tnccs_20_create); - return &this->plugin; } |