mirror of https://github.com/Chizi123/dnscomp.git

Joel Grunbaum
2022-06-01 be527d670c50d6bbac90aec41cd87366e16515e4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// DNS resource records
#define T_A 1     // IPv4 address
#define T_NS 2    // Name Server
#define T_CNAME 5 // Cannonical name
#define T_SOA 6   // State of Authority
#define T_PTR 12  // Domain name pointer
#define T_MX 15   // Mail exchange
#define T_TXT 16  // Text record
#define T_AAAA 28 // IPv6 address
 
int reachable(unsigned char* buf, char* dns_ip);
struct timespec resolve(unsigned char* buf, char* hostname, char* dns_ip,
                        int query_type);
void print_packet(unsigned char* buf);