00001 #ifndef _NETDB_H_ 00002 #define _NETDB_H_ 00003 00004 /* 00005 * Copyright (C) 2002 by egnite Software GmbH. All rights reserved. 00006 * 00007 * Redistribution and use in source and binary forms, with or without 00008 * modification, are permitted provided that the following conditions 00009 * are met: 00010 * 00011 * 1. Redistributions of source code must retain the above copyright 00012 * notice, this list of conditions and the following disclaimer. 00013 * 2. Redistributions in binary form must reproduce the above copyright 00014 * notice, this list of conditions and the following disclaimer in the 00015 * documentation and/or other materials provided with the distribution. 00016 * 3. All advertising materials mentioning features or use of this 00017 * software must display the following acknowledgement: 00018 * 00019 * This product includes software developed by egnite Software GmbH 00020 * and its contributors. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS 00023 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00024 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00025 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE 00026 * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00027 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00028 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 00029 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 00030 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00031 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 00032 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00033 * SUCH DAMAGE. 00034 * 00035 * For additional information see http://www.ethernut.de/ 00036 * 00037 * - 00038 * Copyright (c) 1980, 1983, 1988, 1993 00039 * The Regents of the University of California. All rights reserved. 00040 * 00041 * Redistribution and use in source and binary forms, with or without 00042 * modification, are permitted provided that the following conditions 00043 * are met: 00044 * 1. Redistributions of source code must retain the above copyright 00045 * notice, this list of conditions and the following disclaimer. 00046 * 2. Redistributions in binary form must reproduce the above copyright 00047 * notice, this list of conditions and the following disclaimer in the 00048 * documentation and/or other materials provided with the distribution. 00049 * 3. All advertising materials mentioning features or use of this software 00050 * must display the following acknowledgement: 00051 * This product includes software developed by the University of 00052 * California, Berkeley and its contributors. 00053 * 4. Neither the name of the University nor the names of its contributors 00054 * may be used to endorse or promote products derived from this software 00055 * without specific prior written permission. 00056 * 00057 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 00058 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00059 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00060 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 00061 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00062 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00063 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00064 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00065 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00066 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00067 * SUCH DAMAGE. 00068 * 00069 * - 00070 * Portions Copyright (c) 1993 by Digital Equipment Corporation. 00071 * 00072 * Permission to use, copy, modify, and distribute this software for any 00073 * purpose with or without fee is hereby granted, provided that the above 00074 * copyright notice and this permission notice appear in all copies, and that 00075 * the name of Digital Equipment Corporation not be used in advertising or 00076 * publicity pertaining to distribution of the document or software without 00077 * specific, written prior permission. 00078 * 00079 * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL 00080 * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES 00081 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT 00082 * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 00083 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 00084 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 00085 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 00086 * SOFTWARE. 00087 */ 00088 00089 /* 00090 * $Log: netdb.h,v $ 00091 * Revision 1.2 2003/01/24 12:01:08 przemko 00092 * Obciecie dosowych znakow konca lini 00093 * 00094 * Revision 1.1.1.1 2002/12/07 07:16:51 marwi 00095 * 00096 * 00097 * Revision 1.3 2002/06/26 17:29:14 harald 00098 * First pre-release with 2.4 stack 00099 * 00100 */ 00101 00102 /* 00103 * Error return codes. 00104 */ 00105 #define NETDB_INTERNAL -1 /* see errno */ 00106 #define NETDB_SUCCESS 0 /* no problem */ 00107 #define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */ 00108 #define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */ 00109 #define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ 00110 #define NO_DATA 4 /* Valid name, no data record of requested type */ 00111 #define NO_ADDRESS NO_DATA /* no address, look for MX record */ 00112 00113 extern void NutDnsConfig(CONST u_char *hostname, CONST u_char *domain, u_long dnsip); 00114 extern u_long NutDnsGetHostByName(CONST u_char *hostname); 00115 00116 #endif