server_group: fix server group not working issue.

This commit is contained in:
Nick Peng
2022-08-11 00:57:09 +08:00
parent c156595f61
commit 2848aa0ac7
6 changed files with 139 additions and 54 deletions

View File

@@ -21,11 +21,20 @@
#include "dns.h"
#include <stdint.h>
#include "dns_client.h"
#ifdef __cpluscplus
extern "C" {
#endif
struct dns_server_query_option {
uint32_t server_flags;
const char *dns_group_name;
unsigned long ecs_enable_flag;
struct dns_opt_ecs ecs_dns;
struct dns_query_ecs_ip ecs_ip;
};
int dns_server_init(void);
int dns_server_run(void);
@@ -41,7 +50,8 @@ typedef int (*dns_result_callback)(const char *domain, dns_rtcode_t rtcode, dns_
unsigned int ping_time, void *user_ptr);
/* query domain */
int dns_server_query(const char *domain, int qtype, uint32_t server_flags, dns_result_callback callback, void *user_ptr);
int dns_server_query(const char *domain, int qtype, struct dns_server_query_option *server_query_option,
dns_result_callback callback, void *user_ptr);
#ifdef __cpluscplus
}