# $Id: INSTALL,v 1.4 2005/02/27 02:13:03 ksb Exp $ To install this under stock inetd (Solaris, HPUX) just all a line like tcpmux stream tcp nowait root /usr/local/libexec/tcpmux tcpmux to /etc/inetd.conf (keep a back-out copy) and HUP inetd or restart it. On AIX I had to get the command from "/etc/rc.tcpip" to see how to start/ stop inetd. To install this as a service under xinetd add a file called "tcpmux" in /etc/xinetd.d (or where your xinetd instance is configured) with something close to this in it (shifted left 1 tab stop): service tcpmux { flags = REUSE protocol = tcp socket_type = stream wait = no user = root server = /usr/local/libexec/tcpmux } You have to send xinetd a USR2 (e.g. killall -USR2 xinetd) to make it see the new service, then tail /var/log/messages to see if it groks. On a Solaris 10 host you need to build a smf services.xml file for inetd. Use "inetconv" on a file with the normal inetd.conf line it it echo "tcpmux stream tcp nowait root /usr/local/libexec/tcpmux tcpmux" \ >/tmp/my.conf inetconf -o /var/svc/manifest/site -i /tmp/my.conf should make a file "tcpmux-tcp.xml" in the site directory and eable your service. Test: Just run a shell command like: telnet localhost tcpmux then type "help" as soon as it connects. You should see -No config in /etc/tcpmux.conf If you put this string in /etc/tcpmux.conf: tcpmux/+date stream tcp nowait nobody /bin/date date then the test above outputs "help" and "date" as enabled commands. (Take "date" out and replace it with your own services.) Configuration: If you review the code in rfc1078.c you'll see we take the same format lines the BSD internal inetd service takes, you can just: grep "^tcpmux/" /etc/inetd.conf > /tmp/tcpmux.conf install -m 644 -o root /tmp/tcpmux.conf /etc/tcpmux.conf to move the lines you want into tcpmux's config file. Implications: Simple shell scripts become network services. For example get my "dumpmux" package to replace your network dump software in about 1000 lines of perl and/or shell. It works great. As another example the "request" queue services offer Web interfaces, which are great for Humans. Putting the "q" command up as a MUX'd service is great for automation. -- ksb (and petef), April 2003 ksb@npcguild.org.