1/*
2 * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23/*	$FreeBSD: src/lib/libipsec/ipsec_strerror.h,v 1.1.2.2 2001/07/03 11:01:14 ume Exp $	*/
24/*	$KAME: ipsec_strerror.h,v 1.8 2000/07/30 00:45:12 itojun Exp $	*/
25
26/*
27 * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
28 * All rights reserved.
29 *
30 * Redistribution and use in source and binary forms, with or without
31 * modification, are permitted provided that the following conditions
32 * are met:
33 * 1. Redistributions of source code must retain the above copyright
34 *    notice, this list of conditions and the following disclaimer.
35 * 2. Redistributions in binary form must reproduce the above copyright
36 *    notice, this list of conditions and the following disclaimer in the
37 *    documentation and/or other materials provided with the distribution.
38 * 3. Neither the name of the project nor the names of its contributors
39 *    may be used to endorse or promote products derived from this software
40 *    without specific prior written permission.
41 *
42 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
43 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
44 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
45 * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
46 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
47 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
48 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
49 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
50 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
51 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
52 * SUCH DAMAGE.
53 */
54
55extern int __ipsec_errcode;
56extern void __ipsec_set_strerror __P((const char *));
57
58#define EIPSEC_NO_ERROR		0	/*success*/
59#define EIPSEC_NOT_SUPPORTED	1	/*not supported*/
60#define EIPSEC_INVAL_ARGUMENT	2	/*invalid argument*/
61#define EIPSEC_INVAL_SADBMSG	3	/*invalid sadb message*/
62#define EIPSEC_INVAL_VERSION	4	/*invalid version*/
63#define EIPSEC_INVAL_POLICY	5	/*invalid security policy*/
64#define EIPSEC_INVAL_ADDRESS	6	/*invalid address specification*/
65#define EIPSEC_INVAL_PROTO	7	/*invalid ipsec protocol*/
66#define EIPSEC_INVAL_MODE	8	/*Invalid ipsec mode*/
67#define EIPSEC_INVAL_LEVEL	9	/*invalid ipsec level*/
68#define EIPSEC_INVAL_SATYPE	10	/*invalid SA type*/
69#define EIPSEC_INVAL_MSGTYPE	11	/*invalid message type*/
70#define EIPSEC_INVAL_EXTTYPE	12	/*invalid extension type*/
71#define EIPSEC_INVAL_ALGS	13	/*Invalid algorithm type*/
72#define EIPSEC_INVAL_KEYLEN	14	/*invalid key length*/
73#define EIPSEC_INVAL_FAMILY	15	/*invalid address family*/
74#define EIPSEC_INVAL_PREFIXLEN	16	/*SPI range violation*/
75#define EIPSEC_INVAL_DIR	17	/*Invalid direciton*/
76#define EIPSEC_INVAL_SPI	18	/*invalid prefixlen*/
77#define EIPSEC_NO_PROTO		19	/*no protocol specified*/
78#define EIPSEC_NO_ALGS		20	/*No algorithm specified*/
79#define EIPSEC_NO_BUFS		21	/*no buffers available*/
80#define EIPSEC_DO_GET_SUPP_LIST	22	/*must get supported algorithm first*/
81#define EIPSEC_PROTO_MISMATCH	23	/*protocol mismatch*/
82#define EIPSEC_FAMILY_MISMATCH	24	/*family mismatch*/
83#define EIPSEC_FEW_ARGUMENTS	25	/*Too few arguments*/
84#define EIPSEC_SYSTEM_ERROR	26	/*system error*/
85#define EIPSEC_MAX		27	/*unknown error*/
86