1153838Sdfr/*-
2153838Sdfr * Copyright (c) 2005 Doug Rabson
3153838Sdfr * All rights reserved.
4153838Sdfr *
5153838Sdfr * Redistribution and use in source and binary forms, with or without
6153838Sdfr * modification, are permitted provided that the following conditions
7153838Sdfr * are met:
8153838Sdfr * 1. Redistributions of source code must retain the above copyright
9153838Sdfr *    notice, this list of conditions and the following disclaimer.
10153838Sdfr * 2. Redistributions in binary form must reproduce the above copyright
11153838Sdfr *    notice, this list of conditions and the following disclaimer in the
12153838Sdfr *    documentation and/or other materials provided with the distribution.
13153838Sdfr *
14153838Sdfr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15153838Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16153838Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17153838Sdfr * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18153838Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19153838Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20153838Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21153838Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22153838Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23153838Sdfr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24153838Sdfr * SUCH DAMAGE.
25153838Sdfr *
26153838Sdfr *	$FreeBSD$
27153838Sdfr */
28153838Sdfr
29153838Sdfr#include <sys/queue.h>
30153838Sdfr
31153838Sdfrstruct _gss_mechanism_name {
32153838Sdfr	SLIST_ENTRY(_gss_mechanism_name) gmn_link;
33153838Sdfr	struct _gss_mech_switch *gmn_mech;	/* mechanism ops for MN */
34153838Sdfr	gss_OID			gmn_mech_oid;	/* mechanism oid for MN */
35153838Sdfr	gss_name_t		gmn_name;	/* underlying MN */
36153838Sdfr};
37153838SdfrSLIST_HEAD(_gss_mechanism_name_list, _gss_mechanism_name);
38153838Sdfr
39153838Sdfrstruct _gss_name {
40153838Sdfr	gss_OID_desc		gn_type;	/* type of name */
41153838Sdfr	gss_buffer_desc		gn_value;	/* value (as imported) */
42153838Sdfr	struct _gss_mechanism_name_list gn_mn;	/* list of MNs */
43153838Sdfr};
44153838Sdfr
45178828Sdfrextern OM_uint32
46178828Sdfr	_gss_find_mn(OM_uint32 *, struct _gss_name *, gss_OID,
47178828Sdfr	      struct _gss_mechanism_name **);
48178828Sdfrextern struct _gss_name *
49153838Sdfr	_gss_make_name(struct _gss_mech_switch *m, gss_name_t new_mn);
50