1 /* $NetBSD: result.c,v 1.1.1.3 2014/07/12 11:58:00 spz Exp $ */ 2 /* result.c 3 */ 4 5 /* 6 * Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC") 7 * Copyright (c) 1999-2003 by Internet Software Consortium 8 * 9 * Permission to use, copy, modify, and/or distribute this software for any 10 * purpose with or without fee is hereby granted, provided that the above 11 * copyright notice and this permission notice appear in all copies. 12 * 13 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 14 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 15 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 16 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 17 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 18 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 19 * PERFORMANCE OF THIS SOFTWARE. 20 * 21 * Internet Systems Consortium, Inc. 22 * 950 Charter Street 23 * Redwood City, CA 94063 24 * <info@isc.org> 25 * https://www.isc.org/ 26 * 27 */ 28 29 #include <sys/cdefs.h> 30 __RCSID("$NetBSD: result.c,v 1.1.1.3 2014/07/12 11:58:00 spz Exp $"); 31 32 #include "dhcpd.h" 33 34 /* 35 * In the previous code the results started at 36 36 * rather than ISC_RESULTCLASS_DHCP + 0 37 * ISC_R_NOTCONNECTED was + 4 (40), it has been superseeded by the isc version 38 */ 39 40 static const char *text[DHCP_R_NRESULTS] = { 41 "host unknown", /* 0 */ 42 "protocol version mismatch", /* 1 */ 43 "protocol error", /* 2 */ 44 "invalid argument", /* 3 */ 45 "data not yet available", /* 4 */ 46 "object unchanged", /* 5 */ 47 "more than one object matches key", /* 6 */ 48 "key conflict", /* 7 */ 49 "parse error(s) occurred", /* 8 */ 50 "no key specified", /* 9 */ 51 "zone TSIG key not known", /* 10 */ 52 "invalid TSIG key", /* 11 */ 53 "operation in progress", /* 12 */ 54 "DNS format error", /* 13 */ 55 "DNS server failed", /* 14 */ 56 "no such domain", /* 15 */ 57 "not implemented", /* 16 */ 58 "refused", /* 17 */ 59 "domain already exists", /* 18 */ 60 "RRset already exists", /* 19 */ 61 "no such RRset", /* 20 */ 62 "not authorized", /* 21 */ 63 "not a zone", /* 22 */ 64 "bad DNS signature", /* 23 */ 65 "bad DNS key", /* 24 */ 66 "clock skew too great", /* 25 */ 67 "no root zone", /* 26 */ 68 "destination address required", /* 27 */ 69 "cross-zone update", /* 28 */ 70 "no TSIG signature", /* 29 */ 71 "not equal", /* 30 */ 72 "connection reset by peer", /* 31 */ 73 "unknown attribute" /* 32 */ 74 }; 75 76 #define DHCP_RESULT_RESULTSET 2 77 #define DHCP_RESULT_UNAVAILABLESET 3 78 79 // This is a placeholder as we don't allow for external message catalogs yet 80 isc_msgcat_t * dhcp_msgcat = NULL; 81 82 isc_result_t 83 dhcp_result_register(void) { 84 isc_result_t result; 85 86 result = isc_result_register(ISC_RESULTCLASS_DHCP, DHCP_R_NRESULTS, 87 text, dhcp_msgcat, DHCP_RESULT_RESULTSET); 88 89 return(result); 90 } 91