SpecialProxy/dns.h

19 lines
392 B
C
Raw Normal View History

2017-07-12 12:29:56 +08:00
#ifndef DNS_H
#define DNS_H
#include "main.h"
struct dns {
char request[512]; //UDP<44><50>DNS<4E><53><EFBFBD>󲻳<EFBFBD>512<31>ֽ<EFBFBD>
uint16_t request_len, sent_len;
};
extern void dns_connect(struct sockaddr_in *dnsAddr);
extern struct dns dns_list[MAX_CONNECTION / 2];
extern int dnsFd;
extern int8_t build_dns_req(struct dns *dns, char *domain);
extern void read_dns_rsp();
extern void dns_query();
#endif