lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] parameter for netif_add in UDP


From: Jonathan Larmour
Subject: Re: [lwip-users] parameter for netif_add in UDP
Date: Thu, 14 Feb 2008 13:39:42 +0000
User-agent: Thunderbird 1.5.0.12 (X11/20070530)

Ben Bobbitt wrote:
> Thanks for the quick response.  I'm a little confused by the driver comment,
> though.  What should I have to do in that regard?  

It will be part of the driver itself. If someone else gave you the driver,
then they probably did the right thing. Look at the driver source for the
existence of calls to functions such as etharp_ip_input(). If it's got
them, then that's fine and all I was referring to.

> The symptom that I am seeing (using wireshark to view the packets ) is that
> my system is sending out an ICMP reject (port unreachable) when the UDP
> packets reach him. This would seem to indicate some problem with the setup
> in regard to the UDP service.  
> 
> Here's what I am doing to set up the interface...
> My addresses at this point are all 0 because of using DHCP
> 
> sys_init();
>   mem_init();
>   memp_init();
>   pbuf_init();
>   netif_init();
>   ip_init();  
>   udp_init(); 
>   tcpip_init( prvEthernetConfigureInterface, NULL );

Strictly you should not call ip_init and udp_init directly - tcpip_init
does that. But this won't be the source of your problem as the current
implementation of those functions are ok to call multiple times.

> where in prvEthernetConfigureInterface:
> 
> netif_add(&MACB_if, &xIpAddr, &xNetMask, &xGateway, NULL, ethernetif_init,
> tcpip_input);
> netif_set_default(&MACB_if);
> dhcp_start(&MACB_if);
> 
> in my UDP task, I'm waiting while MACB_if.dhcp->state != DHCP_BOUND before
> calling netconn_new().   

So does DHCP succeed? Does it successfully send a packet? And receive one?

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
Visit us @ Embedded World 2008, Nürnberg, Germany, 26-28 Feb:Stand 11-336
------["Si fractum non sit, noli id reficere"]------       Opinions==mine




reply via email to

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