NICNAMED
[/?]
[/ACCESSLEVEL number]
socket
NICNAMED provides simlpe NICNAME service (a.k.a. "WHOIS" service, although that is not its official name), accepting NICNAME queries on its input and sending NICNAME responses on its output. If no socket is specified as an argument, it uses its standard input and standard output for input and output. Otherwise, it uses the named socket, which it closes when it has finished with it. The IP address and TCP port number on which NICNAME service is thus provided is determined by its parent process, not NICNAMED itself. Conventionally, the port number is 43 and the IP address is one that is reachable by Internet at large.
NICNAMED is designed to be spawned on demand by TCPSRUN. It can also be spawned by INETD, although the control of client access levels based upon the client's IP address, which TCPSRUN does, will be unavailable as a consequence.
Where client access is denied, NICNAMED simply exits immediately, closing the socket. With any other access level, normal NICNAME service is provided.
NICNAMED provides a very simple service. It does not provide any complex protocol extensions. It is targetted for use by organizations wanting to host their own NICNAME service for security and ownership not at domain name registries.
NICNAMED reads only the first line of its input, treats it as a domain
name, looks for the NicName/@domain file, below
the current directory in which NICNAMED was started, and writes out the
contents of that file to its output, if the file exists and can be opened
and read. Any error, from incorrectly formed domain names sent by the
client to non-existent/inaccessible files or NicName/
directory, will cause it to simply exit.
NICNAMED does not post-process the file contents in any way. What the file contains is, with the exception of newline conversion, what is sent to the client. Data file contents are entirely at the discretion of the service administrator. Plenty of tools exist for text file processing, if it is desired to automate the creation of or structure the contents of the files.
NICNAMED writes log information to its standard error, listing each request that is processed.
A "TCPService.RUN" run file, for NICNAMED to be spawned by TCPSRUN, would typically look similar to:
program %APPS%\JdeBP\IU\Bin\NICNAMED.exe argument NICNAMED argument %3
TCPSRUN itself would be invoked under RUNSVC, the Service Manager in the OS/2 Command Line Utilities version 2.2, with a run file similar to:
program %APPS%\JdeBP\IU\bin\TCPSRun.exe chdir %_BOOT%:\Config\Services\%1 argument TCPSRun argument 0.0.0.0 argument nicname argument TCPService.RUN