Optimize configuration, and add blacklist ip features
This commit is contained in:
@@ -16,10 +16,12 @@ typedef enum dns_result_type {
|
||||
DNS_QUERY_END,
|
||||
} dns_result_type;
|
||||
|
||||
#define DNSSERVER_FLAG_BLACKLIST_IP (0x1 << 0)
|
||||
|
||||
int dns_client_init(void);
|
||||
|
||||
/* query result notify function */
|
||||
typedef int (*dns_client_callback)(char *domain, dns_result_type rtype, struct dns_packet *packet, unsigned char *inpacket, int inpacket_len, void *user_ptr);
|
||||
typedef int (*dns_client_callback)(char *domain, dns_result_type rtype, unsigned int result_flag, struct dns_packet *packet, unsigned char *inpacket, int inpacket_len, void *user_ptr);
|
||||
|
||||
/* query domain */
|
||||
int dns_client_query(char *domain, int qtype, dns_client_callback callback, void *user_ptr);
|
||||
@@ -27,7 +29,7 @@ int dns_client_query(char *domain, int qtype, dns_client_callback callback, void
|
||||
void dns_client_exit(void);
|
||||
|
||||
/* add remote dns server */
|
||||
int dns_add_server(char *server_ip, int port, dns_server_type_t server_type);
|
||||
int dns_add_server(char *server_ip, int port, dns_server_type_t server_type, int result_flag);
|
||||
|
||||
/* remove remote dns server */
|
||||
int dns_remove_server(char *server_ip, int port, dns_server_type_t server_type);
|
||||
|
||||
Reference in New Issue
Block a user