xref: /illumos-gate/usr/src/lib/gss_mechs/mech_dh/backend/mech/error.h (revision 4c87aefe8930bd07275b8dd2e96ea5f24d93a52e)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  *	error.h
24  *
25  *	Copyright (c) 1997, by Sun Microsystems, Inc.
26  *	All rights reserved.
27  *
28  */
29 
30 #ifndef _ERROR_H_
31 #define	_ERROR_H_
32 
33 #pragma ident	"%Z%%M%	%I%	%E% SMI"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 #define	EBASE 0
40 #define	EVAL(v) (EBASE + (v))
41 #define	ENUM(v) ((v) ? (v) - EBASE : 0)
42 
43 #define	DH_SUCCESS 0
44 #define	DH_NOMEM_FAILURE EVAL(1)
45 #define	DH_ENCODE_FAILURE EVAL(2)
46 #define	DH_DECODE_FAILURE EVAL(3)
47 #define	DH_BADARG_FAILURE EVAL(4)
48 #define	DH_CIPHER_FAILURE EVAL(5)
49 #define	DH_VERIFIER_FAILURE EVAL(6)
50 #define	DH_SESSION_CIPHER_FAILURE EVAL(7)
51 #define	DH_NO_SECRET EVAL(8)
52 #define	DH_NO_PRINCIPAL EVAL(9)
53 #define	DH_NOT_LOCAL EVAL(10)
54 #define	DH_UNKNOWN_QOP EVAL(11)
55 #define	DH_VERIFIER_MISMATCH EVAL(12)
56 #define	DH_NO_SUCH_USER EVAL(13)
57 #define	DH_NETNAME_FAILURE EVAL(14)
58 #define	DH_BAD_CRED EVAL(15)
59 #define	DH_BAD_CONTEXT EVAL(16)
60 #define	DH_PROTO_MISMATCH EVAL(17)
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 
66 #endif /* _ERROR_H_ */
67