Next: , Previous: TCPMUX, Up: inetd invocation


16.5 Inetd Environment

If a connection is made with a streaming protocol (‘stream’) and if --environment option has been given, inetd will set the following environment variables before starting the program:

PROTO
Always ‘TCP’.
TCPLOCALIP
Local IP address of the interface which accepted the connection.
TCPLOCALPORT
Port number on which the TCP connection was established.
TCPREMOTEIP
IP address of the remote client.
TCPREMOTEPORT
Port number on the client side of the TCP connection.

Additionally, if given the --remote option, inetd sets the following environment variables:

TCPLOCALHOST
DNS name of TCPLOCALIP.
TCPREMOTEHOST
DNS name of TCPREMOTEIP.