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: Hervé DANIEL
Subject: Re: [lwip-users] A question about dns_init
Date: Tue, 18 Oct 2011 11:34:10 +0200
User-agent: Opera Mail/11.51 (Win32)

Hi,

I found the problem.
I use DHCP too, and it take times to established properly  the connection.
Just need to found the way to solve it.

Thx all for your help.



Le Mon, 17 Oct 2011 18:53:09 +0200, address@hidden <address@hidden> a écrit:

Oh, right. Sorry, I was thinking you used the raw API... Anyway, it seems the request just times out. You might want to a) use wireshark to see if requests are sent on the wire at all and if responses arrive (wireshark decodes DNS packets pretty good, so you can also have a rough look if the packets are correct there b) analyse the timing (i.e. with DNS_MAX_RETRIES set to its default value of 4, does netconn_gethostbyname() need about 4 seconds with one DNS server configured? - if not, the request might "time out" before the response arrives)

Simon


Hervé DANIEL wrote:
Hi,
I check args they are correct.
If I put breaks points at each "return ERR_VAL"
the program break there:

static void
do_dns_found(const char *name, struct ip_addr *ipaddr, void *arg)
{
    struct dns_api_msg *msg = (struct dns_api_msg*)arg;

LWIP_ASSERT("DNS response for wrong host name", strcmp(msg->name, name)
== 0);

    if (ipaddr == NULL) {
      /* timeout or memory error */
      *msg->err = ERR_VAL;
//<<<<<<<<<   HERE
    } else {
      /* address was resolved */
      *msg->err = ERR_OK;
      *msg->addr = *ipaddr;
    }
    /* wake up the application task waiting in netconn_gethostbyname */
    sys_sem_signal(msg->sem);
}

In the trace we can see "dns_check_entry: "www.google.com": timeout"



_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users



--
herve.



reply via email to

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