55 #include <sys/param.h> 56 #include <sys/types.h> 57 #include <sys/cdefs.h> 69 #define __RES 19960801 87 #define _PATH_RESCONF "/etc/resolv.conf" 90 typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
93 typedef res_sendhookact (*res_send_qhook)(
struct sockaddr_in *
const *ns,
100 typedef res_sendhookact (*res_send_rhook)(
const struct sockaddr_in *ns,
110 const char * humanname;
119 #define LOCALDOMAINPARTS 2 120 #define RES_TIMEOUT 5 121 #define MAXRESOLVSORT 10 122 #define RES_MAXNDOTS 15 131 #define nsaddr nsaddr_list[0] 133 char *dnsrch[MAXDNSRCH+1];
142 } sort_list[MAXRESOLVSORT];
151 #define RES_INIT 0x00000001 152 #define RES_DEBUG 0x00000002 153 #define RES_AAONLY 0x00000004 154 #define RES_USEVC 0x00000008 155 #define RES_PRIMARY 0x00000010 156 #define RES_IGNTC 0x00000020 157 #define RES_RECURSE 0x00000040 158 #define RES_DEFNAMES 0x00000080 159 #define RES_STAYOPEN 0x00000100 160 #define RES_DNSRCH 0x00000200 161 #define RES_INSECURE1 0x00000400 162 #define RES_INSECURE2 0x00000800 163 #define RES_NOALIASES 0x00001000 164 #define RES_USE_INET6 0x00002000 165 #define RES_NOTLDQUERY 0x00004000 167 #define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | \ 173 #define RES_PRF_STATS 0x00000001 174 #define RES_PRF_UPDATE 0x00000002 175 #define RES_PRF_CLASS 0x00000004 176 #define RES_PRF_CMD 0x00000008 177 #define RES_PRF_QUES 0x00000010 178 #define RES_PRF_ANS 0x00000020 179 #define RES_PRF_AUTH 0x00000040 180 #define RES_PRF_ADD 0x00000080 181 #define RES_PRF_HEAD1 0x00000100 182 #define RES_PRF_HEAD2 0x00000200 183 #define RES_PRF_TTLID 0x00000400 184 #define RES_PRF_HEADX 0x00000800 185 #define RES_PRF_QUERY 0x00001000 186 #define RES_PRF_REPLY 0x00002000 187 #define RES_PRF_INIT 0x00004000 190 #define fp_nquery __fp_nquery 191 #define fp_query __fp_query 192 #define hostalias __hostalias 193 #define p_query __p_query 194 #define res_close __res_close 195 #define res_init __res_init 196 #define res_isourserver __res_isourserver 197 #define res_mkquery __res_mkquery 198 #define res_query __res_query 199 #define res_querydomain __res_querydomain 200 #define res_search __res_search 201 #define res_send __res_send 204 void fp_nquery(
const u_char *,
int, FILE *);
205 void fp_query(
const u_char *, FILE *);
206 const char * hostalias(
const char *);
207 void p_query(
const u_char *);
208 void res_close(
void);
211 int res_mkquery(
int,
const char *,
int,
int,
const u_char *,
212 int,
const u_char *, u_char *,
int);
213 int res_query(
const char *,
int,
int, u_char *,
int);
214 int res_querydomain(
const char *,
const char *,
int,
int,
216 int res_search(
const char *,
int,
int, u_char *,
int);
217 int res_send(
const u_char *,
int, u_char *,
int);
223 extern const struct res_sym __p_class_syms[];
224 extern const struct res_sym __p_type_syms[];
227 #define b64_ntop __b64_ntop 228 #define b64_pton __b64_pton 229 #define dn_comp __dn_comp 230 #define dn_count_labels __dn_count_labels 231 #define dn_expand __dn_expand 232 #define dn_skipname __dn_skipname 233 #define fp_resstat __fp_resstat 234 #define loc_aton __loc_aton 235 #define loc_ntoa __loc_ntoa 236 #define p_cdname __p_cdname 237 #define p_cdnname __p_cdnname 238 #define fp_resstat __fp_resstat 239 #define p_class __p_class 240 #define p_fqname __p_fqname 241 #define p_fqnname __p_fqnname 242 #define p_option __p_option 243 #define p_secstodate __p_secstodate 244 #define p_section __p_section 245 #define p_time __p_time 246 #define p_type __p_type 247 #define putlong __putlong 248 #define putshort __putshort 249 #define res_dnok __res_dnok 250 #define res_hnok __res_hnok 251 #define res_mailok __res_mailok 252 #define res_nameinquery __res_nameinquery 253 #define res_ownok __res_ownok 254 #define res_queriesmatch __res_queriesmatch 255 #define res_randomid __res_randomid 256 #define sym_ntop __sym_ntop 257 #define sym_ntos __sym_ntos 258 #define sym_ston __sym_ston 259 #define res_send_setqhook __res_send_setqhook 260 #define res_send_setrhook __res_send_setrhook 261 #define res_mkupdate __res_mkupdate 262 #define res_mkupdrec __res_mkupdrec 263 #define res_freeupdrec __res_freeupdrec 266 int res_hnok(
const char *);
267 int res_ownok(
const char *);
268 int res_mailok(
const char *);
269 int res_dnok(
const char *);
270 int sym_ston(
const struct res_sym *,
const char *,
int *);
271 const char * sym_ntos(
const struct res_sym *,
int,
int *);
272 const char * sym_ntop(
const struct res_sym *,
int,
int *);
273 int b64_ntop(u_char
const *,
size_t,
char *,
size_t);
274 int b64_pton(
char const *, u_char *,
size_t);
275 int loc_aton(
const char *, u_char *);
276 const char * loc_ntoa(
const u_char *,
char *);
277 int dn_skipname(
const u_char *,
const u_char *);
279 void putlong(u_int32_t, u_char *);
280 void putshort(u_int16_t, u_char *);
281 const char * p_class(
int);
282 const char * p_time(u_int32_t);
283 const char * p_type(
int);
284 const u_char * p_cdnname(
const u_char *,
const u_char *,
int, FILE *);
285 const u_char * p_cdname(
const u_char *,
const u_char *, FILE *);
286 const u_char * p_fqnname(
const u_char *,
const u_char *,
int,
char *,
int);
287 const u_char * p_fqname(
const u_char *,
const u_char *, FILE *);
288 const char * p_option(u_long);
289 char * p_secstodate(u_long);
290 int dn_count_labels(
const char *);
291 int dn_comp(
const char *, u_char *,
int, u_char **, u_char **);
292 int dn_expand(
const u_char *,
const u_char *,
const u_char *,
294 u_int res_randomid(
void);
295 int res_nameinquery(
const char *,
int,
int,
const u_char *,
297 int res_queriesmatch(
const u_char *,
const u_char *,
298 const u_char *,
const u_char *);
299 const char * p_section(
int,
int);
300 void res_send_setqhook(res_send_qhook);
301 void res_send_setrhook(res_send_rhook);
304 #ifdef _ARPA_NAMESER_H_ 306 int res_mkupdate (
ns_updrec *, u_char *,
int);
307 ns_updrec * res_mkupdrec (
int,
const char *, u_int, u_int, u_long);
Definition: nameser.h:220