]>
Commit | Line | Data |
---|---|---|
d93e2e54 AS |
1 | /* |
2 | * Copyright (C) 2010 Andreas Steffen | |
19ef2aec TB |
3 | * |
4 | * Copyright (C) secunet Security Networks AG | |
d93e2e54 AS |
5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | |
7 | * under the terms of the GNU General Public License as published by the | |
8 | * Free Software Foundation; either version 2 of the License, or (at your | |
9 | * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>. | |
10 | * | |
11 | * This program is distributed in the hope that it will be useful, but | |
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
13 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 | * for more details. | |
15 | */ | |
16 | ||
17 | #include "eap_tnc_plugin.h" | |
18 | #include "eap_tnc.h" | |
19 | ||
20 | #include <daemon.h> | |
21 | ||
787b5884 MW |
22 | METHOD(plugin_t, get_name, char*, |
23 | eap_tnc_plugin_t *this) | |
24 | { | |
25 | return "eap-tnc"; | |
26 | } | |
27 | ||
f21398fa AS |
28 | METHOD(plugin_t, get_features, int, |
29 | eap_tnc_plugin_t *this, plugin_feature_t *features[]) | |
30 | { | |
31 | static plugin_feature_t f[] = { | |
32 | PLUGIN_CALLBACK(eap_method_register, eap_tnc_create_server), | |
33 | PLUGIN_PROVIDE(EAP_SERVER, EAP_TNC), | |
34 | PLUGIN_DEPENDS(EAP_SERVER, EAP_TTLS), | |
f0a8bf47 | 35 | PLUGIN_DEPENDS(CUSTOM, "tnccs-manager"), |
f21398fa AS |
36 | PLUGIN_CALLBACK(eap_method_register, eap_tnc_create_peer), |
37 | PLUGIN_PROVIDE(EAP_PEER, EAP_TNC), | |
38 | PLUGIN_DEPENDS(EAP_PEER, EAP_TTLS), | |
f0a8bf47 | 39 | PLUGIN_DEPENDS(CUSTOM, "tnccs-manager"), |
8d590903 AS |
40 | PLUGIN_CALLBACK(eap_method_register, eap_tnc_pt_create_server), |
41 | PLUGIN_PROVIDE(EAP_SERVER, EAP_PT_EAP), | |
42 | PLUGIN_DEPENDS(EAP_SERVER, EAP_TTLS), | |
43 | PLUGIN_DEPENDS(CUSTOM, "tnccs-manager"), | |
44 | PLUGIN_CALLBACK(eap_method_register, eap_tnc_pt_create_peer), | |
45 | PLUGIN_PROVIDE(EAP_PEER, EAP_PT_EAP), | |
46 | PLUGIN_DEPENDS(EAP_PEER, EAP_TTLS), | |
47 | PLUGIN_DEPENDS(CUSTOM, "tnccs-manager"), | |
f21398fa AS |
48 | }; |
49 | *features = f; | |
50 | return countof(f); | |
51 | } | |
52 | ||
d93e2e54 AS |
53 | METHOD(plugin_t, destroy, void, |
54 | eap_tnc_plugin_t *this) | |
55 | { | |
d93e2e54 AS |
56 | free(this); |
57 | } | |
58 | ||
59 | /* | |
60 | * see header file | |
61 | */ | |
62 | plugin_t *eap_tnc_plugin_create() | |
63 | { | |
64 | eap_tnc_plugin_t *this; | |
65 | ||
66 | INIT(this, | |
67 | .plugin = { | |
787b5884 | 68 | .get_name = _get_name, |
f21398fa | 69 | .get_features = _get_features, |
d93e2e54 AS |
70 | .destroy = _destroy, |
71 | }, | |
72 | ); | |
73 | ||
d93e2e54 AS |
74 | return &this->plugin; |
75 | } | |
76 |