TTCP(1-NEW)

NAME
ttcp - test TCP or UDP

SYNOPSIS
ttcp -t [ -options ] host

ttcp-svr3 -t [ -options ] host

ttcp-svr4 -t [ -options ] host

ttcp-svr4-sockets -t [ -options ] host

ttcp -r [ -options ]

ttcp-svr3 -r [ -options ]

ttcp-svr4 -r [ -options ]

ttcp-svr4-sockets -r [ -options ]

DESCRIPTION
Ttcp tests TCP and UDP network protocols; ttcp -t transmits data to the specified host and ttcp -r receives data. Ttcp is implemented using -systype bsd43, and uses the sockets interface to perform network operations.

Ttcp-svr3 functions the same as ttcp, except that it is implemented using -systype svr3, and uses the XTI interface to perform network operations.

Ttcp-svr4 functions the same as ttcp, except that it is implemented using -systype svr4, and uses the XTI interface to perform network operations.

Ttcp-svr4-sockets functions the same as ttcp, except that it is implemented using -systype svr4, and uses the emulated sockets interface (which in turn uses the same kernel streams facilities as XTI) to perform network operations.

OPTIONS

-lnumber
    Set the length of buffers read or written to number (default is 1024 bytes).

-s  When transmitting, supply data with a generated pattern; if not set, read data from stdin to be sent. When receiving, discard data from the network; if not set, write received data to stdout.

-nnumber
    Set the number of buffers to be read or written to number (default is 1024). This option is ignored if -s is not set.

-pnumber
    Set the port number to connect to (when transmitting) or accept connections on (when receiving) to be number (default is 2000).

-N  Set the TCP_NODELAY option, if the -u option is not set.

-Mnumber
    Set the TCP_MAXSEG option to number, if the -u option is not set.

-Snumber
    Set the SO_SNDBUF option (when transmitting) or the SO_RCVBUF option (when receiving) to number.

-Pprotocol
    For ttcp-svr4 only, set the name of the protocol to use, to be looked up in the network configuration file.

-D  When receiving, operate as an inetd-based network service provider. In this mode, ttcp expects its network connection to be established when it ttcp starts execution, and to be provided as file descriptor 0. Further ttcp-svr3 and ttcp-svr4 expect the inetd(1m) socket type configuration parameter to be ``stream/stream/xti'' or ``datagram/stream/xti'', and ttcp-svr4-sockets expects the inetd socket type to be ``stream/stream/socket'' or ``datagram/stream/socket''. When executing in this mode, ttcp writes error messages via the syslog(2) interface.

-O  When transmitting, sequence number output buffers, and when receiving, check sequence numbers in input buffers.

-C  Report local and remote connection addresses and port numbers. (Default if -D set.)