Re: Configuration profiles handling by libdhcpcd
Roy Marples
Fri May 31 23:41:50 2019
On 31/05/2019 23:04, Langlois, Maxime wrote:
All dhcpcd options are available :)
dhcpcd -V | grep routers
003 routers array ipaddress
request
All current DHCP options are prefixed new_
const char *routers = dhcpcd_get_value(ifp, "new_routers");
Hi Roy,
I know I can access all the configuration options from the config file.
But what I am looking for is the status information :
when the interface is configured to use DHCP, how can I get the
information of the address, netmask, gateway that are effective once a
DHCP lease is obtained?
That *is* the status information.
The whole DHCP message / static config and misc data is available via
that function.
If you wanted to query dhcpcd.conf you would use dhcpcd_config_get or
dhcpcd_config_get_static.
Roy
Archive administrator: postmaster@marples.name