[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] DNS question
From: |
Chuck Kuecker |
Subject: |
RE: [lwip-users] DNS question |
Date: |
Fri, 14 Aug 2009 11:09:12 -0500 |
Does it help to mention that I am using the TI/Luminary Stellaris
library version of LWIP? They don't mention an LWIP revision, just an
overall library revision of 2942.
Chuck
-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Kieran Mansley
Sent: Friday, August 14, 2009 10:41 AM
To: Mailing list for lwIP users
Subject: RE: [lwip-users] DNS question
On Fri, 2009-08-14 at 10:20 -0500, Chuck Kuecker wrote:
> Hi, Kieran,
>
> My impression was that dns_gethostbyname() would return ERR_OK if it
did
> not encounter anything fatal, but would actually set up the DNS query
> for transmission in the background, so that dns_gethostbyname()
returns
> immediately, and would only have good information if the resolution
was
> already in the DNS tables.
Take a look at the source. If it already knows the answer it fills it
in and returns ERR_OK. Otherwise it will work asynchronously and call
the specified callback when it knows the answer (or error, or timeout).
> Since I am booting the processor every time I
> need to resolve DNS, I can't expect a previously resolved IP to be in
> memory.
So then it will always work asynchronously.
> The callback always gets called sometime after dns_gethostbyname() is
> called. I use the argument parameter to let me know which URL I have
> been working with. In case of a DNS failure, I need to abort further
> processing.
So if you get an error in your callback set some global state that you
check before doing any processing, and abort the further processing if
that state is set.
Kieran
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users
- [lwip-users] DNS question, Chuck Kuecker, 2009/08/14
- Re: [lwip-users] DNS question, Kieran Mansley, 2009/08/14
- RE: [lwip-users] DNS question, Chuck Kuecker, 2009/08/14
- RE: [lwip-users] DNS question, Kieran Mansley, 2009/08/14
- RE: [lwip-users] DNS question, Chuck Kuecker, 2009/08/14
- RE: [lwip-users] DNS question,
Chuck Kuecker <=
- RE: [lwip-users] DNS question, Pettinato, Jim, 2009/08/14
- RE: [lwip-users] DNS question, Chuck Kuecker, 2009/08/14