nslinkrelease − force a port to be released on a DeviceMaster.
nslinkrelease /dev/ttySIXX
nslinkrelease xx:xx:xx:xx:xx:xx [ethX] portnumber
nslinkrelease ipHost portnumber
nslinkrelease is a command-line utility used to force an in-use port on a DeviceMaster to be released in order to make it available.
nslinkrelease
uses one of three methods to force the port to be released:
nslinkrelease /dev/ttySIXX
If nslinkrelease is invoked with a single parameter, that parameter is assumed to be the full path of an nslink device file (e.g. /dev/ttySI0, /dev/ttySI23). An ioctl() call will be made on the NS-Link driver requesting that an appropriate port-release command be sent to the DeviceMaster. The NS-Link driver must be installed and running to use this method.
nslinkrelease xx:xx:xx:xx:xx:xx [ethX] portnumber
If nslinkrelease is invoked with two or three parameters and the first parameter is an Ethernet address of the form xx:xx:xx:xx:xx:xx, then raw "MAC-mode" Ethernet communications will be used to send the port-release command directly to the DeviceMaster. The Ethernet interface to be used may be optionally specified. If no Ethernet interface is specified, "eth0" is used. Using this method on a host that is also using the NS-Link driver in MAC mode is not recommended.
nslinkrelease ipHost portnumber
If nslinkrelease is invoked with two parameters and the first parameter is not an Ethernet address, then TCP/IP communications is used to send the port-release command directly to the DeviceMaster. The first parameter may be either a host name or IP address in dotted-quad notation. This method may be used on any host -- including one running the NS-Link driver either in MAC or TCP mode.
nslinkrelease.c is the C source code. For examples of how to force a port release see the functions devRelease(), macRelease() and tcpRelease(). nslinkrelease.py is the same program written in Python (it requires Python 2.0 or newer).
nslinkrelease will produce no output and return success if the DeviceMaster responded as expected. A error (non-zero) exit code can be caused by a number of errors: invalid device specified, wrong IP or Ethernet address, invalid hostname, invalid port number. If there is an error, an error message should be generated on stderr.
NB: If an invalid port number is provided in TCP or Ethernet mode, there will be no response from the DeviceMaster, and nslinkrelease will timeout and return an error.
nslinkrelease does not use any environment variables.
nslinkd(8), nslink(8), nslinkadmin(8)
Check the release notes file for an up-to-date list.
ftp://ftp.comtrol.com/