scan file /etc/dhcpc/dhcpc-d-ethx.info for
'DHCPSID=x.x.x.x' That should be the server IP that gave
you your address.
Sys V filesystem may hide elswhere, or add a line of code to the dhcp
client software to write a log file of the server IP when it gets one,
perhaps in the /proc folder
RObert
On Mon, 25 Jul 2005 05:01:50 -0700, lawrieleo wrote:
> Hi all,
>
> Here we are writing an application, which basically shows the network
> configuration parameters of our linux box.
> A dhcp client is working which fetches the ip address from the DHCP
> server operating in our network. There could be morethan one server
> operating. This application also needs to display the DHCP server's IP
> address the one that assigned an IP address to our box?
> How can our application program identify the DHCP server's IP address?
> Any specific API or IOCTL for this purpose?
> Please suggest.
>
> Thanks,
> Lawrie.
|