Changeset 183 for trunk/src/emx/include/resolv.h
- Timestamp:
- May 19, 2003, 4:41:00 AM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/resolv.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r182 r183 1 1 /* Modified for EMX by hv 1994,1996 2 * Modified for gcc by bird 2003 2 3 * 3 4 * Copyright (c) 1983, 1987, 1989 The Regents of the University of California. … … 33 34 * 34 35 * from: @(#)resolv.h 5.15 (Berkeley) 4/3/91 35 * resolv.h,v 1. 1 2003/04/16 15:53:07bird Exp36 * resolv.h,v 1.2 2003/05/19 02:41:00 bird Exp 36 37 */ 37 38 … … 39 40 #define _RESOLV_H_ 40 41 42 41 43 #if defined (__cplusplus) 42 44 extern "C" { 43 45 #endif 44 46 45 #pragma pack(4) 47 /* toolkit includes a bunch of headers */ 48 #ifndef TCPV40HDRS 49 #include <sys/param.h> 50 #include <types.h> 51 #include <sys/cdefs.h> 52 #include <stdio.h> 53 54 55 /* 56 * Revision information. This is the release date in YYYYMMDD format. 57 * It can change every day so the right thing to do with it is use it 58 * in preprocessor commands such as "#if (__RES > 19931104)". Do not 59 * compare for equality; rather, use it to determine whether your resolver 60 * is new enough to contain a certain feature. 61 */ 62 63 #define __RES 19960801 46 64 47 65 /* … … 52 70 53 71 #ifndef _PATH_RESCONF 54 #define _PATH_RESCONF "/tcpip/etc/resolv.conf" 55 #endif 72 #define _PATH_RESCONF "/mptn/etc/resolv.conf" 73 #endif 74 #endif /* TCPV40HDRS */ 56 75 57 76 /* … … 60 79 #define MAXNS 3 /* max # name servers we'll track */ 61 80 #define MAXDFLSRCH 3 /* # default domain levels to try */ 81 #define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */ 82 #define RES_TIMEOUT 4 /* min. seconds between retries */ 83 #ifdef TCPV40HDRS 84 #define MAXDNSRCH 3 /* max # domains in search path */ 85 #else 62 86 #define MAXDNSRCH 6 /* max # domains in search path */ 63 #define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */ 64 #define MAXDNSLUS 4 /* max # of host lookup types */ 65 66 #define RES_TIMEOUT 5 /* min. seconds between retries */ 87 #define MAXRESOLVSORT 10 /* number of net to sort on */ 88 #define RES_MAXNDOTS 15 /* should reflect bit field size */ 89 #endif 90 91 92 #ifdef TCPV40HDRS 67 93 68 94 #pragma pack(4) … … 77 103 char defdname[MAXDNAME]; /* default domain */ 78 104 char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */ 79 /* char lookups[MAXDNSLUS];*/ /* not in OS/2 */80 105 }; 81 #pragma pack(1) 106 #pragma pack() 107 108 #else 109 110 #pragma pack(4) 111 struct __res_state { 112 int retrans; /* retransmition time interval */ 113 int retry; /* number of times to retransmit */ 114 u_long options; /* option flags - see below. */ 115 int nscount; /* number of name servers */ 116 struct sockaddr_in 117 nsaddr_list[MAXNS]; /* address of name server */ 118 #define nsaddr nsaddr_list[0] /* for backward compatibility */ 119 u_short id; /* current message id */ 120 char defdname[256]; /* default domain (deprecated) */ 121 char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */ 122 u_long pfcode; /* RES_PRF_ flags - see below. */ 123 unsigned ndots:4; /* threshold for initial abs. query */ 124 unsigned nsort:4; /* number of elements in sort_list[] */ 125 char unused[3]; 126 struct { 127 struct in_addr addr; 128 u_int32_t mask; 129 } sort_list[MAXRESOLVSORT]; 130 char pad[72]; /* on an i386 this means 512b total */ 131 }; 132 #pragma pack() 133 134 #endif 82 135 83 136 /* … … 94 147 #define RES_STAYOPEN 0x0100 /* Keep TCP socket open */ 95 148 #define RES_DNSRCH 0x0200 /* search up local domain tree */ 149 #ifndef TCPV40HDRS 150 #define RES_INSECURE1 0x00000400 /* type 1 security disabled */ 151 #define RES_INSECURE2 0x00000800 /* type 2 security disabled */ 152 #define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */ 153 #define RES_USE_INET6 0x00002000 /* use/map IPv6 in gethostbyname() */ 154 #endif 96 155 97 156 #define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH) 98 157 158 159 160 #ifdef TCPV40HDRS 161 99 162 extern struct state _res; 100 163 164 #else 165 166 /* 167 * Resolver "pfcode" values. Used by dig. 168 */ 169 #define RES_PRF_STATS 0x00000001 170 /* 0x00000002 */ 171 #define RES_PRF_CLASS 0x00000004 172 #define RES_PRF_CMD 0x00000008 173 #define RES_PRF_QUES 0x00000010 174 #define RES_PRF_ANS 0x00000020 175 #define RES_PRF_AUTH 0x00000040 176 #define RES_PRF_ADD 0x00000080 177 #define RES_PRF_HEAD1 0x00000100 178 #define RES_PRF_HEAD2 0x00000200 179 #define RES_PRF_TTLID 0x00000400 180 #define RES_PRF_HEADX 0x00000800 181 #define RES_PRF_QUERY 0x00001000 182 #define RES_PRF_REPLY 0x00002000 183 #define RES_PRF_INIT 0x00004000 184 /* 0x00008000 */ 185 186 /* hooks are still experimental as of 4.9.2 */ 187 typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error } 188 res_sendhookact; 189 190 typedef res_sendhookact (* _System res_send_qhook)(struct sockaddr_in * const *ns, 191 const u_char **query, 192 int *querylen, 193 u_char *ans, 194 int anssiz, 195 int *resplen); 196 197 typedef res_sendhookact (* _System res_send_rhook)(const struct sockaddr_in *ns, 198 const u_char *query, 199 int querylen, 200 u_char *ans, 201 int anssiz, 202 int *resplen); 203 204 #pragma pack(4) 205 struct res_sym { 206 int number; /* Identifying number, like T_MX */ 207 char * name; /* Its symbolic name, like "MX" */ 208 char * humanname; /* Its fun name, like "mail exchanger" */ 209 }; 210 #pragma pack() 211 212 extern struct __res_state _ress[2]; 213 extern const struct res_sym __p_class_syms[]; 214 extern const struct res_sym __p_type_syms[]; 215 #define _res (_ress[0]) 216 101 217 /* Private routines shared between libc/net, named, nslookup and others. */ 102 int dn_skipname (__const__ u_char *, __const__ u_char *); 103 void putlong (u_long, u_char *); 104 void putshort (u_short, u_char *); 105 106 /* public routines */ 107 int dn_comp(__const__ u_char *, u_char *, int, u_char **, u_char **); 108 int dn_expand(__const__ u_char *, __const__ u_char *, __const__ u_char *, 109 u_char *, int); 110 int res_init(void); 111 int res_mkquery(int, __const__ char *, int, int, __const__ char *, int, 112 __const__ struct rrec *, char *, int); 113 int res_send(__const__ char *, int, char *, int); 218 #define res_hnok __res_hnok 219 #define res_ownok __res_ownok 220 #define res_mailok __res_mailok 221 #define res_dnok __res_dnok 222 #define sym_ston __sym_ston 223 #define sym_ntos __sym_ntos 224 #define sym_ntop __sym_ntop 225 #define b64_ntop __b64_ntop 226 #define b64_pton __b64_pton 227 #define loc_ntoa __loc_ntoa 228 #define loc_aton __loc_aton 229 #define dn_skipname __dn_skipname 230 #define fp_resstat __fp_resstat 231 #define fp_query __fp_query 232 #define fp_nquery __fp_nquery 233 #define hostalias __hostalias 234 #define putlong __putlong 235 #define putshort __putshort 236 #define p_class __p_class 237 #define p_time __p_time 238 #define p_type __p_type 239 #define p_query __p_query 240 #define p_cdnname __p_cdnname 241 #define p_cdname __p_cdname 242 #define p_fqnname __p_fqnname 243 #define p_fqname __p_fqname 244 #define p_rr __p_rr 245 #define p_option __p_option 246 #define p_secstodate __p_secstodate 247 #define dn_count_labels __dn_count_labels 248 #define dn_comp __dn_comp 249 #define dn_expand __dn_expand 250 #define res_init __res_init 251 #define res_randomid __res_randomid 252 #define res_query __res_query 253 #define res_search __res_search 254 #define res_querydomain __res_querydomain 255 #define res_mkquery __res_mkquery 256 #define res_send __res_send 257 #define res_isourserver __res_isourserver 258 #define res_nameinquery __res_nameinquery 259 #define res_queriesmatch __res_queriesmatch 260 #define res_close __res_close 261 262 int _System res_hnok(const char *); 263 int _System res_ownok(const char *); 264 int _System res_mailok(const char *); 265 int _System res_dnok(const char *); 266 int _System sym_ston(const struct res_sym *, char *, int *); 267 const char * _System sym_ntos(const struct res_sym *, int, int *); 268 const char * _System sym_ntop(const struct res_sym *, int, int *); 269 int _System b64_ntop(u_char const *, size_t, char *, size_t); 270 int _System b64_pton(char const *, u_char *, size_t); 271 int _System loc_aton(const char *, u_char *); 272 const char * _System loc_ntoa(const u_char *, char *); 273 int _System dn_skipname(const u_char *, const u_char *); 274 void _System fp_resstat(struct __res_state *, int); 275 void _System fp_query(const u_char *, int); 276 void _System fp_nquery(const u_char *, int, int); 277 const char * _System hostalias(const char *); 278 void _System putlong(u_int32_t, u_char *); 279 void _System putshort(u_int16_t, u_char *); 280 const char * _System p_class(int); 281 const char * _System p_time(u_int32_t); 282 const char * _System p_type(int); 283 void _System p_query(const u_char *); 284 const u_char * _System p_cdnname(const u_char *, const u_char *, int, int); 285 const u_char * _System p_cdname(const u_char *, const u_char *, int); 286 const u_char * _System p_fqnname(const u_char *cp, const u_char *msg, 287 int, char *, int); 288 const u_char * _System p_fqname(const u_char *, const u_char *, int); 289 const u_char * _System p_rr(const u_char *, const u_char *, int); 290 const char * _System p_option(u_long option); 291 char * _System p_secstodate(u_long); 292 int _System dn_count_labels(char *); 293 int _System dn_comp(const char *, u_char *, int, 294 u_char **, u_char **); 295 int _System dn_expand(const u_char *, const u_char *, const u_char *, 296 char *, int); 297 int _System res_init(void); 298 u_int _System res_randomid(void); 299 int _System res_query(const char *, int, int, u_char *, int); 300 int _System res_search(const char *, int, int, u_char *, int); 301 int _System res_querydomain(const char *, const char *, int, int, u_char *, int); 302 int _System res_mkquery(int, const char *, int, int, const u_char *, int, 303 const u_char *, u_char *, int); 304 int _System res_send(const u_char *, int, u_char *, int); 305 int _System res_isourserver(const struct sockaddr_in *); 306 int _System res_nameinquery(const char *, int, int, 307 const u_char *, const u_char *); 308 int _System res_queriesmatch(const u_char *, const u_char *, 309 const u_char *, const u_char *); 310 void _System res_close(void); 311 int _System dn_find(u_char *exp_dn, u_char *msg, 312 u_char **dnptrs, u_char **lastdnptr); 313 #endif /* !TCPV40HDRS */ 314 114 315 115 316 #if defined (__cplusplus) -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.