lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] A question about dns_init


From: Simon Goldschmidt
Subject: Re: [lwip-users] A question about dns_init
Date: Mon, 17 Oct 2011 10:22:28 +0200

Having a quick look at dns.c (from v1.3.2), ERR_VAL is return if you pass 
invalid arguments to dns_gethostbyname:

if ((dns_pcb == NULL) || (addr == NULL) ||
    (!hostname) || (!hostname[0]) ||
    (strlen(hostname) >= DNS_MAX_NAME_LENGTH)) {
  return ERR_VAL;
}

This means wither DNS is not initialized, you did not pass an 'addr' pointer or 
you did not pass a correct 'hostname' (NULL or empty or too long).

Simon



"Hervé DANIEL" <address@hidden> wrote:
> Hi,
> 
> netconn_gethostbyname returns the error.
> 
> I found that I call two time dns_init (alwready call with tcpip_init  
> before)
> But it change nothing.
> 
> -- 
> herve.
> 
> 
> Le Sat, 15 Oct 2011 21:06:23 +0200, Kieran Mansley <address@hidden> a  
> écrit:
> 
> >
> > On 14 Oct 2011, at 17:39, Hervé DANIEL wrote:
> >
> >>
> >> Hi,
> >>
> >> I'm tring to use   netconn_gethostbyname  (LWIP1.3.2)
> >>
> >> I've made a basic program with this code
> >>
> >>  dns_init();
> >>  err=netconn_gethostbyname("www.google.com", &Addr);
> >>
> >> and i get the adress. (what a beautifull world)
> >>
> >> then i copy paste to my real program (it s a web server) and i get an  
> >> error
> >> err =  -8  : ERR_VAL
> >
> > What function is it that returns the error?
> >
> > Kieran
> > _______________________________________________
> > lwip-users mailing list
> > address@hidden
> > https://lists.nongnu.org/mailman/listinfo/lwip-users
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users

-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!               
Jetzt informieren: http://www.gmx.net/de/go/freephone



reply via email to

[Prev in Thread] Current Thread [Next in Thread]