pluto: Missing flushline call added when reading ipsec.secrets.
[strongswan.git] / src / libcharon / plugins / eap_tnc / eap_tnc_plugin.c
1 /*
2 * Copyright (C) 2010 Andreas Steffen
3 * Hochschule fuer Technik Rapperswil
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 #include "eap_tnc_plugin.h"
17 #include "eap_tnc.h"
18
19 #include <daemon.h>
20
21 METHOD(plugin_t, get_name, char*,
22 eap_tnc_plugin_t *this)
23 {
24 return "eap-tnc";
25 }
26
27 METHOD(plugin_t, destroy, void,
28 eap_tnc_plugin_t *this)
29 {
30 charon->eap->remove_method(charon->eap,
31 (eap_constructor_t)eap_tnc_create_server);
32 charon->eap->remove_method(charon->eap,
33 (eap_constructor_t)eap_tnc_create_peer);
34 free(this);
35 }
36
37 /*
38 * see header file
39 */
40 plugin_t *eap_tnc_plugin_create()
41 {
42 eap_tnc_plugin_t *this;
43
44 INIT(this,
45 .plugin = {
46 .get_name = _get_name,
47 .reload = (void*)return_false,
48 .destroy = _destroy,
49 },
50 );
51
52 charon->eap->add_method(charon->eap, EAP_TNC, 0, EAP_SERVER,
53 (eap_constructor_t)eap_tnc_create_server);
54 charon->eap->add_method(charon->eap, EAP_TNC, 0, EAP_PEER,
55 (eap_constructor_t)eap_tnc_create_peer);
56
57 return &this->plugin;
58 }
59