acl
3.5.3.0
|
类 | |
struct | ACL_RES |
宏定义 | |
#define | ACL_RES_ERR_SEND -100 |
#define | ACL_RES_ERR_READ -101 |
#define | ACL_RES_ERR_RTMO -102 |
#define | ACL_RES_ERR_NULL -103 |
#define | ACL_RES_ERR_CONN -104 |
#define | ACL_RES_USE_UDP 0 |
#define | ACL_RES_USE_TCP 1 |
类型定义 | |
typedef struct ACL_RES | ACL_RES |
函数 | |
ACL_API ACL_RES * | acl_res_new (const char *dns_ip, unsigned short dns_port) |
ACL_API void | acl_res_set_timeout (int conn_timeout, int rw_timeout) |
ACL_API void | acl_res_free (ACL_RES *res) |
ACL_API ACL_DNS_DB * | acl_res_lookup (ACL_RES *res, const char *domain) |
ACL_API const char * | acl_res_strerror (int errnum) |
ACL_API const char * | acl_res_errmsg (const ACL_RES *res) |
ACL_API const char* acl_res_errmsg | ( | const ACL_RES * | res | ) |
获得当前查询的错误信息
res | {ACL_RES*} DNS查询对象 |
ACL_API void acl_res_free | ( | ACL_RES * | res | ) |
释放一个DNS查询对象
res | {ACL_RES*} DNS查询对象 |
ACL_API ACL_DNS_DB* acl_res_lookup | ( | ACL_RES * | res, |
const char * | domain | ||
) |
查询某个域名的IP地址
res | {ACL_RES*} DNS查询对象 |
domain | {const char*} 要查询的域名 |
ACL_API ACL_RES* acl_res_new | ( | const char * | dns_ip, |
unsigned short | dns_port | ||
) |
创建一个DNS查询对象
dns_ip | {const char*} DNS的IP地址 |
dns_port | {unsigned short} DNS的Port |
ACL_API void acl_res_set_timeout | ( | int | conn_timeout, |
int | rw_timeout | ||
) |
设置DNS查询的超时时间
conn_timeout | {int} TCP 传输时的连接超时时间 |
rw_timeout | {int} TCP/UDP 传输的IO超时时间 |
ACL_API const char* acl_res_strerror | ( | int | errnum | ) |
根据错误号获得查询失败的原因
errnum | {int} 错误号 |