1290001Sglebius/* 2290001Sglebius * Copyright (C) 2004-2009, 2012 Internet Systems Consortium, Inc. ("ISC") 3290001Sglebius * Copyright (C) 1998-2001, 2003 Internet Software Consortium. 4290001Sglebius * 5290001Sglebius * Permission to use, copy, modify, and/or distribute this software for any 6290001Sglebius * purpose with or without fee is hereby granted, provided that the above 7290001Sglebius * copyright notice and this permission notice appear in all copies. 8290001Sglebius * 9290001Sglebius * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 10290001Sglebius * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 11290001Sglebius * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 12290001Sglebius * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13290001Sglebius * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 14290001Sglebius * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15290001Sglebius * PERFORMANCE OF THIS SOFTWARE. 16290001Sglebius */ 17290001Sglebius 18290001Sglebius/* $Id$ */ 19290001Sglebius 20290001Sglebius#ifndef ISC_RESULT_H 21290001Sglebius#define ISC_RESULT_H 1 22290001Sglebius 23290001Sglebius/*! \file isc/result.h */ 24290001Sglebius 25290001Sglebius#include <isc/lang.h> 26290001Sglebius#include <isc/types.h> 27290001Sglebius 28290001Sglebius#define ISC_R_SUCCESS 0 /*%< success */ 29290001Sglebius#define ISC_R_NOMEMORY 1 /*%< out of memory */ 30290001Sglebius#define ISC_R_TIMEDOUT 2 /*%< timed out */ 31290001Sglebius#define ISC_R_NOTHREADS 3 /*%< no available threads */ 32290001Sglebius#define ISC_R_ADDRNOTAVAIL 4 /*%< address not available */ 33290001Sglebius#define ISC_R_ADDRINUSE 5 /*%< address in use */ 34290001Sglebius#define ISC_R_NOPERM 6 /*%< permission denied */ 35290001Sglebius#define ISC_R_NOCONN 7 /*%< no pending connections */ 36290001Sglebius#define ISC_R_NETUNREACH 8 /*%< network unreachable */ 37290001Sglebius#define ISC_R_HOSTUNREACH 9 /*%< host unreachable */ 38290001Sglebius#define ISC_R_NETDOWN 10 /*%< network down */ 39290001Sglebius#define ISC_R_HOSTDOWN 11 /*%< host down */ 40290001Sglebius#define ISC_R_CONNREFUSED 12 /*%< connection refused */ 41290001Sglebius#define ISC_R_NORESOURCES 13 /*%< not enough free resources */ 42290001Sglebius#define ISC_R_EOF 14 /*%< end of file */ 43290001Sglebius#define ISC_R_BOUND 15 /*%< socket already bound */ 44290001Sglebius#define ISC_R_RELOAD 16 /*%< reload */ 45290001Sglebius#define ISC_R_SUSPEND ISC_R_RELOAD /*%< alias of 'reload' */ 46290001Sglebius#define ISC_R_LOCKBUSY 17 /*%< lock busy */ 47290001Sglebius#define ISC_R_EXISTS 18 /*%< already exists */ 48290001Sglebius#define ISC_R_NOSPACE 19 /*%< ran out of space */ 49290001Sglebius#define ISC_R_CANCELED 20 /*%< operation canceled */ 50290001Sglebius#define ISC_R_NOTBOUND 21 /*%< socket is not bound */ 51290001Sglebius#define ISC_R_SHUTTINGDOWN 22 /*%< shutting down */ 52290001Sglebius#define ISC_R_NOTFOUND 23 /*%< not found */ 53290001Sglebius#define ISC_R_UNEXPECTEDEND 24 /*%< unexpected end of input */ 54290001Sglebius#define ISC_R_FAILURE 25 /*%< generic failure */ 55290001Sglebius#define ISC_R_IOERROR 26 /*%< I/O error */ 56290001Sglebius#define ISC_R_NOTIMPLEMENTED 27 /*%< not implemented */ 57290001Sglebius#define ISC_R_UNBALANCED 28 /*%< unbalanced parentheses */ 58290001Sglebius#define ISC_R_NOMORE 29 /*%< no more */ 59290001Sglebius#define ISC_R_INVALIDFILE 30 /*%< invalid file */ 60290001Sglebius#define ISC_R_BADBASE64 31 /*%< bad base64 encoding */ 61290001Sglebius#define ISC_R_UNEXPECTEDTOKEN 32 /*%< unexpected token */ 62290001Sglebius#define ISC_R_QUOTA 33 /*%< quota reached */ 63290001Sglebius#define ISC_R_UNEXPECTED 34 /*%< unexpected error */ 64290001Sglebius#define ISC_R_ALREADYRUNNING 35 /*%< already running */ 65290001Sglebius#define ISC_R_IGNORE 36 /*%< ignore */ 66290001Sglebius#define ISC_R_MASKNONCONTIG 37 /*%< addr mask not contiguous */ 67290001Sglebius#define ISC_R_FILENOTFOUND 38 /*%< file not found */ 68290001Sglebius#define ISC_R_FILEEXISTS 39 /*%< file already exists */ 69290001Sglebius#define ISC_R_NOTCONNECTED 40 /*%< socket is not connected */ 70290001Sglebius#define ISC_R_RANGE 41 /*%< out of range */ 71290001Sglebius#define ISC_R_NOENTROPY 42 /*%< out of entropy */ 72290001Sglebius#define ISC_R_MULTICAST 43 /*%< invalid use of multicast */ 73290001Sglebius#define ISC_R_NOTFILE 44 /*%< not a file */ 74290001Sglebius#define ISC_R_NOTDIRECTORY 45 /*%< not a directory */ 75290001Sglebius#define ISC_R_QUEUEFULL 46 /*%< queue is full */ 76290001Sglebius#define ISC_R_FAMILYMISMATCH 47 /*%< address family mismatch */ 77290001Sglebius#define ISC_R_FAMILYNOSUPPORT 48 /*%< AF not supported */ 78290001Sglebius#define ISC_R_BADHEX 49 /*%< bad hex encoding */ 79290001Sglebius#define ISC_R_TOOMANYOPENFILES 50 /*%< too many open files */ 80290001Sglebius#define ISC_R_NOTBLOCKING 51 /*%< not blocking */ 81290001Sglebius#define ISC_R_UNBALANCEDQUOTES 52 /*%< unbalanced quotes */ 82290001Sglebius#define ISC_R_INPROGRESS 53 /*%< operation in progress */ 83290001Sglebius#define ISC_R_CONNECTIONRESET 54 /*%< connection reset */ 84290001Sglebius#define ISC_R_SOFTQUOTA 55 /*%< soft quota reached */ 85290001Sglebius#define ISC_R_BADNUMBER 56 /*%< not a valid number */ 86290001Sglebius#define ISC_R_DISABLED 57 /*%< disabled */ 87290001Sglebius#define ISC_R_MAXSIZE 58 /*%< max size */ 88290001Sglebius#define ISC_R_BADADDRESSFORM 59 /*%< invalid address format */ 89290001Sglebius#define ISC_R_BADBASE32 60 /*%< bad base32 encoding */ 90290001Sglebius#define ISC_R_UNSET 61 /*%< unset */ 91290001Sglebius 92290001Sglebius/*% Not a result code: the number of results. */ 93290001Sglebius#define ISC_R_NRESULTS 62 94290001Sglebius 95290001SglebiusISC_LANG_BEGINDECLS 96290001Sglebius 97290001Sglebiusconst char * 98290001Sglebiusisc_result_totext(isc_result_t); 99290001Sglebius/*%< 100290001Sglebius * Convert an isc_result_t into a string message describing the result. 101290001Sglebius */ 102290001Sglebius 103290001Sglebiusisc_result_t 104290001Sglebiusisc_result_register(unsigned int base, unsigned int nresults, 105290001Sglebius const char **text, isc_msgcat_t *msgcat, int set); 106290001Sglebius 107290001SglebiusISC_LANG_ENDDECLS 108290001Sglebius 109290001Sglebius#endif /* ISC_RESULT_H */ 110