omcmd

omcmd is a scriptable CLI program for performing actions on a running ISC DHCP server using OMAPI.
Download

omcmd Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • David L. Parsley
  • Publisher web site:
  • ftp://dist.taolinux.org

omcmd Tags


omcmd Description

omcmd is a scriptable CLI program for performing actions on a running ISC DHCP server using OMAPI. omcmd is a scriptable CLI program for performing actions on a running ISC DHCP server using OMAPI.It can currently be used to create, remove, modify, and look up hosts and leases. omcmd was created for use with a home-grown netreg application.Building:You must install dhcp-devel first. Check the locations of the include filesfor dhcp. I don't know squat about autoconf & friends, just type 'make' andcorrect any errors you get.Usage: omcmd < command > < objtype > < args >The keyname & secret are the same as the values in the dhcpd.conf file; the secret is base64 encoded. If using a 'keyfile', line1=keyname, line2=secret.-v for verbose output (see below)command is one of: lookup - find an object and print properties create - create a new object remove - remove an object modify - modify an objectobjtype is one of: host leaseFor all commands, the first arg should be of the form property=value, and should be a 'lookup' value (see OMAPI in man dhcpd), i.e.: ip-address=10.20.30.40. For remove, this is the only required argument.For create & modify, the remaining arguments are more property=value stringssupported properties so far: ip-address - e.g. "ip-address=10.20.30.40" hardware-type - e.g. "hardware-type=1" (you almost always use this when specifying the hardware-address) hardware-address - e.g. "hardware-address=00:10:20:30:40:50" state - e.g. "state=free" (you can use this to free an active lease) name - e.g. "name=mylaptop" client-hostname (similar)For the appropriate properties for an object type, see 'man dhcp'.For 'lookup', you can leave off remaining args, and it will print what it finds (in verbose mode). You can also specify property names you want found, and it will spit them out one per line (non-verbose mode), or as property=value strings (verbose). Lookup properties supported are: ends, tstp, tsfp, cltt, ip-address, client-hostname, name, dhcp-client-identifier, hardware-address, hardware-type, and state.Currenlty, only host & lease objects are supported, but adding support forother known object types shouldn't be hard.The return value is 255 for invalid usage, otherwise a value of typeisc_result_t. (see include/isc-dhcp/result.h) What's New in This Release: · This release added a patch that adds host statements and group object support, a command-line option for setting the port number, and minor documentation updates.


omcmd Related Software