[openbeosnetteam] Re: PPP homepage

> > Evil!!! :)
> > Where do we get the environment pointer from?
> 
> From bash: /bin/sh -c our_userland_dialup_app?
> Otherwise, I agree, we got an big issue here...

For PPP it should not be a too big problem because it does not depend on any 
environment variables.

> Anyway, I did try and it seems it works fine, except for some 
> environment variables that are not set, starting with $HOME :-(

Very cool! Away with the net_server code! The kernel module does everything! 
Super flippin cool! :))

> Here a quick hack to test using load_image() from kernel land:
> http://philippe.houdoin.free.fr/phil/beos/openbeos/kload_image.zip
> 
> It's a very thin driver, Install & Run script is included, just compile 
> and run the script.
> I try direct app argument or via /bin/sh -c, no huge difference, excet 
> maybe on environment side.
> Tweak the very simple driver.c code to test with different app to 
> launch...

I will try to make an app that prevents PPP interfaces with a special name 
("test") to connect while others are allowed to do. Let's see if it works.

> I may look after some private api about environment variables settings 
> in BeOS kernel, maybe is just hidden there in front of me/us.

Axel? Can you help us? Actually... see next answer.

> For OBOS kernel, no issue, 'cause like Axel said, we will make it do 
> what we want :-)

Axel is too nice to us. :)
Maybe he can give us environment variables, too?

> So, looks like it can works, but I didn't stress it at length yet, in 
> particular I didn't check if application flags are honored, and we may 
> want to set Exclusive Launch...

For PPP it should be sufficient.

> > A daemon could remove the entries on shutdown. If there was a 
> > B_SHUTTING_DOWN kernel message so PPP could know when to disconnect and 
> remove the DNS entry it would work okay, too, but this can only be done 
> by us.
> 
> You got a point here, as I don't think our kernelland stuffs (driver 
> and modules) will be notified nor unload at shutdown, not by BeOS/Zeta 
> kernel. Something interesting to add in OBOS driver & module API BTW, 
> but not mandatory (will slow shutdown...)

We could send the notification only to those drivers/modules that need it. That 
should not be too difficult.

> However, these DNS entries could also be marked/remembered as highly 
> volatile (valids only while a PPP interface is up...) and removed 
> automagically at (next) startup from, what, resolv.conf file?

That does not solve the whole problem because if you do not disconnect your 
PPPoE interface the ISP will not notice that you are gone. It is like after a 
crash. My ISP waits for around five minutes until I can reconnect.

> > Anyway, if that works I will create an app that is executed each time 
> > a connection is being established so it can check if the user must 
> enter a password or if he wants to be asked before dialing.
> 
> Looks load_image() can do the trick here.
> The specific app to launch can even be made PPP interface based, read 
> from settings.

That would be a nice addition, but I do not want the user to have to enter it 
manually. We should have a default behaviour. And I do not know if it is a good 
idea to be able to override the default app because it unnecessarily opens 
possibilities to hackers.

> BTW, do you think we need a way to display and interact with user 
> during the connection, thru some "display connexion"? I guess, alas, 
> there is still some PPP connexion which require some connexion special 
> process, thru a expected/reply strings pairs in a script and/or such 
> connexion *chat* window.

The PPP app that is run on every connection will be add-on based. If that is 
needed it can be done by an add-on, but I would prefer if everything can be 
handled by the kernel module(s).

> > Still, for immediate updating of the PPP settings (like default 
> > connection) I need kernel-land node-monitoring support (when will the 
> kernel finally be usable?).
> 
> It would be great.
> But, until that and for R5 kernel, can't we broadcast some 
> SETTINGS_CHANGED_PLEASE_RELOAD notification thru the stack (each 
> modules) via a net_stack_control_module?

Yes, but which app will do that if not net/ppp_server? ;)

> > Oh, I did not plan to use the whole preflet for showing so little 
> > information. Also, there is no code in the preflet that handles the 
> statistics.
> 
> It could be a separate app, but it don't need to be a permanent one.
> Obvioulsy, if the user set his deskbar a default one, it will be a 
> permanent one.

What does that mean: "set his deskbar a default one"?

> But we don't need to handle that ourselves by making this DUN 
> monitoring a background process, just a normal deskbar view pooling 
> every period for a specific PPP interface new status and statistics. 
> The Deskbar, a quasi permanent app under BeOS, will offer the permanent 
> hosting for free to us!

Yes, and if Deskbar crashes and is restarted the replicants should be reloaded, 
right?

> > Right, but I would like to change the R5 design and add one symbol 
> > per connection. It will be possible to make the symbol always active 
> for each interfaces individually, but that will not be the default.
> 
> Like under Windows since w2k? Even for each (W)LAN card?
> Well, why not.

I like that design. It only takes away space when it has to. Also, I always get 
asked when some app wants to connect to the internet. Thus, I (and surely many 
other people, too) can live with that.

And like you suggested, our netstack could add a (W)LAN icon for each ethernet 
interface automatically, too. Maybe we can combine the PPP and ethernet status 
icon...

Bye,
Waldemar

Other related posts: