www.beck-ipc.com

@CHIP-RTOS C Library - TCP/IP API


setNameServer

This function can be used to add a prioritised name server which will be queried before all other name servers. Normally the DNS resolver determines name server addresses automatically from network devices configured via DHCP or PPP. In addition you can specify two name servers in the CHIP.INI configuration file. Name servers found via DHCP have the lowest priotity. Next come name servers found via PPP, then the two configured in CHIP.INI. The name server added here has the highest priority. Note that calling this function a second time overwrites the name server address added first.

short setNameServer( int addressFamily,

void far *address );

Parameters

addressFamily

Address family, AF_INET for IPv4 or AF_INET6 for IPv6

address

Pointer to the IP address of the name server; should point to a structure of either type struct in_addr or struct in6_addr.

Return Value

Zero in case of success or negative error code

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to the RTOS API function DNS_SET_NAME_SERVER for more details.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    n/an/an/aV1.05V1.00

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.04

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document