52#define MSGSIZE MTUSIZE
54#define MAXMSGSIZE 4096
55#define MAXSEGMENT 65535
58#define QUERY_MAXIPLEN 512
62#define DNS_C_IN "\0\1"
63#define DNS_C_ANY "\0\377"
66#define DNS_T_NS "\0\2"
67#define DNS_T_CNAME "\0\5"
68#define DNS_T_SOA "\0\6"
69#define DNS_T_PTR "\0\14"
70#define DNS_T_HINFO "\0\15"
71#define DNS_T_MX "\0\17"
72#define DNS_T_TXT "\0\20"
73#define DNS_T_RP "\0\21"
74#define DNS_T_SIG "\0\30"
75#define DNS_T_KEY "\0\31"
76#define DNS_T_AAAA "\0\34"
77#define DNS_T_SRV "\0\41"
78#define DNS_T_NAPTR "\0\43"
79#define DNS_T_CERT "\0\45"
80#define DNS_T_OPT "\0\51"
81#define DNS_T_DS "\0\53"
82#define DNS_T_SSHFP "\0\54"
83#define DNS_T_IPSECKEY "\0\55"
84#define DNS_T_RRSIG "\0\56"
85#define DNS_T_NSEC "\0\57"
86#define DNS_T_DNSKEY "\0\60"
87#define DNS_T_NSEC3 "\0\62"
88#define DNS_T_NSEC3PARAM "\0\63"
89#define DNS_T_TLSA "\0\64"
90#define DNS_T_HIP "\0\67"
91#define DNS_T_OPENPGPKEY "\0\75"
92#define DNS_T_SPF "\0\143"
93#define DNS_T_AXFR "\0\374"
94#define DNS_T_ANY "\0\377"
95#define DNS_T_CAA "\1\1"
97#define LOCALHOST "localhost"
98#define IP4_LOOPBACK "ip4-loopback"
99#define IP6_LOOPBACK "ip6-loopback"
135extern unsigned int dns_packet_copy(
const char *,
unsigned int,
unsigned int,
char *,
unsigned int);
136extern unsigned int dns_packet_getname(
const char *,
unsigned int,
unsigned int,
char **);
141 const char *,
const char [2],
const char [16]);
150extern int dns_resolve(
const char *,
const char [2]);
168#define DNS_NAME4_DOMAIN 32
182#define DNS_NAME6_DOMAIN (4*16+12)
void dns_transmit_free(struct dns_transmit *)
int dns_name6_domain(char[DNS_NAME6_DOMAIN], const char[16])
void dns_transmit_io(struct dns_transmit *, iopause_fd *, struct taia *)
int dns_ip4_qualify_rules(stralloc *, stralloc *, const stralloc *, const stralloc *)
void dns_sortip4(char *, unsigned int)
int serverwantstcp(const char *, unsigned int)
int dns_transmit_start6(struct dns_transmit *, const char[QUERY_MAXIPLEN], int, const char *, const char[2], const char[16], const uint32[QUERY_MAXNS])
int dns_transmit_start(struct dns_transmit *, const char[QUERY_MAXIPLEN], int, const char *, const char[2], const char[16])
void socketfree(struct dns_transmit *)
int randombind6(struct dns_transmit *)
unsigned int dns_packet_copy(const char *, unsigned int, unsigned int, char *, unsigned int)
int serverfailed(const char *, unsigned int)
int dns_ip4_packet(stralloc *, const char *, unsigned int)
int dns_ip4(stralloc *, stralloc *)
int dns_ip_qualify_rules(stralloc *, stralloc *, const stralloc *, const stralloc *)
void packetfree(struct dns_transmit *)
int dns_cname(stralloc *, stralloc *)
int dns_domain_equal(const char *, const char *)
int dns_cname_packet(stralloc *, const char *, unsigned int)
unsigned int dns_random(unsigned int)
int dns_domain_fromdot(char **, const char *, unsigned int)
int dns_name(stralloc *, const char[16])
int dns_domain_todot_cat(stralloc *, const char *)
int dns_ip_qualify(stralloc *, stralloc *, const stralloc *)
int dns_resolve(const char *, const char[2])
int firstudp(struct dns_transmit *)
int dns_domain_copy(char **, const char *)
int nexttcp(struct dns_transmit *)
void dns_sortip6(char *, unsigned int)
int dns_domain_suffix(const char *, const char *)
int dns_name_packet(stralloc *, const char *, unsigned int)
int firsttcp(struct dns_transmit *)
void dns_random_init(const char[128])
int dns_ip4_qualify(stralloc *, stralloc *, const stralloc *)
unsigned int dns_packet_skipname(const char *, unsigned int, unsigned int)
void dns_domain_free(char **)
unsigned int dns_domain_length(const char *)
int dns_txt_packet(stralloc *, const char *, unsigned int)
int dns_ip6_qualify_rules(stralloc *, stralloc *, const stralloc *, const stralloc *)
unsigned int dns_domain_suffixpos(const char *, const char *)
void queryfree(struct dns_transmit *)
int dns_resolvconfrewrite(stralloc *)
int dns_ip6(stralloc *, stralloc *)
int dns_mx_packet(stralloc *, const char *, unsigned int)
int dns_ip_qualify_localhost(stralloc *, stralloc *, const stralloc *)
int dns_name4_domain(char[DNS_NAME4_DOMAIN], const char[4])
int dns_ip6_qualify(stralloc *, stralloc *, const stralloc *)
unsigned int dns_packet_getname(const char *, unsigned int, unsigned int, char **)
int dns_mx(stralloc *, const stralloc *)
int dns_name6(stralloc *, const char[16])
int dns_txt(stralloc *, const stralloc *)
struct dns_transmit dns_resolve_tx
int dns_name4(stralloc *, const char[4])
int dns_resolvconfip(char[QUERY_MAXIPLEN], uint32[QUERY_MAXNS])
int randombind4(struct dns_transmit *)
int nextudp(struct dns_transmit *)
int dns_ip6_packet(stralloc *, const char *, unsigned int)
int getscopeid(const struct dns_transmit *, const char *)
int dns_transmit_get(struct dns_transmit *, const iopause_fd *, const struct taia *)