On Wed, 13.11.13 23:22, Patrik Flykt ([email protected]) wrote: > Hi, > > This patch set implements a DHCPv4 client library named libsystemd-dhcp > to be used with systemd-network. > > The code implements the DHCP protocol from the INIT state up to expiry, > T1 and T2 timer setting, but does nothing in response to the IP address > reacquisition T1 and T2 timers being triggered. Expiry timer is followed > and the DHCP client stopped when it triggers. INIT-REBOOT state is also > not yet implemented; both these missing parts are to be implemented next. > > The code assumes that the caller can figure out the interface to use. > The code expects to be handed an sd_event loop, a MAC address and an > interface index. The outcome is a notification of an IP address being > acquired and the callback provider is expected to set the IP address, > netmask and default gateway. Higher level DHCP options such as DNS and > NTP servers are requested from the server by default, but the response > is not yet collected anywhere. I also don't know how detailed callback > information is needed, is there for example any need to know the protocol > state transitions or messages sent/received.
I'd keep things minimal. But the addition DHCP metadata like NTP servers we certainly should pass back to the user of the lib. However, I'd very much prefer doing this high-level instead of low-level, i.e. provide calls such as sd_dhcp_client_get_ntp() to get a list of NTP servers, and so on... I do like the code and where this is going! Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
