lib/srv [configuration_file]
/services/server/configIf the lib/srv command is invoked with a filename as a command line argument, the named file is used as a configuration file.
The configuration file is a plain text file, each line of which consists of three elements: the port name, the connection type, and the daemon command (and any command arguments). The port name and the connection type (currently either tcp or udp) should each be a single word.
For example, the default configuration file includes these lines (long line continuations are indented). The arguments to styxd, rstyxd, and infdb are a list of supported security algorithms.
# # Format: # # - port name - connection type - daemon command - command arguments - # infsigner tcp /dis/lib/signer.dis infcsigner tcp /dis/lib/countersigner.dis inflogin tcp /dis/lib/logind.dis styx tcp /dis/lib/styxd.dis noauth nossl clear sha md5 rc4 sha/rc4 md5/rc4 rstyx tcp /dis/lib/rstyxd.dis noauth nossl clear sha md5 rc4 sha/rc4 md5/rc4 infdb tcp /dis/lib/dbsrv.dis noauth nossl clear sha md5 rc4 sha/rc4 md5/rc4 virgil udp /dis/lib/virgild.dis
DAEMON | PORT | DESCRIPTION |
lib/signer | infsigner | See signer, countersigner - daemons for set-top box authentication in Chapter 9 |
lib/countersigner | infcsigner | See signer, countersigner - daemons for set-top box authentication in Chapter 9 |
lib/logind | inflogin | See logind - login daemon in Chapter 9 |
file service | styx | See File service below. |
remote execution services | rstyx | See rcmd - remote command execution in Chapter 5. |
lib/dbsrv | infdb | See DB - database support in Chapter 15 |
lib/virgild | virgil | See virgild - connection service for remote clients |
The srv command also starts the connection service for resolving network addresses. See cs - start connection server daemon command.
See rcmd - remote command execution in Chapter 5 for the description of a client interface for sending command requests to a server.
Each incoming request is logged to the server's console. The message includes the client's network address.
The client's request must consist of two lines:
Line 1 | A decimal integer representing the number of bytes in the following line. |
Line 2 | The command and arguments, if any to be executed on the server. |
The client's commands are executed with the same Inferno user ID that was used when the srv command was issued.
The client's commands are executed on the server with standard input, output, and error redirected to the /dev/cons device on the client. This redirection requires that the client export its file system (see dial, announce, export, listen - network connections in Chapter 8) over the connection it creates to the server.