omcmd is a scriptable CLI program for performing actions on a running ISC DHCP server using OMAPI.. #Scriptable CLI #Performing actions #ISC DHCP server #Omcmd #Scriptable #CLI
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.
You must install dhcp-devel first. Check the locations of the include files for dhcp. I don't know squat about autoconf & friends, just type 'make' and correct any errors you get. Usage: omcmd [-k keyname secret | -K keyfile ] [-s server] [-v] < 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 object
objtype is one of:
host lease
For 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 strings supported 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 for other known object types shouldn't be hard.
The return value is 255 for invalid usage, otherwise a value of type isc_result_t. (see include/isc-dhcp/result.h)
What's new in omcmd 0.4.8:
- 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 0.4.8
add to watchlist add to download basket send us an update REPORT- runs on:
- Linux
- filename:
- omcmd-0.4.8.tar.gz
- main category:
- Utilities
- developer:
- visit homepage
ShareX 16.0.1
Zoom Client 6.0.3.37634
Windows Sandbox Launcher 1.0.0
7-Zip 23.01 / 24.04 Beta
IrfanView 4.67
Microsoft Teams 24060.3102.2733.5911 Home / 1.7.00.7956 Work
Bitdefender Antivirus Free 27.0.35.146
4k Video Downloader 1.5.3.0080 Plus / 4.30.0.5655
Context Menu Manager 3.3.3.1
calibre 7.9.0
- 4k Video Downloader
- Context Menu Manager
- calibre
- ShareX
- Zoom Client
- Windows Sandbox Launcher
- 7-Zip
- IrfanView
- Microsoft Teams
- Bitdefender Antivirus Free