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 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 37 #define EBASE 0 38 #define EVAL(v) (EBASE + (v)) 39 #define ENUM(v) ((v) ? (v) - EBASE : 0) 40 41 #define DH_SUCCESS 0 42 #define DH_NOMEM_FAILURE EVAL(1) 43 #define DH_ENCODE_FAILURE EVAL(2) 44 #define DH_DECODE_FAILURE EVAL(3) 45 #define DH_BADARG_FAILURE EVAL(4) 46 #define DH_CIPHER_FAILURE EVAL(5) 47 #define DH_VERIFIER_FAILURE EVAL(6) 48 #define DH_SESSION_CIPHER_FAILURE EVAL(7) 49 #define DH_NO_SECRET EVAL(8) 50 #define DH_NO_PRINCIPAL EVAL(9) 51 #define DH_NOT_LOCAL EVAL(10) 52 #define DH_UNKNOWN_QOP EVAL(11) 53 #define DH_VERIFIER_MISMATCH EVAL(12) 54 #define DH_NO_SUCH_USER EVAL(13) 55 #define DH_NETNAME_FAILURE EVAL(14) 56 #define DH_BAD_CRED EVAL(15) 57 #define DH_BAD_CONTEXT EVAL(16) 58 #define DH_PROTO_MISMATCH EVAL(17) 59 60 #ifdef __cplusplus 61 } 62 #endif 63 64 #endif /* _ERROR_H_ */ 65