result.h revision 19872fdfb75357354a83b74932f661d4b0b6e4dd
99e207809793732e3e47da3a1cab6925b6eee8e9William King/*
499b34cea04a46823d003d4c0520c8b03e8513cbBrian Wellington * Copyright (C) 1998-2001 Internet Software Consortium.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence *
99e207809793732e3e47da3a1cab6925b6eee8e9William King * Permission to use, copy, modify, and distribute this software for any
99e207809793732e3e47da3a1cab6925b6eee8e9William King * purpose with or without fee is hereby granted, provided that the above
99e207809793732e3e47da3a1cab6925b6eee8e9William King * copyright notice and this permission notice appear in all copies.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence *
15a44745412679c30a6d022733925af70a38b715David Lawrence * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
15a44745412679c30a6d022733925af70a38b715David Lawrence * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
15a44745412679c30a6d022733925af70a38b715David Lawrence * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
15a44745412679c30a6d022733925af70a38b715David Lawrence * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
15a44745412679c30a6d022733925af70a38b715David Lawrence * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
15a44745412679c30a6d022733925af70a38b715David Lawrence * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
15a44745412679c30a6d022733925af70a38b715David Lawrence * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
15a44745412679c30a6d022733925af70a38b715David Lawrence * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
99e207809793732e3e47da3a1cab6925b6eee8e9William King */
99e207809793732e3e47da3a1cab6925b6eee8e9William King
91cd0f93ad34d23e8b09dca337120f64fbe8f0a1Andreas Gustafsson/* $Id: result.h,v 1.57 2001/06/15 22:07:51 gson Exp $ */
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence#ifndef ISC_RESULT_H
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_RESULT_H 1
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence#include <isc/lang.h>
99e207809793732e3e47da3a1cab6925b6eee8e9William King#include <isc/types.h>
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence#define ISC_R_SUCCESS 0 /* success */
b9e8ad0f49b416afda1e752aa5c3910f8aa34fffAndreas Gustafsson#define ISC_R_NOMEMORY 1 /* out of memory */
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence#define ISC_R_TIMEDOUT 2 /* timed out */
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence#define ISC_R_NOTHREADS 3 /* no available threads */
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence#define ISC_R_ADDRNOTAVAIL 4 /* address not available */
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence#define ISC_R_ADDRINUSE 5 /* address in use */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_NOPERM 6 /* permission denied */
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence#define ISC_R_NOCONN 7 /* no pending connections */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_NETUNREACH 8 /* network unreachable */
95799c090cc4aae52c57feaba43fbf2d62586a76David Lawrence#define ISC_R_HOSTUNREACH 9 /* host unreachable */
95799c090cc4aae52c57feaba43fbf2d62586a76David Lawrence#define ISC_R_NETDOWN 10 /* network down */
95799c090cc4aae52c57feaba43fbf2d62586a76David Lawrence#define ISC_R_HOSTDOWN 11 /* host down */
95799c090cc4aae52c57feaba43fbf2d62586a76David Lawrence#define ISC_R_CONNREFUSED 12 /* connection refused */
95799c090cc4aae52c57feaba43fbf2d62586a76David Lawrence#define ISC_R_NORESOURCES 13 /* not enough free resources */
95799c090cc4aae52c57feaba43fbf2d62586a76David Lawrence#define ISC_R_EOF 14 /* end of file */
95799c090cc4aae52c57feaba43fbf2d62586a76David Lawrence#define ISC_R_BOUND 15 /* socket already bound */
95799c090cc4aae52c57feaba43fbf2d62586a76David Lawrence#define ISC_R_RELOAD 16 /* reload */
95799c090cc4aae52c57feaba43fbf2d62586a76David Lawrence#define ISC_R_LOCKBUSY 17 /* lock busy */
95799c090cc4aae52c57feaba43fbf2d62586a76David Lawrence#define ISC_R_EXISTS 18 /* already exists */
95799c090cc4aae52c57feaba43fbf2d62586a76David Lawrence#define ISC_R_NOSPACE 19 /* ran out of space */
95799c090cc4aae52c57feaba43fbf2d62586a76David Lawrence#define ISC_R_CANCELED 20 /* operation canceled */
95799c090cc4aae52c57feaba43fbf2d62586a76David Lawrence#define ISC_R_NOTBOUND 21 /* socket is not bound */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_SHUTTINGDOWN 22 /* shutting down */
c403d3f7d6cb17406e9be03a330ed5cf91619abcDavid Lawrence#define ISC_R_NOTFOUND 23 /* not found */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_UNEXPECTEDEND 24 /* unexpected end of input */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_FAILURE 25 /* generic failure */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_IOERROR 26 /* I/O error */
1b6d529cb5ee0ad44f8518e1b8c2cbca54bbdf18David Lawrence#define ISC_R_NOTIMPLEMENTED 27 /* not implemented */
1b6d529cb5ee0ad44f8518e1b8c2cbca54bbdf18David Lawrence#define ISC_R_UNBALANCED 28 /* unbalanced parentheses */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_NOMORE 29 /* no more */
1b6d529cb5ee0ad44f8518e1b8c2cbca54bbdf18David Lawrence#define ISC_R_INVALIDFILE 30 /* invalid file */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_BADBASE64 31 /* bad base64 encoding */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_UNEXPECTEDTOKEN 32 /* unexpected token */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_QUOTA 33 /* quota reached */
76c8294c81fb48b1da6e1fc5b83322a4cedb8e58Andreas Gustafsson#define ISC_R_UNEXPECTED 34 /* unexpected error */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_ALREADYRUNNING 35 /* already running */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_IGNORE 36 /* ignore */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_MASKNONCONTIG 37 /* addr mask not contiguous */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_FILENOTFOUND 38 /* file not found */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_FILEEXISTS 39 /* file already exists */
1b6d529cb5ee0ad44f8518e1b8c2cbca54bbdf18David Lawrence#define ISC_R_NOTCONNECTED 40 /* socket is not connected */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_RANGE 41 /* out of range */
76c8294c81fb48b1da6e1fc5b83322a4cedb8e58Andreas Gustafsson#define ISC_R_NOENTROPY 42 /* out of entropy */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_MULTICAST 43 /* invalid use of multicast */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_NOTFILE 44 /* not a file */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_NOTDIRECTORY 45 /* not a directory */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_QUEUEFULL 46 /* queue is full */
c403d3f7d6cb17406e9be03a330ed5cf91619abcDavid Lawrence#define ISC_R_FAMILYMISMATCH 47 /* address family mismatch */
1b6d529cb5ee0ad44f8518e1b8c2cbca54bbdf18David Lawrence#define ISC_R_FAMILYNOSUPPORT 48 /* AF not supported */
1b6d529cb5ee0ad44f8518e1b8c2cbca54bbdf18David Lawrence#define ISC_R_BADHEX 49 /* bad hex encoding */
76c8294c81fb48b1da6e1fc5b83322a4cedb8e58Andreas Gustafsson#define ISC_R_TOOMANYOPENFILES 50 /* too many open files */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_NOTBLOCKING 51 /* not blocking */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_UNBALANCEDQUOTES 52 /* unbalanced quotes */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_INPROGRESS 53 /* operation in progress */
99e207809793732e3e47da3a1cab6925b6eee8e9William King#define ISC_R_CONNECTIONRESET 54 /* connection reset */
99e207809793732e3e47da3a1cab6925b6eee8e9William King
99e207809793732e3e47da3a1cab6925b6eee8e9William King/*
99e207809793732e3e47da3a1cab6925b6eee8e9William King * Not a result code: the number of results.
99e207809793732e3e47da3a1cab6925b6eee8e9William King */
9f44e95160bae777bcebe9cf216107de628bb1c0David Lawrence#define ISC_R_NRESULTS 55
99e207809793732e3e47da3a1cab6925b6eee8e9William King
1b6d529cb5ee0ad44f8518e1b8c2cbca54bbdf18David LawrenceISC_LANG_BEGINDECLS
99e207809793732e3e47da3a1cab6925b6eee8e9William King
99e207809793732e3e47da3a1cab6925b6eee8e9William Kingconst char *
99e207809793732e3e47da3a1cab6925b6eee8e9William Kingisc_result_totext(isc_result_t);
99e207809793732e3e47da3a1cab6925b6eee8e9William King/*
99e207809793732e3e47da3a1cab6925b6eee8e9William King * Convert an isc_result_t into a string message describing the result.
99e207809793732e3e47da3a1cab6925b6eee8e9William King */
99e207809793732e3e47da3a1cab6925b6eee8e9William King
99e207809793732e3e47da3a1cab6925b6eee8e9William Kingisc_result_t
99e207809793732e3e47da3a1cab6925b6eee8e9William Kingisc_result_register(unsigned int base, unsigned int nresults,
99e207809793732e3e47da3a1cab6925b6eee8e9William King const char **text, isc_msgcat_t *msgcat, int set);
99e207809793732e3e47da3a1cab6925b6eee8e9William King
99e207809793732e3e47da3a1cab6925b6eee8e9William KingISC_LANG_ENDDECLS
99e207809793732e3e47da3a1cab6925b6eee8e9William King
99e207809793732e3e47da3a1cab6925b6eee8e9William King#endif /* ISC_RESULT_H */
99e207809793732e3e47da3a1cab6925b6eee8e9William King