omcmd, freeing leases via OMAPI
Ed Ravin
eravin at panix.com
Mon Nov 7 06:28:13 UTC 2011
I just realized what caused those corrupted dates - the
code in omcmd did not convert the date values to and from
network byte order. The fix is pretty simple.
-- Ed
On Mon, Nov 07, 2011 at 12:29:03AM -0500, Ed Ravin wrote:
> A few months ago I discovered the "omcmd" utility. It's a C program
> that makes OMAPI calls to do the same kinds of things that omshell does,
> but on a single command line. For example, to look up a lease, you do
> this:
>
> omcmd -K "key-filename" lookup lease ip-address=192.168.1.7
>
> And you get this output:
>
> state=active
> ip-address=192.168.102.7
> hardware-address=00:30:48:dc:de:22
> hardware-type=1
> ends=Sat May 30 19:50:38 1931
> tstp=Wed Dec 31 19:00:00 1969
> tsfp=Wed Dec 31 19:00:00 1969
> cltt=Tue Jan 7 01:46:38 1908
More information about the dhcp-users
mailing list