00001 /*--------------------------------------------------------------------------- 00002 * Copyright (C) 2003, 2004 Dallas Semiconductor Corporation, 00003 * All Rights Reserved. 00004 * 00005 * Permission is hereby granted, free of charge, to any person obtaining a 00006 * copy of this software and associated documentation files (the "Software"), 00007 * to deal in the Software without restriction, including without limitation 00008 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00009 * and/or sell copies of the Software, and to permit persons to whom the 00010 * Software is furnished to do so, subject to the following conditions: 00011 * 00012 * The above copyright notice and this permission notice shall be included 00013 * in all copies or substantial portions of the Software. 00014 * 00015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00016 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00017 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00018 * IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES 00019 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 00020 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00021 * OTHER DEALINGS IN THE SOFTWARE. 00022 * 00023 * Except as contained in this notice, the name of Dallas Semiconductor 00024 * shall not be used except as stated in the Dallas Semiconductor 00025 * Branding Policy. 00026 * --------------------------------------------------------------------------- 00027 * 00028 * This file contains function definitions for DNS client code to be used 00029 * with the Dallas Semiconductor 400 processor. This file is intended for use 00030 * with the Keil MicroVision (uVision) C compiler. 00031 * 00032 * --------------------------------------------------------------------------- 00033 */ 00034 #ifndef __tini400_dns_ 00035 #define __tini400_dns_ 00036 00037 #include <stdlib.h> // needed for size_t 00038 00076 #define TINI400_DNS_VERSION 5 00077 00082 struct hostent 00083 { 00084 char* h_name; 00085 char** h_aliases; 00086 int h_addrtype; 00087 int h_length; 00088 char** h_addr_list; 00089 }; 00090 00096 struct mailhostent 00097 { 00098 char* h_name; 00099 int preference; 00100 }; 00101 00102 00103 00125 //--------------------------------------------------------------------------- 00126 struct hostent* gethostbyaddr(void* addr, size_t len, int type); 00127 00142 //--------------------------------------------------------------------------- 00143 struct hostent* gethostbyname(char* name); 00144 00152 //--------------------------------------------------------------------------- 00153 void dns_init(void); 00154 00167 //--------------------------------------------------------------------------- 00168 void dns_settimeout(unsigned long t); 00169 00181 //--------------------------------------------------------------------------- 00182 unsigned long dns_gettimeout(void); 00183 00204 //--------------------------------------------------------------------------- 00205 void dns_getprimary(struct sockaddr* sa); 00206 00224 //--------------------------------------------------------------------------- 00225 void dns_setprimary(struct sockaddr* sa); 00226 00248 //--------------------------------------------------------------------------- 00249 void dns_getsecondary(struct sockaddr* sa); 00250 00268 //--------------------------------------------------------------------------- 00269 void dns_setsecondary(struct sockaddr* sa); 00270 00271 00272 00273 00290 //--------------------------------------------------------------------------- 00291 struct mailhostent* dns_getmx(char* name); 00292 00293 00304 //--------------------------------------------------------------------------- 00305 void dns_enableipv6queries(unsigned char enable); 00306 00307 00313 //--------------------------------------------------------------------------- 00314 unsigned int dns_version(); 00315 00316 #endif
| Copyright 2004 Dallas Semiconductor, Inc.. | Documentation generated by Doxygen. |