GNU networking utilities
RFC 1078 describes the TCPMUX protocol: "A TCP client connects to a foreign
host on TCP port 1. It sends the service name followed by a carriage-return
line-feed <CRLF>. The service name is never case sensitive.
The server replies with a single character indicating positive (+) or
negative (-) acknowledgment, immediately followed by an optional message
of explanation, terminated with a <CRLF>. If the reply was positive, the
selected protocol begins; otherwise the connection is closed." The program
is passed the TCP connection as file descriptors 0 and 1.
If the TCPMUX service name begins with a "+", inetd returns the positive
reply for the program. This allows you to invoke programs that use
stdin/stdout without putting any special server code in them.
The special service name "help" causes inetd to list TCPMUX services in
Here are several example service entries for the various types of
ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l
ntalk dgram udp wait root /usr/libexec/ntalkd ntalkd
tcpmux/+date stream tcp nowait guest /bin/date date
tcpmux/phonebook stream tcp nowait guest /usr/bin/phonebook phonebook