result.h revision 3a2487c9e399ea2886e994e31b13908299f16f26
1633838b8255282d10af15c5c84cee5a51466712Bob Halley/*
ca41b452ede6feaa9d8739ec3cae19389a7b0d03Bob Halley * Copyright (C) 1998, 1999, 2000 Internet Software Consortium.
1633838b8255282d10af15c5c84cee5a51466712Bob Halley *
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * Permission to use, copy, modify, and distribute this software for any
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * purpose with or without fee is hereby granted, provided that the above
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * copyright notice and this permission notice appear in all copies.
1633838b8255282d10af15c5c84cee5a51466712Bob Halley *
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
1633838b8255282d10af15c5c84cee5a51466712Bob Halley * SOFTWARE.
1633838b8255282d10af15c5c84cee5a51466712Bob Halley */
fda0ab6a96a7edb1acbde0c77ead0542979b0f24Bob Halley
fda0ab6a96a7edb1acbde0c77ead0542979b0f24Bob Halley#ifndef ISC_RESULT_H
fda0ab6a96a7edb1acbde0c77ead0542979b0f24Bob Halley#define ISC_RESULT_H 1
fda0ab6a96a7edb1acbde0c77ead0542979b0f24Bob Halley
e4e071ae12aee942fefc2c0a3280e402938669deBob Halley#include <isc/boolean.h>
7aacbd685b2107670e4179689abec9cb82d972abBob Halley#include <isc/lang.h>
e4e071ae12aee942fefc2c0a3280e402938669deBob Halley#include <isc/list.h>
d8dcd6ad4617cc8d7df979bd62101fa9c4bac1bcBob Halley#include <isc/types.h>
7aacbd685b2107670e4179689abec9cb82d972abBob Halley
7aacbd685b2107670e4179689abec9cb82d972abBob HalleyISC_LANG_BEGINDECLS
7aacbd685b2107670e4179689abec9cb82d972abBob Halley
fda0ab6a96a7edb1acbde0c77ead0542979b0f24Bob Halley#define ISC_R_SUCCESS 0
fda0ab6a96a7edb1acbde0c77ead0542979b0f24Bob Halley#define ISC_R_NOMEMORY 1
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob Halley#define ISC_R_TIMEDOUT 2
bf6d2e39124ab3d51c253f7acad9a4abef059be6Bob Halley#define ISC_R_NOTHREADS 3
3cddfdd29969046e598e9465c72936ccd30df233Bob Halley#define ISC_R_ADDRNOTAVAIL 4
3cddfdd29969046e598e9465c72936ccd30df233Bob Halley#define ISC_R_ADDRINUSE 5
3cddfdd29969046e598e9465c72936ccd30df233Bob Halley#define ISC_R_NOPERM 6
3cddfdd29969046e598e9465c72936ccd30df233Bob Halley#define ISC_R_NOCONN 7
3cddfdd29969046e598e9465c72936ccd30df233Bob Halley#define ISC_R_NETUNREACH 8
3cddfdd29969046e598e9465c72936ccd30df233Bob Halley#define ISC_R_HOSTUNREACH 9
3cddfdd29969046e598e9465c72936ccd30df233Bob Halley#define ISC_R_NETDOWN 10
3cddfdd29969046e598e9465c72936ccd30df233Bob Halley#define ISC_R_HOSTDOWN 11
3cddfdd29969046e598e9465c72936ccd30df233Bob Halley#define ISC_R_CONNREFUSED 12
35921f41cfcbde6c5bdcb54abd3d5e0ed2256205Michael Graff#define ISC_R_NORESOURCES 13 /* not enough resources */
f02c1d9431a7bad59ef2d40a341fa2f68a8a7550Michael Graff#define ISC_R_EOF 14 /* end of file */
f02c1d9431a7bad59ef2d40a341fa2f68a8a7550Michael Graff#define ISC_R_BOUND 15 /* already bound */
010170f711705f72d488d097daea31b7be4af9d4Bob Halley#define ISC_R_RELOAD 16
903c1c35fcec1aa32b6cea9cbdf0a2f055abed2dBob Halley#define ISC_R_LOCKBUSY 17
6a632f69681d2af06026345f92f8ee879ce18e08Bob Halley#define ISC_R_EXISTS 18
af0fce400bfa79289aae239c10ae7f4fb2be8fa6Bob Halley#define ISC_R_NOSPACE 19 /* ran out of space */
a0084eaa9f134e32d456537c67d2db7516aba867Michael Graff#define ISC_R_CANCELED 20
3c5c6fc34519e554129808d2b015b0a0ca6a1eadBob Halley/* AVAILABLE CODE 21 */
0d3119d4d1394adf61f5ab69ef3573993cde6fe3Michael Graff#define ISC_R_SHUTTINGDOWN 22 /* shutting down */
b2df2dafcd42e0ffefc9a9a47d72afcb551a9c2bBob Halley#define ISC_R_NOTFOUND 23
af0fce400bfa79289aae239c10ae7f4fb2be8fa6Bob Halley#define ISC_R_UNEXPECTEDEND 24 /* unexpected end of input */
af0fce400bfa79289aae239c10ae7f4fb2be8fa6Bob Halley#define ISC_R_FAILURE 25 /* generic failure */
af0fce400bfa79289aae239c10ae7f4fb2be8fa6Bob Halley#define ISC_R_IOERROR 26
aa3a328647720d733397b67c62f15331295fac09Bob Halley#define ISC_R_NOTIMPLEMENTED 27
516d43e889d4fba3711671b6329f4145748c78ffBob Halley#define ISC_R_UNBALANCED 28
f3d38475531f218d0a2c2917b506b7ce60664b7cBob Halley#define ISC_R_NOMORE 29
4182ae60b066051487fea5318d379bfa78eb67f1James Brister#define ISC_R_INVALIDFILE 30
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington#define ISC_R_BADBASE64 31
822f6cdabb1edd44472c7a758b5cae71376fa9beBrian Wellington#define ISC_R_UNEXPECTEDTOKEN 32
e4e071ae12aee942fefc2c0a3280e402938669deBob Halley#define ISC_R_QUOTA 33
e4e071ae12aee942fefc2c0a3280e402938669deBob Halley#define ISC_R_UNEXPECTED 34
55396fb3fba8ba140c12623acac27e007d4119a6Bob Halley#define ISC_R_ALREADYRUNNING 35
3a2487c9e399ea2886e994e31b13908299f16f26Andreas Gustafsson#define ISC_R_IGNORE 36
35921f41cfcbde6c5bdcb54abd3d5e0ed2256205Michael Graff
3a2487c9e399ea2886e994e31b13908299f16f26Andreas Gustafsson#define ISC_R_NRESULTS 37 /* Number of results */
fda0ab6a96a7edb1acbde0c77ead0542979b0f24Bob Halley
e4e071ae12aee942fefc2c0a3280e402938669deBob Halleychar * isc_result_totext(isc_result_t);
e4e071ae12aee942fefc2c0a3280e402938669deBob Halleyisc_result_t isc_result_register(unsigned int base,
e4e071ae12aee942fefc2c0a3280e402938669deBob Halley unsigned int nresults,
d8dcd6ad4617cc8d7df979bd62101fa9c4bac1bcBob Halley char **text,
d8dcd6ad4617cc8d7df979bd62101fa9c4bac1bcBob Halley isc_msgcat_t *msgcat,
d8dcd6ad4617cc8d7df979bd62101fa9c4bac1bcBob Halley int set);
fda0ab6a96a7edb1acbde0c77ead0542979b0f24Bob Halley
7aacbd685b2107670e4179689abec9cb82d972abBob HalleyISC_LANG_ENDDECLS
7aacbd685b2107670e4179689abec9cb82d972abBob Halley
fda0ab6a96a7edb1acbde0c77ead0542979b0f24Bob Halley#endif /* ISC_RESULT_H */