c7fd3b05d7bc746b621dc9f59fba755179d68189
2 * Copyright (C) 2008 Martin Willi
3 * Hochschule fuer Technik Rapperswil
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>.
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
16 #include "eap_gtc_plugin.h"
22 /* missing in cababilities.h */
23 #define CAP_AUDIT_WRITE 29
25 METHOD(plugin_t
, get_name
, char*,
26 eap_gtc_plugin_t
*this)
31 METHOD(plugin_t
, get_features
, int,
32 eap_gtc_plugin_t
*this, plugin_feature_t
*features
[])
34 static plugin_feature_t f
[] = {
35 PLUGIN_CALLBACK(eap_method_register
, eap_gtc_create_server
),
36 PLUGIN_PROVIDE(EAP_SERVER
, EAP_GTC
),
37 PLUGIN_CALLBACK(eap_method_register
, eap_gtc_create_peer
),
38 PLUGIN_PROVIDE(EAP_PEER
, EAP_GTC
),
44 METHOD(plugin_t
, destroy
, void,
45 eap_gtc_plugin_t
*this)
53 plugin_t
*eap_gtc_plugin_create()
55 eap_gtc_plugin_t
*this;
59 .get_name
= _get_name
,
60 .get_features
= _get_features
,
65 /* required for PAM authentication */
66 charon
->caps
->keep(charon
->caps
, CAP_AUDIT_WRITE
);
68 charon
->eap
->add_method(charon
->eap
, EAP_GTC
, 0, EAP_SERVER
,
69 (eap_constructor_t
)eap_gtc_create_server
);
70 charon
->eap
->add_method(charon
->eap
, EAP_GTC
, 0, EAP_PEER
,
71 (eap_constructor_t
)eap_gtc_create_peer
);