Go to the FreeLists Home Page Home Signup Help Login
 



[openbeosnetteam] || [Date Prev] [07-2003 Date Index] [Date Next] || [Thread Prev] [07-2003 Thread Index] [Thread Next]

[openbeosnetteam] Re: DHCP Client needed,what would stand in the way?

  • From: "Philippe Houdoin" <philippe.houdoin@xxxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Fri, 25 Jul 2003 12:34:04 GMT
Waldemar wrote:
> > >Alternatively, we could have a "/etc/dynamic-resolv.conf" which is 
> > >cleared on boot-up.
> > 
> > Just to elaborate this idea further:
> > there may be more dynamic config files in the system - DHCP client 
> > can create a temp config file with default gateway info as well. 
> > May be 
> it make sense to have a small (a page or 2) file system in RAM (tmpfs 
> ? 
> ) where we can store those files. On the reboot it will be cleared.
> 
> Do we not already have it: "/tmp"?

Yes, we have.
 
> What do you (all?) have against dynamic/static attributes (instead of 
> plain attributes)?

Nothing, in fact I like it, even better since we now have both userland 
and kernelland 
driver_settings support available, thanks to Axel.

It's just that our current get*byname() implementation is based on 
ISC Bind client, which use /etc/resolv.conf.
Changing the way nameserver(s) list are stored will involve modifying/
forking ISC Bind client code.
Not that I'm against it, as our implementation is not a port but an 
adaptation, and I always found 
these /etc/resolv.conf and /etc/hosts too much Unix-y for BeOS.

> The netstack would store a structure with its settings for each 
> module 
> in the netsettings file:
> 
> ethernet {
>       eth0 {
>               ipv4 {
>                       ip 192.168.0.1
>                       netmask 255.255.255.0
>               }
>       }
>       eth1 {
>               dhcp enabled
>       }
> }
> 
> dns {
>       ipv4 {
>               nameserver 192.168.0.10
>       }
> }

Looks like BONE bone.conf, BTW ;-)

> These settings are automatically loaded for each module/interface/
> protocol combination in the netsettings file.
> ifconfig would not be needed to set up that interface. The settings 
> are 
> converted into attributes.
> The DNS module would automatically have an attribute "nameserver" 
> (below the "ipv4" node) with the value "192.168.0.10" when it is 
> loaded.
> The DHCP client module would look for all interfaces that have "dhcp" 
> "enabled" (eth1) and begin getting the ip and a nameserver. Those 
> values would be saved as dynamic attributes.
> If the netsettings file is changed (by the user) the concerned 
> modules 
> get notified and all attributes are reloaded.
> If static attributes are added/changed/removed they are written 
> immediately to the netsettings file.

Sounds good.
Okay, I'll add this feature on new_stack TODO list...
Time to add our driver_settings.c to network/core and new_stack/stack 
modules, so!
;-)

> There would be no resolv.conf file needed to add a nameserver. But 
> all 
> settings would be saved in only one file. OTOH, we could also make 
> the 
> attribute system more distributed (main nodes like "dns" are saved in 
> their own files).

And supporting Network preflet Profiles feature (aka different net 
settings) will be far easier that way than with multiple network-
related settings files to switch/backup/replace/modify...

-Philippe


--
Fortune Cookie Says:

Bore, n.:
        A guy who wraps up a two-minute idea in a two-hour vocabulary.
                -- Walter Winchell






[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.