Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygendns.h
Go to the documentation of this file.
00001 00034 #ifndef __LWIP_DNS_H__ 00035 #define __LWIP_DNS_H__ 00036 00037 #include "lwip/opt.h" 00038 00039 #if LWIP_DNS /* don't build if not configured for use in lwipopts.h */ 00040 00041 #ifdef __cplusplus 00042 extern "C" { 00043 #endif 00044 00046 #define DNS_TMR_INTERVAL 1000 00047 00049 #define DNS_RRTYPE_A 1 /* a host address */ 00050 #define DNS_RRTYPE_NS 2 /* an authoritative name server */ 00051 #define DNS_RRTYPE_MD 3 /* a mail destination (Obsolete - use MX) */ 00052 #define DNS_RRTYPE_MF 4 /* a mail forwarder (Obsolete - use MX) */ 00053 #define DNS_RRTYPE_CNAME 5 /* the canonical name for an alias */ 00054 #define DNS_RRTYPE_SOA 6 /* marks the start of a zone of authority */ 00055 #define DNS_RRTYPE_MB 7 /* a mailbox domain name (EXPERIMENTAL) */ 00056 #define DNS_RRTYPE_MG 8 /* a mail group member (EXPERIMENTAL) */ 00057 #define DNS_RRTYPE_MR 9 /* a mail rename domain name (EXPERIMENTAL) */ 00058 #define DNS_RRTYPE_NULL 10 /* a null RR (EXPERIMENTAL) */ 00059 #define DNS_RRTYPE_WKS 11 /* a well known service description */ 00060 #define DNS_RRTYPE_PTR 12 /* a domain name pointer */ 00061 #define DNS_RRTYPE_HINFO 13 /* host information */ 00062 #define DNS_RRTYPE_MINFO 14 /* mailbox or mail list information */ 00063 #define DNS_RRTYPE_MX 15 /* mail exchange */ 00064 #define DNS_RRTYPE_TXT 16 /* text strings */ 00065 00067 #define DNS_RRCLASS_IN 1 /* the Internet */ 00068 #define DNS_RRCLASS_CS 2 /* the CSNET class (Obsolete - used only for examples in some obsolete RFCs) */ 00069 #define DNS_RRCLASS_CH 3 /* the CHAOS class */ 00070 #define DNS_RRCLASS_HS 4 /* Hesiod [Dyer 87] */ 00071 #define DNS_RRCLASS_FLUSH 0x800 /* Flush bit */ 00072 00073 /* The size used for the next line is rather a hack, but it prevents including socket.h in all files 00074 that include memp.h, and that would possibly break portability (since socket.h defines some types 00075 and constants possibly already define by the OS). 00076 Calculation rule: 00077 sizeof(struct addrinfo) + sizeof(struct sockaddr_in) + DNS_MAX_NAME_LENGTH + 1 byte zero-termination */ 00078 #define NETDB_ELEM_SIZE (32 + 16 + DNS_MAX_NAME_LENGTH + 1) 00079 00080 #if DNS_LOCAL_HOSTLIST 00081 00082 struct local_hostlist_entry { 00084 const char *name; 00086 ip_addr_t addr; 00087 struct local_hostlist_entry *next; 00088 }; 00089 #if DNS_LOCAL_HOSTLIST_IS_DYNAMIC 00090 #ifndef DNS_LOCAL_HOSTLIST_MAX_NAMELEN 00091 #define DNS_LOCAL_HOSTLIST_MAX_NAMELEN DNS_MAX_NAME_LENGTH 00092 #endif 00093 #define LOCALHOSTLIST_ELEM_SIZE ((sizeof(struct local_hostlist_entry) + DNS_LOCAL_HOSTLIST_MAX_NAMELEN + 1)) 00094 #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ 00095 #endif /* DNS_LOCAL_HOSTLIST */ 00096 00104 typedef void (*dns_found_callback)(const char *name, ip_addr_t *ipaddr, void *callback_arg); 00105 00106 void dns_init(void); 00107 void dns_tmr(void); 00108 void dns_setserver(u8_t numdns, ip_addr_t *dnsserver); 00109 ip_addr_t dns_getserver(u8_t numdns); 00110 err_t dns_gethostbyname(const char *hostname, ip_addr_t *addr, 00111 dns_found_callback found, void *callback_arg); 00112 00113 #if DNS_LOCAL_HOSTLIST && DNS_LOCAL_HOSTLIST_IS_DYNAMIC 00114 int dns_local_removehost(const char *hostname, const ip_addr_t *addr); 00115 err_t dns_local_addhost(const char *hostname, const ip_addr_t *addr); 00116 #endif /* DNS_LOCAL_HOSTLIST && DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ 00117 00118 #ifdef __cplusplus 00119 } 00120 #endif 00121 00122 #endif /* LWIP_DNS */ 00123 00124 #endif /* __LWIP_DNS_H__ */ Generated on Sat May 26 2012 04:34:59 for ReactOS by
1.7.6.1
|