Annotation of embedaddon/strongswan/src/libcharon/sa/xauth/xauth_method.c, revision 1.1
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 "xauth_method.h"
! 17:
! 18: #include <daemon.h>
! 19:
! 20: ENUM(xauth_role_names, XAUTH_SERVER, XAUTH_PEER,
! 21: "XAUTH_SERVER",
! 22: "XAUTH_PEER",
! 23: );
! 24:
! 25: /**
! 26: * See header
! 27: */
! 28: bool xauth_method_register(plugin_t *plugin, plugin_feature_t *feature,
! 29: bool reg, void *data)
! 30: {
! 31: if (reg)
! 32: {
! 33: charon->xauth->add_method(charon->xauth, feature->arg.xauth,
! 34: feature->type == FEATURE_XAUTH_SERVER ? XAUTH_SERVER : XAUTH_PEER,
! 35: (xauth_constructor_t)data);
! 36: }
! 37: else
! 38: {
! 39: charon->xauth->remove_method(charon->xauth, (xauth_constructor_t)data);
! 40: }
! 41: return TRUE;
! 42: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>