set-tcp-env1
Set up mandatory tcp-related environment variables
Usage
set-tcp-env prog
Overview
set-tcp-env is heavily based on tcp-env(1) from qmail-1.03. It uses C libraries from djb he put into the Public domain.
prog consist of one or more arguments.
The input for set-tcp-env must be a TCP connection. set-tcp-env finds out information about that connection, and sets PROTO, TCPLOCALIP, TCPLOCALPORT, TCPREMOTEIP, TCPREMOTEPORT respectively. It unsets TCPLOCALHOST, TCPREMOTEHOST and TCPREMOTEINFO. These environment variables are described in tcp-environ(5).
set-tcp-env then runs prog with the given arguments.
Exit status
set-tcp-env returns 111 on error, it replaces itself with prog in all other cases.