Return to eap_method.c CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / strongswan / src / libcharon / sa / eap |
1.1 misho 1: /* 2: * Copyright (C) 2006 Martin Willi 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_method.h" 17: 18: #include <daemon.h> 19: 20: ENUM(eap_role_names, EAP_SERVER, EAP_PEER, 21: "EAP_SERVER", 22: "EAP_PEER", 23: ); 24: 25: /** 26: * See header 27: */ 28: bool eap_method_register(plugin_t *plugin, plugin_feature_t *feature, 29: bool reg, void *data) 30: { 31: if (reg) 32: { 33: charon->eap->add_method(charon->eap, feature->arg.eap.type, 34: feature->arg.eap.vendor, 35: feature->type == FEATURE_EAP_SERVER ? EAP_SERVER : EAP_PEER, 36: (eap_constructor_t)data); 37: } 38: else 39: { 40: charon->eap->remove_method(charon->eap, (eap_constructor_t)data); 41: } 42: return TRUE; 43: }