24 #include <sys/socket.h>
30 #define ANDNS_TIMEOUT 15
32 #define MAXNSSERVERS 3
33 #define DNS_REPLY_TIMEOUT 10
36 #define DNS_PORT_STR "53"
39 #define INET_REALM_PREFIX ".INT"
40 #define NTK_REALM_PREFIX ".NTK"
41 #define PTR_INET_REALM_PREFIX "INT."
42 #define PTR_NTK_REALM_PREFIX "NTK."
43 #define REALM_PREFIX_LEN 4
51 #define GET_NK_BIT(msg) (*((msg+3))>>4)&0x03
54 #define RCODE_EINTRPRT 1
55 #define RCODE_ESRVFAIL 2
56 #define RCODE_ENSDMN 3
57 #define RCODE_ENIMPL 4
84 char *
andns_rslv(
char *msg,
int msglen,
char *answer,
int *answ_len);
int dpanswtoapansw(dns_pkt *dp, andns_pkt *ap)
Definition: andns.c:496
int apqsttodpqst(andns_pkt *ap, dns_pkt **dpsrc)
Definition: andns.c:440
int collect_resolv_conf(char *resolve_conf)
Definition: andns.c:121
int qtype_a_to_d(andns_pkt *ap)
Definition: andns.c:424
int is_prefixed(dns_pkt *dp)
Definition: andns.c:412
void reset_andns_ns(void)
Definition: andns.c:159
int andns_init(int restricted, char *resolv_conf, int family)
Definition: andns.c:175
void andns_close(void)
Definition: andns.c:228
int nk_forward(andns_pkt *ap, char *msg, int msglen, char *answer)
Definition: andns.c:851
int type
Definition: krnl_route.c:49
dns_pkt * dpktcpy(dns_pkt *src, const char *prefix)
Definition: andns.c:304
int store_ns(char *ns)
Definition: andns.c:96
void dpktacpy(dns_pkt *dst, dns_pkt *src, const char *prefix)
Definition: andns.c:257
char * rm_realm_prefix(char *from, char *dst, int type)
Definition: andns.c:331
int andns_gethostbyname(char *hname, inet_prefix *ip)
Definition: andns.c:570
int dns_forward(dns_pkt *dp, char *msg, int msglen, char *answer)
Definition: andns.c:627
char * andns_rslv(char *msg, int msglen, char *answer, int *answ_len)
Definition: andns.c:910
int ns_general_send(char *msg, int msglen, char *answer, int anslen)
Definition: andns.c:236
int andns_realm(dns_pkt_qst *dpq, int *prefixed)
Definition: andns.c:369
int nk_rslv(andns_pkt *ap, char *msg, int msglen, char *answer)
Definition: andns.c:761
int inet_rslv(dns_pkt *dp, char *msg, int msglen, char *answer)
Definition: andns.c:694
int family
Definition: if.c:34
dns_pkt * dpktcpy_rm_pref(dns_pkt *src)
Definition: andns.c:357
Definition: andns_lib.h:64