ipsvd-instruct(5) | File Formats Manual | ipsvd-instruct(5) |
ipsvd-instruct - format of the ipsvd(8) instructions directory
The internet protocol service daemons, ipsvd(7), can be told to read and follow instructions from a directory on incoming connections to the socket they listen on.
For mostly static instructions or for performance reasons, it is possible to compile the instructions from a directory into a constant database (cdb) with ipsvd-cdb(8) for faster lookup, and to tell ipsvd(7) to read the instructions from there.
On each incoming connection, the ipsvd(7) matches the client's IP address against files in the instructions directory. For example, the IP address a.b.c.d which reverse resolves to moa.bit.smarden.org is matched against the following files in the instructions directory, in this order, first match wins:
If the client's hostname has been successfully looked up in DNS:
And finally the catchall file ``0'' (zero):
After successfully matching a client's IP address or hostname against the instructions directory, ipsvd(7) examines the file that matched the IP address or hostname, and acts accordingly:
If the client's IP address or hostname doesn't match any file in the instructions directory, the default action is taken (the program prog is run to handle the connection).
If ipsvd(7) is given instructions for an incoming connection, it reads the corresponding file and interprets each line as follows. The file may be empty, meaning that there is no special instruction.
Empty lines and lines starting with ``#'' are ignored.
msg may contain backslash-escaped characters as follows: ``\\'' is converted to a single backslash, ``\n'' is converted to a new line character, and ``\r'' is converted to a carriage return.
On multiple concurrency instructions the last processed concurrency instruction is considered. Not all ipsvd(7)'s support per host concurrency.
hostname may be ``0'' (zero), matching any IP address.
Note: Using check hostname instructions can cause significant delay while responding to connection attempts, caused by DNS lookups.
If ipsvd(7) cannot interpret a line, it prints a warning, discards the line, and continues with the next instruction if any.
After processing all instructions, ipsvd(7) runs prog. If the file contains at least one check hostname instruction, and none was successful, it closes the connection instead of running prog.
ipsvd(7), ipsvd-cdb(8), tcpsvd(8), sslsvd(8), udpsvd(8), sslio(8)
http://smarden.org/ipsvd/
Gerrit Pape <pape@smarden.org>