[openbeosnetteam] Re: new if_flag IFF_CONNECTED

> Yes, but does not the stack only send packets to an interface if the 
> flags UP and RUNNING are set? 

If she does, she should not.
Only IFF_UP should be check before sending a packet to a interface.
According to a quick grep on stack sources, the stack only test against 
IFF_UP.
The IFF_RUNNING usage is up to the interface itself, the stack don't 
really care that much...

> The PPP interface must simulate a connection that is connected to the 
> stack to tell it that it may send data. 
> When ata is really sent the interface tries to connect.

Dial On Demand should (try to) open the interface when she's not 
IFF_RUNNING flagged.
After enought idle time, the interface should be closed and the 
IFF_RUNNING cleared to show it's not active link.

> How can the user know when an interface is connected if connected and 
> disconnected PPP dial-on-demand interfaces > have the same flags set? 
ifconfig would show the same for both and that is not good.

ifconfig show all interfaces, even the ones not IFF_UP'ed.
So, the IFF_RUNNING flag presence in front of a IFF_POINTTOPOINT flag 
would say: "up and connected".

-Philippe
 

--
Fortune Cookie Says:

The light at the end of the tunnel may be an oncoming dragon.

Other related posts: