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 7 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 00170 //--------------------------------------------------------------------------- 00171 void dns_settimeout(unsigned long t); 00172 00188 //--------------------------------------------------------------------------- 00189 void dns_setmaxtimeout(unsigned long t); 00190 00202 //--------------------------------------------------------------------------- 00203 unsigned long dns_gettimeout(void); 00204 00225 //--------------------------------------------------------------------------- 00226 void dns_getprimary(struct sockaddr* sa); 00227 00245 //--------------------------------------------------------------------------- 00246 void dns_setprimary(struct sockaddr* sa); 00247 00269 //--------------------------------------------------------------------------- 00270 void dns_getsecondary(struct sockaddr* sa); 00271 00289 //--------------------------------------------------------------------------- 00290 void dns_setsecondary(struct sockaddr* sa); 00291 00292 00293 00294 00311 //--------------------------------------------------------------------------- 00312 struct mailhostent* dns_getmx(char* name); 00313 00314 00325 //--------------------------------------------------------------------------- 00326 void dns_enableipv6queries(unsigned char enable); 00327 00328 00334 //--------------------------------------------------------------------------- 00335 unsigned int dns_version(); 00336 00337 #endif
| Copyright 2005 Dallas Semiconductor, Inc.. | Documentation generated by Doxygen. |