result.h revision 135446
1135446Strhodes/*
2135446Strhodes * Copyright (C) 2004  Internet Systems Consortium, Inc. ("ISC")
3135446Strhodes * Copyright (C) 1998-2001, 2003  Internet Software Consortium.
4135446Strhodes *
5135446Strhodes * Permission to use, copy, modify, and distribute this software for any
6135446Strhodes * purpose with or without fee is hereby granted, provided that the above
7135446Strhodes * copyright notice and this permission notice appear in all copies.
8135446Strhodes *
9135446Strhodes * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10135446Strhodes * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11135446Strhodes * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12135446Strhodes * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13135446Strhodes * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14135446Strhodes * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15135446Strhodes * PERFORMANCE OF THIS SOFTWARE.
16135446Strhodes */
17135446Strhodes
18135446Strhodes/* $Id: result.h,v 1.57.2.2.8.5 2004/05/15 03:46:13 jinmei Exp $ */
19135446Strhodes
20135446Strhodes#ifndef ISC_RESULT_H
21135446Strhodes#define ISC_RESULT_H 1
22135446Strhodes
23135446Strhodes#include <isc/lang.h>
24135446Strhodes#include <isc/types.h>
25135446Strhodes
26135446Strhodes#define ISC_R_SUCCESS			0	/* success */
27135446Strhodes#define ISC_R_NOMEMORY			1	/* out of memory */
28135446Strhodes#define ISC_R_TIMEDOUT			2	/* timed out */
29135446Strhodes#define ISC_R_NOTHREADS			3	/* no available threads */
30135446Strhodes#define ISC_R_ADDRNOTAVAIL		4	/* address not available */
31135446Strhodes#define ISC_R_ADDRINUSE			5	/* address in use */
32135446Strhodes#define ISC_R_NOPERM			6	/* permission denied */
33135446Strhodes#define ISC_R_NOCONN			7	/* no pending connections */
34135446Strhodes#define ISC_R_NETUNREACH		8	/* network unreachable */
35135446Strhodes#define ISC_R_HOSTUNREACH		9	/* host unreachable */
36135446Strhodes#define ISC_R_NETDOWN			10	/* network down */
37135446Strhodes#define ISC_R_HOSTDOWN			11	/* host down */
38135446Strhodes#define ISC_R_CONNREFUSED		12	/* connection refused */
39135446Strhodes#define ISC_R_NORESOURCES		13	/* not enough free resources */
40135446Strhodes#define ISC_R_EOF			14	/* end of file */
41135446Strhodes#define ISC_R_BOUND			15	/* socket already bound */
42135446Strhodes#define ISC_R_RELOAD			16	/* reload */
43135446Strhodes#define ISC_R_LOCKBUSY			17	/* lock busy */
44135446Strhodes#define ISC_R_EXISTS			18	/* already exists */
45135446Strhodes#define ISC_R_NOSPACE			19	/* ran out of space */
46135446Strhodes#define ISC_R_CANCELED			20	/* operation canceled */
47135446Strhodes#define ISC_R_NOTBOUND			21	/* socket is not bound */
48135446Strhodes#define ISC_R_SHUTTINGDOWN		22	/* shutting down */
49135446Strhodes#define ISC_R_NOTFOUND			23	/* not found */
50135446Strhodes#define ISC_R_UNEXPECTEDEND		24	/* unexpected end of input */
51135446Strhodes#define ISC_R_FAILURE			25	/* generic failure */
52135446Strhodes#define ISC_R_IOERROR			26	/* I/O error */
53135446Strhodes#define ISC_R_NOTIMPLEMENTED		27	/* not implemented */
54135446Strhodes#define ISC_R_UNBALANCED		28	/* unbalanced parentheses */
55135446Strhodes#define ISC_R_NOMORE			29	/* no more */
56135446Strhodes#define ISC_R_INVALIDFILE		30	/* invalid file */
57135446Strhodes#define ISC_R_BADBASE64			31	/* bad base64 encoding */
58135446Strhodes#define ISC_R_UNEXPECTEDTOKEN		32	/* unexpected token */
59135446Strhodes#define ISC_R_QUOTA			33	/* quota reached */
60135446Strhodes#define ISC_R_UNEXPECTED		34	/* unexpected error */
61135446Strhodes#define ISC_R_ALREADYRUNNING		35	/* already running */
62135446Strhodes#define ISC_R_IGNORE			36	/* ignore */
63135446Strhodes#define ISC_R_MASKNONCONTIG             37	/* addr mask not contiguous */
64135446Strhodes#define ISC_R_FILENOTFOUND		38	/* file not found */
65135446Strhodes#define ISC_R_FILEEXISTS		39	/* file already exists */
66135446Strhodes#define ISC_R_NOTCONNECTED		40	/* socket is not connected */
67135446Strhodes#define ISC_R_RANGE			41	/* out of range */
68135446Strhodes#define ISC_R_NOENTROPY			42	/* out of entropy */
69135446Strhodes#define ISC_R_MULTICAST			43	/* invalid use of multicast */
70135446Strhodes#define ISC_R_NOTFILE			44	/* not a file */
71135446Strhodes#define ISC_R_NOTDIRECTORY		45	/* not a directory */
72135446Strhodes#define ISC_R_QUEUEFULL			46	/* queue is full */
73135446Strhodes#define ISC_R_FAMILYMISMATCH		47	/* address family mismatch */
74135446Strhodes#define ISC_R_FAMILYNOSUPPORT		48	/* AF not supported */
75135446Strhodes#define ISC_R_BADHEX			49	/* bad hex encoding */
76135446Strhodes#define ISC_R_TOOMANYOPENFILES		50	/* too many open files */
77135446Strhodes#define ISC_R_NOTBLOCKING		51	/* not blocking */
78135446Strhodes#define ISC_R_UNBALANCEDQUOTES		52	/* unbalanced quotes */
79135446Strhodes#define ISC_R_INPROGRESS		53	/* operation in progress */
80135446Strhodes#define ISC_R_CONNECTIONRESET		54	/* connection reset */
81135446Strhodes#define ISC_R_SOFTQUOTA			55	/* soft quota reached */
82135446Strhodes#define ISC_R_BADNUMBER			56	/* not a valid number */
83135446Strhodes#define ISC_R_DISABLED			57	/* disabled */
84135446Strhodes#define ISC_R_MAXSIZE			58	/* max size */
85135446Strhodes#define ISC_R_BADADDRESSFORM		59	/* invalid address format */
86135446Strhodes
87135446Strhodes/*
88135446Strhodes * Not a result code: the number of results.
89135446Strhodes */
90135446Strhodes#define ISC_R_NRESULTS 			60
91135446Strhodes
92135446StrhodesISC_LANG_BEGINDECLS
93135446Strhodes
94135446Strhodesconst char *
95135446Strhodesisc_result_totext(isc_result_t);
96135446Strhodes/*
97135446Strhodes * Convert an isc_result_t into a string message describing the result.
98135446Strhodes */
99135446Strhodes
100135446Strhodesisc_result_t
101135446Strhodesisc_result_register(unsigned int base, unsigned int nresults,
102135446Strhodes		    const char **text, isc_msgcat_t *msgcat, int set);
103135446Strhodes
104135446StrhodesISC_LANG_ENDDECLS
105135446Strhodes
106135446Strhodes#endif /* ISC_RESULT_H */
107