Quote:
Originally Posted by bit7
Hi all,
i'm looking for some help to find a solution on this:
i would need to know from c, if the ip address of an interface (example eth0) has been dhcp assigned,
|
Not from anything in /proc, but dhclient for instance will update
/etc/dhcpc/dhcpcd-eth0.info ... you can check the time-stamp in
the file and compare the current IP on the interface with the content
of the file aforementioned.
Quote:
Originally Posted by bit7
and also if there is a simple way to know if a dhcp server is available on the local network,
|
Send a dhcp request :} and see if anything answers.
Quote:
Originally Posted by bit7
and what could be the next available dhcp ip.
|
Only if you're on the server. The server doesn't send out lists of
"next free IPs" all the time.
Cheers,
Tink