Annotation of embedaddon/strongswan/src/libcharon/plugins/eap_tnc/eap_tnc_plugin.c, revision 1.1.1.1
1.1 misho 1: /*
2: * Copyright (C) 2010 Andreas Steffen
3: * HSR 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, get_features, int,
28: eap_tnc_plugin_t *this, plugin_feature_t *features[])
29: {
30: static plugin_feature_t f[] = {
31: PLUGIN_CALLBACK(eap_method_register, eap_tnc_create_server),
32: PLUGIN_PROVIDE(EAP_SERVER, EAP_TNC),
33: PLUGIN_DEPENDS(EAP_SERVER, EAP_TTLS),
34: PLUGIN_DEPENDS(CUSTOM, "tnccs-manager"),
35: PLUGIN_CALLBACK(eap_method_register, eap_tnc_create_peer),
36: PLUGIN_PROVIDE(EAP_PEER, EAP_TNC),
37: PLUGIN_DEPENDS(EAP_PEER, EAP_TTLS),
38: PLUGIN_DEPENDS(CUSTOM, "tnccs-manager"),
39: PLUGIN_CALLBACK(eap_method_register, eap_tnc_pt_create_server),
40: PLUGIN_PROVIDE(EAP_SERVER, EAP_PT_EAP),
41: PLUGIN_DEPENDS(EAP_SERVER, EAP_TTLS),
42: PLUGIN_DEPENDS(CUSTOM, "tnccs-manager"),
43: PLUGIN_CALLBACK(eap_method_register, eap_tnc_pt_create_peer),
44: PLUGIN_PROVIDE(EAP_PEER, EAP_PT_EAP),
45: PLUGIN_DEPENDS(EAP_PEER, EAP_TTLS),
46: PLUGIN_DEPENDS(CUSTOM, "tnccs-manager"),
47: };
48: *features = f;
49: return countof(f);
50: }
51:
52: METHOD(plugin_t, destroy, void,
53: eap_tnc_plugin_t *this)
54: {
55: free(this);
56: }
57:
58: /*
59: * see header file
60: */
61: plugin_t *eap_tnc_plugin_create()
62: {
63: eap_tnc_plugin_t *this;
64:
65: INIT(this,
66: .plugin = {
67: .get_name = _get_name,
68: .get_features = _get_features,
69: .destroy = _destroy,
70: },
71: );
72:
73: return &this->plugin;
74: }
75:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>