tcp(6P) DG/UX R4.11MU05 tcp(6P)
NAME
TCP - Network Protocol Internet Transmission Control Protocol
SYNOPSIS
#include <sys/socket.h>
#include <netinet/tcp.h>
This is an example of how you would create an endpoint for the TCP
connection:
s = socket(AFINET, SOCKSTREAM, 0);
DESCRIPTION
Transmission Control Protocol (TCP) provides reliable, flow-
controlled, two-way transmission of data. It is a byte-stream
protocol used to support the SOCK_STREAM abstraction. TCP provides a
per-host collection of port addresses on top of the standard Internet
address format. Thus, each address is composed of an Internet
address specifying the host and network, with a specific TCP port on
the host identifying the peer entity.
Sockets utilizing the TCP are either "active" or "passive". Active
sockets initiate connections to passive sockets. By default TCP
sockets are created active; only active sockets may use the
connect(2) call to initiate connections. To create a passive socket,
the listen(2) system call must be used after binding the socket with
the bind(2) system call. Only passive sockets may use the accept(2)
call to accept incoming connections.
Passive sockets may "underspecify" their location to match incoming
connection requests from multiple networks. This technique, termed
"wildcard addressing", allows a single server to provide service to
clients on multiple networks. To create a socket that listens on all
networks, the Internet address INADDR_ANY must be bound to the
socket. The TCP port may still be specified at this time; if the
port is not specified, the system will assign one. Once a connection
has been established, the socket's address is fixed by the peer
entity's location. The address assigned to the socket is the address
associated with the network interface through which packets are being
transmitted and received.
OPTIONS
IPPROTO_TCP level options recognized by TCP:
TCP_NODELAY When the option value is non-zero, the system
does not delay sending data to coalesce small
packets. When the option value is zero, the
system may defer sending data to coalesce small
packets to conserve network bandwidth.
TCP_MAXSEG When set prior to a connect(2) call, TCP will use
the option value to negotiate the maximum size of
TCP packets sent and received during the life of
the connection. Values for the TCP Maximum
Segment Size are between 1 and 65,535. This
option is only valid prior to establishing a
connection. The result of segment size
negotiation is less than or equal to the option
value.
TCP_URGENT_INLINE This option has no effect in the DG/UX system.
Use the SO_OOBINLINE socket level option.
TCP_PEER_ADDRESS Restricts the passive TCP endpoint to only accept
connections initiated by the address supplied in
the option value. The option value must contain
a pointer to a sockaddr_in structure.
TCP_ACCEPT_QUEUE_LENGTH
Sets the number of outstanding connections
allowed at the TCP passive endpoint.
SEE ALSO
getsockopt(2), setsockopt(2), intro(6), inet(6F), ip(6P).
Programming with TCP/IP on the DG/UX System.
Licensed material--property of copyright holder(s)