lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] netif->flags


From: John Kennedy
Subject: RE: [lwip-users] netif->flags
Date: Tue, 19 May 2009 07:59:53 -0600

Ok, thanks everyone this group is extremely responsive and I appreciate 
everyone's help.  Simon as always you are correct (albeit sometimes a bit 
terse) I did lump everything together.  From my overall perspective the goal is 
the same: get Ethernet working on my embedded system.  Not knowing much about 
Ethernet, I find it quite daunting to wade through all the ports, drivers, and 
Lwip code, moreover many of the embedded ports I've looked at have some obvious 
problems and I don't know a lot about Windows or Unix/Linux so those ports 
don't make a lot of sense to me.  I've spent a lot of time grepping around in 
the source code but that doesn't help much trying to understand the overall 
architecture of the code or it's intended usage.  Thanks again,
John


 
________________________________________
John Kennedy


Idaho Technology Inc.
390 Wakara Way
Salt Lake City, UT 84108, USA

USA: 1-800-735-6544
Bus:+1 (801)736-6354 x448
Fax:+1 (801)588-0507

http://www.idahotech.com/
-----Original Message-----
From: Simon Goldschmidt [mailto:address@hidden
Sent: Monday, May 18, 2009 11:39 PM
To: Mailing list for lwIP users
Subject: RE: [lwip-users] netif->flags


> Jeff,
> That makes sense to me, I was just a little puzzled by why Lwip doesn't
> set NETIF_FLAG_UP with the rest of the flags in low_level_init and why there
> is no comment or anything else I can find that indicates that it even needs
> to be set.  Hence my original question.

You're mixing responsibilities here: you have to separate between 'lwIP', 
'port' and 'netif driver'. lwIP cannot know when the netif is up! You *could* 
set it up in the driver by setting the flag in low_level_init (a function of 
that lwIP itself knows nothing!), but that would prevent the handling in 
netif_set_up.

Which brings us to the last, the 'port'. Have a look at the example ports in 
contrib (always a good idea with questions like this):
netif_add(&netif, addresses...)
netif_set_up(&netif)
netif_set_default(&netif) // only for the one and only default netif

> but it does not initialize the flag NETIF_FLAG_UP.

It does: it's off by default!

> I can’t find anywhere else in the code where this flag is set.

I'm guessing that question is answered by reading the code...?

Simon
--
Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss 
für nur 17,95 Euro/mtl.!* 
http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a


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

________________________________________
CONFIDENTIALITY NOTICE: This E-mail and any attachments are confidential 
information of the sender and are for the exclusive use of the intended 
recipient. If you are not the intended recipient, be aware that any disclosure, 
copying, distribution, or use of this E-mail or any attachment is prohibited. 
If you have received this E-mail in error, please notify us immediately by 
returning it to the sender and delete this copy from your system. Thank you for 
your cooperation.
 
 




reply via email to

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