diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2010-08-30 15:36:24 +0200 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2010-08-30 15:36:34 +0200 |
commit | d93e2e5409b9d53ea0f2efb303691f0ce2d091ce (patch) | |
tree | 773fbb9c9bd4af4eaef7fb13bc8eb367832359bf /src/libcharon/plugins/eap_tnc/eap_tnc_plugin.c | |
parent | 577893612fa7d5a9956bf9fbe60d1de77092810e (diff) | |
download | strongswan-d93e2e5409b9d53ea0f2efb303691f0ce2d091ce.tar.bz2 strongswan-d93e2e5409b9d53ea0f2efb303691f0ce2d091ce.tar.xz |
created an eap-tnc method hull
Diffstat (limited to 'src/libcharon/plugins/eap_tnc/eap_tnc_plugin.c')
-rw-r--r-- | src/libcharon/plugins/eap_tnc/eap_tnc_plugin.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/libcharon/plugins/eap_tnc/eap_tnc_plugin.c b/src/libcharon/plugins/eap_tnc/eap_tnc_plugin.c new file mode 100644 index 000000000..7430e4cac --- /dev/null +++ b/src/libcharon/plugins/eap_tnc/eap_tnc_plugin.c @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2010 Andreas Steffen + * Hochschule fuer Technik Rapperswil + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#include "eap_tnc_plugin.h" +#include "eap_tnc.h" + +#include <daemon.h> + +METHOD(plugin_t, destroy, void, + eap_tnc_plugin_t *this) +{ + charon->eap->remove_method(charon->eap, + (eap_constructor_t)eap_tnc_create_server); + charon->eap->remove_method(charon->eap, + (eap_constructor_t)eap_tnc_create_peer); + free(this); +} + +/* + * see header file + */ +plugin_t *eap_tnc_plugin_create() +{ + eap_tnc_plugin_t *this; + + INIT(this, + .plugin = { + .destroy = _destroy, + }, + ); + + charon->eap->add_method(charon->eap, EAP_TNC, 0, EAP_SERVER, + (eap_constructor_t)eap_tnc_create_server); + charon->eap->add_method(charon->eap, EAP_TNC, 0, EAP_PEER, + (eap_constructor_t)eap_tnc_create_peer); + + return &this->plugin; +} + |