CS(8)                                                       CS(8)

     NAME
          cs, csquery - connection server

     SYNOPSYS
          lib/cs [ -f ] [ -v ]
          svc/cs/cs [ -f ] [ -v ]

          csquery [ -x net ] [ -s server ] [ address ... ]

     DESCRIPTION
          Cs spawns a process that serves a single file /net/cs, in
          the current name space, answering requests by client pro-
          cesses to translate symbolic network and service names into
          instructions for connecting to the given service.  It is
          normally accessed by calls to sys-dial(2).

          Each write to /net/cs is a network address of the same form
          as the addr parameter to dial: network!netaddr!service where
          service and network are optional.  The write returns an
          error if the address cannot be translated.  Otherwise, each
          subsequent read returns end-of-file (if there are no further
          translations), or a translation of the form:

               /net/net/clone address!port

          The first field is the name of the clone file for a network
          interface.  To make a connection, open the file, and write
          the text in the second field.  There is a translation for
          each network and for each network address on which a sym-
          bolic netaddr is found.  The file offset should be set to 0
          using sys-seek(2) between the write and the read.

          The file /net/cs persists until it is removed or unmounted
          from /net, or the cs process is killed (see kill(1)). Nor-
          mally only one instance of cs is active; if it finds, when
          started, that /net/cs already exists, it prints a diagnostic
          and exits.  The -f option forces cs to put a new /net/cs
          above the existing one in the current name space; subsequent
          translation requests in the same name space will be resolved
          by the new instance.  The -v option causes cs to print each
          translation request and results (if any) on standard error.

          Cs is normally started once, before other applications
          including srv(8). (On Plan 9, Plan 9's native connection
          service will be used by default if Inferno's cs is not
          started.)  There are currently two versions: lib/cs is nor-
          mally used on networked hosts with Ethernet access to a file
          server; /svc/cs/cs must be used on small clients that use
          PPP on a (dial-up) serial port for network access.

     Page 1                       Plan 9            (printed 11/17/24)

     CS(8)                                                       CS(8)

          Csquery queries the given server (default: /net/cs) for a
          translation of each address and prints the results, one per
          line.  If no address is given, csquery prompts for
          address(es) to translate which it reads from the standard
          input, printing the results of each translation on the stan-
          dard output.  The -x option gives an alternative mount point
          for cs, when there is more than one network stack (see
          ip(3)).

     FILES
          /services/cs/db  map from symbolic service names to servers
          /services/dns/db Internet addresses of DNS servers

     SOURCE
          /appl/lib/cs.b
          /appl/svc/cs

     SEE ALSO
          sys-dial(2), db(6)

     BUGS
          To have two looks like carelessness.

     Page 2                       Plan 9            (printed 11/17/24)