omcmd, freeing leases via OMAPI

Ed Ravin eravin at panix.com
Mon Nov 7 05:29:03 UTC 2011


I wrote about this on the list back in Augst but no one responded,
so I thought I'd try again.

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

Those of you familiar with omshell will immediately recognize the
usefulness of this utility - to do the same thing with omshell
requires a long and laborious dialogue.

omcmd lives here:

    http://freecode.com/projects/omcmd

But there's a problem.  It needs some minor maintenance - as you can
see above, it's confused about how to interpret the time values in
the lease object.  Alas, the developer has completely abandoned the
project.

Does anyone else think this tool is worth rescuing?  Someone familiar
with the innards of the ISC dhcpd API shouldn't have too much trouble
getting it working, and perhaps even integrate it into the dhcpd
distribution.

Thanks,

	-- Ed



More information about the dhcp-users mailing list