Sample Header Ad - 728x90

Programmatically query last DHCP lease time

1 vote
1 answer
875 views
I have a buildroot embedded Linux where I change the ethernet port settings (i.e. disabled, static or DHCP) from a C++ program. When switching to DHCP, it would be nice to determine when (i.e. timestamp) the device actually gets the DHCP lease. How can I determine that? Polling the current IP address and waiting for a chanage is not an option.
Asked by Niko O (143 rep)
Apr 28, 2023, 06:33 AM
Last activity: May 2, 2023, 08:14 AM