MUXCAT(1)                                                            MUXCAT(1)

       muxcat - display a stream from a TCPMUX-like service

       muxcat [-Fux] [-o file] [-p port] host services
       muxcat -h
       muxcat -V

       This  program is designed to display a stream of bytes from an RFC 1078
       data source.  The data source is  on  host  under  the  tcpmux  service
       (either  under  inetd(8)  or  tcpmux(8l)).   A non-standard port may be
       specified as port.

       As muxcat provides no in-band credential scheme, the service may choose
       to recognize our client with getpeername(2), an RFC 1413 identification
       request, or any other metric which is implemented wholly out-of-band by
       the  remote  service.  Any authorization action required by this client
       is beyond the scope of this program.

       For each service presented another level of encapsulation is performed.
       This  allows  a  mux  service to run nested inside another.  The remote
       service sees the client socket shutdown (for read) after the last  ser-
       vice is presented, see shutdown(2).

       Each  service  must  reply with a single line starting with a plus sign
       (+) to acknowledge that the service is ready (as per  RFC  1078).   The
       "help"  service  is  exempt from this requirement.  Data after the last
       acknowledgment line are copied to the stdout, or the named file.

       As an extension a service may respond with:
       to redirect muxcat to a different service.  The client connects to  the
       new  host  on  the  specified port to re-request the same service-name.
       Either host or port may be the empty string to  indicate  "no  change".
       If a service redirects to itself muxcat fails, but longer loops are not
       presently detected.

       When no service is provided the basename(1) of the program is used as a
       default  service.  This is not represented in the usage message because
       it is almost never useful.

              Specify that the final service specification doesn't  offer  any
              acknowledgment  advise, like the "help" service.  This make cer-
              tain network services easier to query from the command-line.

              Print a brief help message.

       -o file
              The name of the file to record the output stream.  When no  file
              is given muxcat defaults to stdout.

       -p port
              The TPC/IP port tcpmux (cum inetd) listens on for client connec-
              tions (per RFC 1078 this should be port 1,  our  default).   The
              port may be provided as a service name from /etc/services.

              Use unbuffered output when writing to file.

              Show only the programs version information and exit.

              Display  the success or failure banners from the remote service.

       muxcat localhost help
              Request the list of services the local host provides.   This  is
              special  due  to  RFC  1078's  requirement that the token "help"
              always succeed (as a terminal state).

       muxcat $CENTRAL todo
              Ask the CENTRAL server for a "todo" list.  If  we  really  trust
              this  server we could just pipe the resultant script to a shell.
              We'd be very trusting of the server in that case.

       muxcat -x $CENTRAL | hxmd -C - ...
              Use the hxmd(8l) configuration file from the CENTRAL host as the
              configuration  for  a local instance of hxmd(8l).  Show the chat
              replies on stderr.

       muxcat -F hicks uid ksb
              Ask the "uid" service on the local host  "hicks"  to  match  the
              login  "ksb".   This  service  doesn't acknowledge each request,
              since it allows multiple requests, so the -F option  allows  the
              reply  to  be  read  as data.  Since muxcat sends an end of file
              (via shutdown(2)) on the socket the "uid" service  releases  the

       muxcat -x sulaco msrcmux local/sbin/level2s >/tmp/level2s.tar
              Use muxcat to invoke an instance of msrcmux on the host "sulaco"
              to get a  pre-configured  platform  version  of  the  source  to
              level2s(8l)  in  tar(1)  format.   That  makes  this program the
              "client" for msrcmux(7l), as well as many other services.

       @key-pickup newAcct:tcpmux
              A tcpmux.conf directive which redirects the  key-pickup  service
              to  a host named "newAcct" on the standard tcpmux service.  This
              version of muxcat catches errors in the spelling of the new ser-

       None  known,  other  than  these  services  imply a great deal of trust
       between the peers.  Since the mux service is normally bound to a privi-
       leged port one might assume that is justified on a local network.

       Be  aware  that  most text services (like help) use network line-breaks
       (that is "\r\n") and could require a tr(1) spell to make them UNIX-pipe
       friendly (viz. "|tr -s '\r\n' '\n\n'").

       Kevin S Braunsdorf
       tcpmux at

       sh(1), dumpmux(8l), inetd(8), getpeername(2), muxsend(1l), hxmd(8l),

                                     LOCAL                           MUXCAT(1)