[En-Nut-Discussion] Addition to resolve.c

Michel Hendriks michel at stream-it.nl
Thu Nov 17 16:23:57 CET 2005


Hi,
 
I would like to request that the following be added to files pro/resolve.c
and include/netdb.h:
 
extern void NutGetDnsServers(u_long *pdnsip, u_long *sdnsip);

/*!
 * \brief Gets DNS primary and secondary servers.
 *
 * \param pdnsip IP address of the primary DNS server.
 * \param sdnsip IP address of the secondary DNS server.
 */
void NutGetDnsServers(u_long *pdnsip, u_long *sdnsip)
{
    *pdnsip = doc.doc_ip1;
    *sdnsip = doc.doc_ip2;
}
 
I need this function so that in my application I can see if any DNS servers
have been set by DHCP.
This enables me to use the users' preset DNS servers if none are set by the
DHCP server....(don't ask.......users and their networks......)
 
An alternative would be to make the variable 'doc' public but that would be
kinda ugly :-)
 
Greetings,
Michel



More information about the En-Nut-Discussion mailing list