[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] DNS for socket API
From: |
Mathias Zenger |
Subject: |
[lwip-users] DNS for socket API |
Date: |
Wed, 9 Sep 2009 10:42:56 +0200 |
Thank you for your valuable debugging assistance. I must admit that I made a
big mistake in using Wireshark (my switch didn't forward all packets): The
DNS requests have been sent out as expected all the time! Now I even can log
the replies from the DNS server (the server name was resolved to the
required IP successfully). So the situation has changed a lot! However, the
problem is that dns_recv() obviousely never gets called and therefore after
4 retries a timeout in dns_check_entry() occurs which at the end leads to
the ERR_VAL reply. Currently I try to find out what's going wrong here.
Basically I saw that the UDP PCB for reception was created successfully in
dns_init().
Please let me know if you have any idea what's still missing here. Thank you
so much!
Regards,
Mathias
-----Ursprüngliche Nachricht-----
Von: Kieran Mansley [mailto:address@hidden
Gesendet: Dienstag, 8. September 2009 16:46
An: address@hidden; Mailing list for lwIP users
Betreff: Re: WG: [lwip-users] DNS for socket API
On Tue, 2009-09-08 at 16:33 +0200, Mathias Zenger wrote:
> Thanks for your hint. I dug even deeper but still wasn't successful. At
the
> end I was able to break in
>
> do_dns_found(const char *name, struct ip_addr *ipaddr, void *arg)
>
> This method returns ERR_VAL (-8) which says "timeout or memory error" or
> "illegal value" or "dns server response was invalid" respectively
(depending
> on different method comments).
This means that the ipaddr argument was NULL, which in turn signifies an
error processing the DNS request. Look at where pEntry->found() is
called (that function pointer points to do_dns_found in this case) with
a NULL second argument in core/dns.c. This should explain what is going
wrong.
If you can get debug output then turning on the DNS_DEBUG log level
should show the reason as all the calls to pEntry->found() that use a
NULL second argument log the reason.
Kieran
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] DNS for socket API,
Mathias Zenger <=