> 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
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to