View Single Post
  #4   (View Single Post)  
Old 2nd October 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Perhaps.

There are only two ways to check IP address assignments that I can think of:

1) Examining IP addresses in ifconfig output, as you have already suggested (there might be a sysctl too, but this is the same thing, really).
2) Connecting out and back, as ddclient does, because it is not operating system specific (as you have noted).

One could, I suppose, also check timestamps on /var/db/dhclient.leases.IFNAME; changing modification timestamps would show lease renewals or new address assignments. The content may also be examined for additional information, such as lease expirations.

Last edited by jggimi; 2nd October 2008 at 02:47 PM.
Reply With Quote