tfNgDnsSetServer

Jump to: navigation, search

Table of Contents >> IPv6 Programmer's Reference


#include <trsocket.h>


int tfNgDnsSetServer (
struct sockaddr_storage * serverAddrPtr,
int serverNumber
);


Function Description

Sets the address of the primary and secondary DNS server. To set the primary DNS server serverNumber should be set to TM_DNS_PRI_SERVER or 0; for the secondary server it should be set to TM_DNS_SEC_SERVER or 1. For any other server, use the 0-based index of the server you wish to set. To remove a previously set entry, set serverAddrPtr to NULL.


Parameters

  • serverAddrPtr
    Pointer to the address of the IPv4 or IPv6 address of the specified DNS server.
  • serverNumber
    TM_DNS_PRI_SERVER, TM_DNS_SEC_SERVER, or any number 0 through TM_DNS_MAX_SERVERS - 1.


Returns

  • TM_EINVAL


Table of Contents >> IPv6 Programmer's Reference