---
name: "tcp-env"
section: "1"
platform: "linux"
package: "qmail"
version: "1.06-6.2~deb10u1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/tcp-env"
---

# tcp-env(1)

set up TCP-related environment variables

## NAME

tcp-env - set up TCP-related environment variables

## SYNOPSIS

**tcp-env** \[ **-rR** \] \[ **-t*timeout*** \] *program* \[ *arg ...* \]

## DESCRIPTION

The input for **tcp-env** must be a TCP connection. **tcp-env** finds out information about that connection, puts the information into several environment variables as described in **[tcp-environ(5)](/tcp-environ/5.md),** and runs *program* with the given arguments.

Usually **tcp-env** is run from **inetd**. It might instead be run from another server that already sets up the right environment variables; if **PROTO** is set to **TCP** when **tcp-env** is invoked, **tcp-env** assumes that all the other variables are set up properly, and it does not check whether the input is a TCP connection.

## OPTIONS

- **-r**

  (Default.) Attempt to obtain **TCPREMOTEINFO** from the remote host.

- **-R**

  Do not attempt to obtain **TCPREMOTEINFO** from the remote host.

- **-t*timeout***

  Give up on the **TCPREMOTEINFO** connection attempt after *timeout* seconds. Default: 30.

## SEE ALSO

[tcp-environ(5)](/tcp-environ/5.md), [inetd(8)](/inetd/8.md)
