guowenxue
2021-11-03 39c42b1d8352c7d96f0819fdd0e02b3964d75a7d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*********************************************************************************
 *      Copyright:  (C) 2018 LingYun IoT Studio
 *                  All rights reserved.
 *
 *       Filename:  dns_api.h
 *    Description:  This file is DNS client API based on UDP socket
 *                 
 *        Version:  1.0.0(10/29/2018)
 *         Author:  Guo Wenxue <guowenxue@gmail.com>
 *      ChangeLog:  1, Release initial version on "2018-10-28 01:38:08 PM"
 *                 
 ********************************************************************************/ 
 
#ifndef __DNS_API_
#define __DNS_API_
 
#define IPADDR_LEN        16
#define DNS_HEAD_MIN      12
#define DNS_TAIL_MIN      5
 
int query_dns(char *dns_server_ip, char *domain, char *ipaddr, int ipaddr_size);
 
#endif