1*ebfedea0SLionel Sambuc /*	$NetBSD: name.h,v 1.1.1.2 2011/04/14 14:08:28 elric Exp $	*/
2*ebfedea0SLionel Sambuc 
3*ebfedea0SLionel Sambuc /*-
4*ebfedea0SLionel Sambuc  * Copyright (c) 2005 Doug Rabson
5*ebfedea0SLionel Sambuc  * All rights reserved.
6*ebfedea0SLionel Sambuc  *
7*ebfedea0SLionel Sambuc  * Redistribution and use in source and binary forms, with or without
8*ebfedea0SLionel Sambuc  * modification, are permitted provided that the following conditions
9*ebfedea0SLionel Sambuc  * are met:
10*ebfedea0SLionel Sambuc  * 1. Redistributions of source code must retain the above copyright
11*ebfedea0SLionel Sambuc  *    notice, this list of conditions and the following disclaimer.
12*ebfedea0SLionel Sambuc  * 2. Redistributions in binary form must reproduce the above copyright
13*ebfedea0SLionel Sambuc  *    notice, this list of conditions and the following disclaimer in the
14*ebfedea0SLionel Sambuc  *    documentation and/or other materials provided with the distribution.
15*ebfedea0SLionel Sambuc  *
16*ebfedea0SLionel Sambuc  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17*ebfedea0SLionel Sambuc  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18*ebfedea0SLionel Sambuc  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19*ebfedea0SLionel Sambuc  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20*ebfedea0SLionel Sambuc  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21*ebfedea0SLionel Sambuc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22*ebfedea0SLionel Sambuc  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23*ebfedea0SLionel Sambuc  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24*ebfedea0SLionel Sambuc  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25*ebfedea0SLionel Sambuc  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26*ebfedea0SLionel Sambuc  * SUCH DAMAGE.
27*ebfedea0SLionel Sambuc  *
28*ebfedea0SLionel Sambuc  *	$FreeBSD: src/lib/libgssapi/name.h,v 1.1 2005/12/29 14:40:20 dfr Exp $
29*ebfedea0SLionel Sambuc  *	Id
30*ebfedea0SLionel Sambuc  */
31*ebfedea0SLionel Sambuc 
32*ebfedea0SLionel Sambuc struct _gss_mechanism_name {
33*ebfedea0SLionel Sambuc 	HEIM_SLIST_ENTRY(_gss_mechanism_name) gmn_link;
34*ebfedea0SLionel Sambuc 	gssapi_mech_interface	gmn_mech;	/* mechanism ops for MN */
35*ebfedea0SLionel Sambuc 	gss_OID			gmn_mech_oid;	/* mechanism oid for MN */
36*ebfedea0SLionel Sambuc 	gss_name_t		gmn_name;	/* underlying MN */
37*ebfedea0SLionel Sambuc };
38*ebfedea0SLionel Sambuc HEIM_SLIST_HEAD(_gss_mechanism_name_list, _gss_mechanism_name);
39*ebfedea0SLionel Sambuc 
40*ebfedea0SLionel Sambuc struct _gss_name {
41*ebfedea0SLionel Sambuc 	gss_OID_desc		gn_type;	/* type of name */
42*ebfedea0SLionel Sambuc 	gss_buffer_desc		gn_value;	/* value (as imported) */
43*ebfedea0SLionel Sambuc 	struct _gss_mechanism_name_list gn_mn;	/* list of MNs */
44*ebfedea0SLionel Sambuc };
45*ebfedea0SLionel Sambuc 
46*ebfedea0SLionel Sambuc OM_uint32
47*ebfedea0SLionel Sambuc 	_gss_find_mn(OM_uint32 *, struct _gss_name *, gss_OID,
48*ebfedea0SLionel Sambuc 	      struct _gss_mechanism_name **);
49*ebfedea0SLionel Sambuc struct _gss_name *
50*ebfedea0SLionel Sambuc 	_gss_make_name(gssapi_mech_interface m, gss_name_t new_mn);
51