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

  • From: "Waldemar Kornewald" <Waldemar.Kornewald@xxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Fri, 25 Jul 2003 11:53:45 +0200 CEST

> >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"?

What do you (all?) have against dynamic/static attributes (instead of 
plain attributes)?
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
        }
}

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.
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).

Waldemar

Other related posts: