update code
This commit is contained in:
10
dns_client.h
10
dns_client.h
@@ -7,7 +7,7 @@ typedef enum {
|
||||
DNS_SERVER_UDP,
|
||||
DNS_SERVER_TCP,
|
||||
DNS_SERVER_HTTP,
|
||||
DNS_SERVER_TYPE_END,
|
||||
DNS_SERVER_TYPE_END,
|
||||
} dns_server_type_t;
|
||||
|
||||
struct dns_result {
|
||||
@@ -18,9 +18,15 @@ struct dns_result {
|
||||
unsigned char addr_ipv6[16];
|
||||
};
|
||||
|
||||
typedef enum dns_result_type {
|
||||
DNS_QUERY_ERR,
|
||||
DNS_QUERY_RESULT = 1,
|
||||
DNS_QUERY_END,
|
||||
} dns_result_type;
|
||||
|
||||
int dns_client_init(void);
|
||||
|
||||
typedef int (*dns_client_callback)(char *domain, struct dns_result *result, void *user_ptr);
|
||||
typedef int (*dns_client_callback)(char *domain, dns_result_type rtype, struct dns_packet *packet, unsigned char *inpacket, int inpacket_len, void *user_ptr);
|
||||
|
||||
int dns_client_query(char *domain, int qtype, dns_client_callback callback, void *user_ptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user