DNSc_CfgServerByAddr

Configure DNS server that must be used by default using an address object.

Files

dns-c.h/dns-c.c

Prototype

void  DNSc_CfgServerByAddr (DNSc_ADDR_OBJ  *p_addr,
                            DNSc_ERR       *p_err);


Arguments

p_addr
Pointer to structure that contains the IP address of the DNS server.
p_err
Pointer to variable that will receive the return error code from this function.


Returned Values

None.

Required Configuration

None.

Notes / Warnings

None.

Example Usage

DNSc_ADDR  addr;
DNSc_ERR   err;
NET_ERR    net_err;
 
 
NetASCII_Str_to_IP("8.8.8.8", addr.Addr, sizeof(p_addr->Addr), &net_err);   
addr.Len = NET_IPv4_ADDR_SIZE;
 
DNSc_CfgServerByAddr(&addr, &err);