[openbeosnetteam] new if_flag IFF_CONNECTED

Hi,
the pppdial app is finished and the PPPoE module should be working in the next 
few days.
I want that PPP connections are:
1) created by pppdial
and
2) destroyed and queried by ifconfig

As PPP supports dial-on-demand there has to be a flag so that the user knows 
(when he enters ifconfig -a) which PPP interfaces are really connected and 
which of them are only pretending to the stack that they are connected.
For this I added a new flag IFF_CONNECTED that is only valid if IFF_POINTOPOINT 
is also set. For IFF_POINTOPOINT ifconfig prints either "CONNECTED" or 
"DISCONNECTED", depending on the value of the IFF_CONNECTED flag.

----------------------
Disconnecting dial-on-demand interfaces needs two steps. Say, ppp0 is a 
connected dod interface:
ifconfig -a
ppp0: flags: <CONNECTED, UP, RUNNING, POINTOPOINT>

"ifconfig down ppp0" will bring the interface down:
ppp0: flags: <DISCONNECTED, UP, RUNNING, POINTOPOINT>

Calling "ifconfig down ppp0" will delete the interface (as it is disconnected).
----------------------

I tried to find a better way by reusing the LINK0 flag for IFT_PPP (it is only 
used by IFT_SLIP, is it not?), but I could not find out how to retrieve the 
if_type and how to integrate that into ifconfig (hard to read). If you think 
this is better, could you please help me?
BTW, I fixed a bug (not commited) in ifconfig: the flags were not printed 
correctly.

Waldemar

Other related posts: