.TH ARES_SET_NAMESERVERS 3 "12 Feb 2010" .SH NAME ares_set_nameservers - Set nameservers .SH SYNOPSIS .nf .B #include .PP .B int ares_set_nameservers(ares_channel \fIchannel\fP, struct ares_addr *\fIservers\fP, int \fInum_servers\fP) .PP .B cc file.c -lcares .fi .SH DESCRIPTION .PP This function sets nameservers for the given ares channel handle. The array .I servers contains the addresses of nameservers, the length of the array is stored in the .I num_servers parameter. Contrary to initializing nameservers with .B ares_init_options this function can be used to set IPv6 nameservers. The structure .I ares_addr contains the following fields: .sp .in +4n .nf struct ares_addr { int family; union { struct in_addr addr4; struct in6_addr addr6; } addr; }; .fi .in Two shortcuts for accessing members of the union .I addr are defined: .sp .in +4n .nf #define addrV4 addr.addr4 #define addrV6 addr.addr6 .fi .in .PP .SH RETURN VALUES .B ares_set_nameservers can return any of the following values: .TP 15 .B ARES_SUCCESS The response was successfully parsed. .TP 15 .B ARES_ENOMEM Memory was exhausted. .SH SEE ALSO .BR ares_init_options (3) .SH AUTHOR Written by Jakub Hrozek , on behalf of Red Hat, Inc http://www.redhat.com