tcpclient - setup an outgoing IPv4/IPv6 TCP connection for application
Purpose
tcpclient enables an application to connect via TCP to a remote server.
Application support
Applications are enabled by means of tcpclient to communication bi-directional over the IP network via the standard file descriptors
- FD 6: Reading from the network.
- FD 7: Writing to the network.
The Application may be supplied with any arguments on call.
Remote host
Typically the remote host is simply given as
- host requiring DNS name resolution, or
- IPv4 address, or
- IPv6 address.
together with the remote connection port:
- port
In case host is provided as DNS name, you can tell tcpclient to use
- -4 IPv4 address, or
- -6 IPv6 address.
and eventually providing
- -I ifname
for IPv6 connections using LLU addresses.
tcpclient is enabled to do an IDENT/TAP lookup at the server prior of establishing the connection; but this is not recommended any more:
- -R: Do not obtain the remote user (default).
- -r: Attempt to get TCPREMOTEINFO
- -t timeoutinfo wait this time to receive TCPREMOTEINFO (default: 26 secs).
Local binding
tcpclient usually uses the host's primary IP address, but can otherwise bind to any IPv4 and/or IPv6 address of the system and may use a certain port (otherwise it choses a free one):
- -i localip
- -p localport
Name resolution
tcpclient reads the environment variable DNSCACHEIP which can be used to specify the recursive DNS Resolver.
If not given, tcpclient uses the nameserver entries provided in /etc/resolv.conf.