25#ifndef __TUYA_BASE_UNI_DNS_CACHE_H__
26#define __TUYA_BASE_UNI_DNS_CACHE_H__
28#include "tuya_iot_config.h"
29#include "tuya_cloud_types.h"
42#define MAX_DOMAIN_NAME_LEN 128
49#define DNS_PRIO_HTTP 0
50#define DNS_PRIO_SYSTEM 1
68OPERATE_RET
unw_gethostbyname(CONST CHAR_T *domain, IN CONST DNS_MODE_E mode, TUYA_IP_ADDR_T *ip);
80OPERATE_RET
unw_connect_to_domain(INT_T *sockfd, CHAR_T *hostname, UINT16_T port, UINT_T retry_cnt, UINT_T timeout);
DNS entry info
Definition: uni_network.h:56
Common process - Initialization
OPERATE_RET unw_clear_dns_cache(CONST CHAR_T *domain)
clear the specific domain dns cache
OPERATE_RET unm_set_dns_cache_priority(TY_DNS_PRIO_T dns_prio)
set the dns priority
OPERATE_RET unw_clear_all_dns_cache(VOID)
clean all dynamic dns cache
TY_DNS_PRIO_T unm_get_dns_cache_priority(VOID)
get the dns current priority
OPERATE_RET unw_add_dns_cache(CONST CHAR_T *domain, CONST TUYA_IP_ADDR_T ip)
add dns information to dynamic dns cache
OPERATE_RET unw_init_dns_cache(VOID)
init the dns module
VOID unm_lower_dns_cache_priority(VOID)
decrease the dns current priority
UINT_T TY_DNS_PRIO_T
DNS priority
Definition: uni_network.h:48
OPERATE_RET unw_connect_to_domain(INT_T *sockfd, CHAR_T *hostname, UINT16_T port, UINT_T retry_cnt, UINT_T timeout)
connect to a domain with specific tcp port
OPERATE_RET unw_gethostbyname(CONST CHAR_T *domain, IN CONST DNS_MODE_E mode, TUYA_IP_ADDR_T *ip)
get the domain ip address info by the domain name