[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 10:20:57 -0500 |
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. 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.
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.
Chuck
-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Kieran Mansley
Sent: Friday, August 14, 2009 9:15 AM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] DNS question
On Fri, 2009-08-14 at 08:31 -0500, Chuck Kuecker wrote:
> I have a need to know if a DNS resolution was successful. I have not
> found any means by which I can tell if a callback function from
> dns_gethostbyname() has been called by timeout, success, or failure.
You know if the dns resolution has completed because either:
- dns_gethostbyname() returns ERR_OK; or
- the callback function given to dns_gethostbyname() is called.
It sounds like you want to know after calling dns_gethostbyname()
whether or not the callback has been called yet. The way to solve this
would be to modify some state from the callback and you can then use
that state to tell if the callback has been called.
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 <=
- 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, 2009/08/14
- RE: [lwip-users] DNS question, Pettinato, Jim, 2009/08/14
- RE: [lwip-users] DNS question, Chuck Kuecker, 2009/08/14