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
18 #include "eap_gtc_plugin.h"
24 /* missing in cababilities.h */
25 #define CAP_AUDIT_WRITE 29
28 * Implementation of plugin_t.destroy
30 static void destroy(eap_gtc_plugin_t
*this)
32 charon
->eap
->remove_method(charon
->eap
,
33 (eap_constructor_t
)eap_gtc_create_server
);
34 charon
->eap
->remove_method(charon
->eap
,
35 (eap_constructor_t
)eap_gtc_create_peer
);
42 plugin_t
*plugin_create()
44 eap_gtc_plugin_t
*this = malloc_thing(eap_gtc_plugin_t
);
46 this->plugin
.destroy
= (void(*)(plugin_t
*))destroy
;
48 /* required for PAM authentication */
49 charon
->keep_cap(charon
, CAP_AUDIT_WRITE
);
51 charon
->eap
->add_method(charon
->eap
, EAP_GTC
, 0, EAP_SERVER
,
52 (eap_constructor_t
)eap_gtc_create_server
);
53 charon
->eap
->add_method(charon
->eap
, EAP_GTC
, 0, EAP_PEER
,
54 (eap_constructor_t
)eap_gtc_create_peer
);