[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] netif->flags
From: |
Simon Goldschmidt |
Subject: |
RE: [lwip-users] netif->flags |
Date: |
Tue, 19 May 2009 07:38:51 +0200 |
> 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] netif->flags, John Kennedy, 2009/05/18
- Re: [lwip-users] netif->flags, Simon Goldschmidt, 2009/05/18
- RE: [lwip-users] netif->flags, John Kennedy, 2009/05/18
- RE: [lwip-users] netif->flags, Bill Auerbach, 2009/05/18
- RE: [lwip-users] netif->flags, John Kennedy, 2009/05/18
- Re: [lwip-users] netif->flags, Jeff Barber, 2009/05/18
- RE: [lwip-users] netif->flags, John Kennedy, 2009/05/18
- RE: [lwip-users] netif->flags, Bill Auerbach, 2009/05/18
- Re: [lwip-users] netif->flags, Jeff Barber, 2009/05/18
- RE: [lwip-users] netif->flags,
Simon Goldschmidt <=
- RE: [lwip-users] netif->flags, John Kennedy, 2009/05/19
- Re: [lwip-users] netif->flags, address@hidden, 2009/05/19