cs - connection server daemon — Inferno 1ed
cs - connection server daemon
Description
The connection server daemon, cs, is started by the cs command. The daemon monitors requests for interpretation of host names written by application programs to /net/cs, the interface file. After writing the request, the application reads that same file to obtain the response from the cs daemon.The current implementation uses the hosting system's facilities for name-to-address and other conversions.
Request Format
Requests must be strings in the form:
net!machine!serviceEach component of the request is required.
net
The net component defines the network to be used (for example, tcp, udp). The special value net can be supplied to request the most expedient network.
NOTE:
Currently, net is synonymous with tcp.
machine
The machine component can be any of the following
service
A service name or port number. The default is Styx
|
numeric port value
|
Used verbatim.
|
|
Service name
|
Converted to a port number.
|
Response Format
The application can obtain the converted address by reading the /net/cs interface file. The response will consist of two fields of the form:
/net/net/clone ipaddr!portnoThe first field is the name of the file to open to reserve a connection on Inferno's IP device. The second field can be used to construct a connect message for the ctl file returned by the open of clone.
Note
The service name to port number conversion is controlled by a <services> file. The location of that file is platform dependent:|
/etc/services
|
Unix-hosted systems.
|
|
Windows\services
|
Windows-hosted systems
|
Caveats
Applications that use a single file descriptor for both reading and writing should take care to reset the file offset to 0 between writing the request and reading the response. Otherwise, a truncated response will be read. Applications using buffered I/O should flush after resetting the offset. See Also
infernosupport@lucent.com Copyright © 1996,Lucent Technologies, Inc. All rights reserved.