ucspi-tcp is a replacement for inetd. It consists of tcpserver and tcpclient. tcpserver can listen on sockets and start programs in an inetd like fashion except that information like the IP address and remote port are communicated via environment variables. tcpclient makes a TCP connection and runs a program of your choice. It sets up the same environment variables as tcpserver.