Hello Kieran, I check for netif->output, and as you say, it is set to etherarp_output.
But I don't really understand why you say lwIP is failing to respond to the ARP query. If you means lwIP can't respond to ARP request from an another host on the net, you make a mistake. My application works successfuly in tcp mode. But as you say, I wonder if lwIP does manage correctly an ARP request from the host itself. I add some trace on lwIP, which give : ######################### TRACE BEGIN ###################### <LF><CR>-D- udpecho_thread - running... <LF><CR>-D- udpecho_thread - netconn_new <LF><CR>-D- udpecho_thread - bind <LF><CR>udp_bind(ipaddr = 0.0.0.0, port = 69) <LF>udp_bind: bound to 0.0.0.0, port 69 <LF>-D- udpecho_thread - recv <LF><CR>etharp_timeretharp_timeretharp_timeretharp_timeretharp_timer update_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>find_entry: found empty entry 0 <LF>find_entry: selecting empty entry 0 <LF>update_arp_entry: updating stable entry 0 <LF>etharp_arp_input: incoming ARP requestetharp_arp_input: ARP request was not for us.update_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>update_arp_entry: updating stable entry 0 <LF>etharp_arp_input: incoming ARP requestetharp_arp_input: ARP request was not for us.etharp_ip_input: updating ETHARP table.update_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>update_arp_entry: updating stable entry 0 <LF>ip_input: iphdr->dest 0x96142685 netif->ip_addr 0x96142685 (0x2685, 0x2685, 0x96140000) <LF>ip_input: packet accepted on interface em <LF>ip_input: IP header:+-------------------------------+| 4 | 5 | 0x00 | 35 | (v, hl, tos, len) <LF>+-------------------------------+| 20388 |010| 0 | (id, flags, offset) <LF>+-------------------------------+| 64 | 17 | 0xb811 | (ttl, proto, chksum) <LF>+-------------------------------+| 133 | 38 | 20 | 50 | (src) <LF>+-------------------------------+| 133 | 38 | 20 | 150 | (dest) <LF>+-------------------------------+ip_input: p->len 35 p->tot_len 35 <LF>udp_input: received datagram of length 15 <LF>UDP header:+-------------------------------+| 41486 | 69 | (src port, dest port) <LF>+-------------------------------+| 15 | 0xea21 | (len, chksum) <LF>+-------------------------------+udp (133.38.20.150, 69) <-- (133.38.20.50, 41486) <LF>pcb (0.0.0.0, 69) --- (0.0.0.0, 0) <LF>udp_input: calculating checksum-D- udpecho_thread - fromaddr <LF><CR>-D- udpecho_thread - fromport <LF><CR>-D- udpecho_thread - connect <LF><CR>udp_connect: connected to 133.38.20.50,port 41486 <LF>-D- udpecho_thread - copy <LF><CR>-D- udpecho_thread - delimiter <LF><CR>-D- udpecho_thread - send <LF><CR>udp_sendudp_send: added header in given pbuf 215bf0 <LF>udp_send: sending datagram of length 15 <LF>udp_send: UDP packet length 15 <LF>udp_send: UDP checksum 0x21ea <LF>udp_send: ip_output_if (,,,,IP_PROTO_UDP,)ip_output_if: em0 <LF>IP header:+-------------------------------+| 4 | 5 | 0x00 | 35 | (v, hl, tos, len) <LF>+-------------------------------+| 0 |000| 0 | (id, flags, offset) <LF>+-------------------------------+| 64 | 17 | 0x47b6 | (ttl, proto, chksum) <LF>+-------------------------------+| 133 | 38 | 20 | 150 | (src) <LF>+-------------------------------+| 133 | 38 | 20 | 50 | (dest) <LF>+-------------------------------+netif->output()find_entry: found empty entry 1 <LF>find_entry: selecting empty entry 1 <LF>etharp_request: sending ARP request.etharp_raw: sending raw ARP packet.etharp_query: queued packet 215bf0 on ARP entry 1 <LF>-D- udpecho_thread - get clonck <LF> <LF><CR>-D- udpecho_thread - delete <LF><CR>-D- udpecho_thread - recv <LF><CR>update_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>find_entry: found matching stable entry 0 <LF>update_arp_entry: updating stable entry 0 <LF>etharp_arp_input: incoming ARP requestetharp_arp_input: ARP request was not for us.update_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>update_arp_entry: updating stable entry 0 <LF>etharp_arp_input: incoming ARP requestetharp_arp_input: ARP request was not for us.update_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>update_arp_entry: updating stable entry 0 <LF>etharp_arp_input: incoming ARP requestetharp_arp_input: ARP request was not for us.etharp_timerupdate_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>update_arp_entry: updating stable entry 0 <LF>etharp_arp_input: incoming ARP requestetharp_arp_input: ARP request was not for us.etharp_timeretharp_timer: expired pending entry 1. <LF>etharp_timer: freeing entry 1, packet queue 214ee0. <LF>etharp_timerupdate_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>update_arp_entry: updating stable entry 0 <LF>etharp_arp_input: incoming ARP requestetharp_arp_input: ARP request was not for us.update_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>update_arp_entry: updating stable entry 0 <LF>etharp_arp_input: incoming ARP requestetharp_arp_input: ARP request was not for us.update_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>update_arp_entry: updating stable entry 0 <LF>etharp_arp_input: incoming ARP requestetharp_arp_input: ARP request was not for us.etharp_timerupdate_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>update_arp_entry: updating stable entry 0 <LF>etharp_arp_input: incoming ARP requestetharp_arp_input: ARP request was not for us.update_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>update_arp_entry: updating stable entry 0 <LF>etharp_arp_input: incoming ARP requestetharp_arp_input: ARP request was not for us.update_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>update_arp_entry: updating stable entry 0 <LF>etharp_arp_input: incoming ARP requestetharp_arp_input: ARP request was not for us.update_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>update_arp_entry: updating stable entry 0 <LF>etharp_arp_input: incoming ARP requestetharp_arp_input: ARP request was not for us.update_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>update_arp_entry: updating stable entry 0 <LF>etharp_arp_input: incoming ARP requestetharp_arp_input: ARP request was not for us.etharp_timerupdate_arp_entry()update_arp_entry: 133.38.20.50 - 00:1e:4f:d1:2c:d5 <LF>update_arp_entry: updating stable entry 0 ######################### TRACE END ###################### I dont find anything which seems wrong to me. A packet is send by the arp request. But I wonder why the ARP request I see on the wireshark log is from 133.38.20.150 to 133.38.20.150 as in the ip header the destination is set to 133.38.20.50 Is this what it is expected ? Thank for your help. Patrick 2009/6/26 Kieran Mansley <[email protected]> > On Fri, 2009-06-26 at 11:11 +0200, patrick Deflandre wrote: > > > <LF>udp_send: ip_output_if (,,,,IP_PROTO_UDP,)ip_output_if: em0 > > <LF>IP header:+-------------------------------+| 4 | 5 | 0x00 | > > 33 | (v, hl, tos, len) > > <LF>+-------------------------------+| 0 |000| 0 | > > (id, flags, offset) > > <LF>+-------------------------------+| 64 | 17 | 0x47b8 | > > (ttl, proto, chksum) > > <LF>+-------------------------------+| 133 | 38 | 20 | 150 | > > (src) > > <LF>+-------------------------------+| 133 | 38 | 20 | 50 | > > (dest) > > <LF>+-------------------------------+netif->output() > > It looks like the packet is getting a good way through the stack - as > far as the netif->output() call, so it's done all the UDP and IP parts > without any problem. I'm not sure what this function pointer will be > set to in your project, but typically this will be something like > etherarp_output(). I would debug what is going on there. As lwIP is > also failing to respond to the ARP query, I suspect there might be a > problem with ARP. If not that, then you're into your driver. > > Kieran > > > > _______________________________________________ > lwip-users mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/lwip-users >
_______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
