Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

incd(8)

arp(7)

icmp(7)

ip(7)

clone(7)

udp(7)



  tcp(7)                              CLIX                              tcp(7)



  NAME

    tcp - Transmission Control Protocol STREAMS device

  DESCRIPTION

    The tcp device is a ``cloneable'' (see clone) STREAMS multiplexing driver
    that provides the services of the Transmission Control Protocol (TCP).

    The tcp device communicates using the AT&T Transport Provider Interface
    (TPI).  Adherence to TPI allows applications to interface with tcp using
    the AT&T Transport Layer Interface (TLI).  The tcp device provides the TLI
    network service type T_COTS_ORD, a connection-oriented protocol service
    with orderly release.  The tcp device should be linked above the ip
    STREAMS driver that has been bound to the TCP protocol (0x06) in order to
    provide the TCP Internet Protocol (IP) functionality of the Department of
    Defense (DoD) IP suite.  The incd command performs this binding at boot
    time.

    The tcp device uses TLI expedited data to implement TCP urgent data.  The
    tcp device does not support the Transport Service Data Unit (TSDU) concept
    and will ignore the T_MORE flag in t_snd().

    The following address format is used as defined in <sys/dod/inet.h> and
    <sys/dod/dod_ut.h>:

    typedef struct inet_addr {
         unchar uc[4];
    } ina_t;

    typedef struct dod_ut_addr {
         ina_t  inet;
         unchar port[2];
    } dodaddr_t;

    The following helpful macros are defined in <sys/dod/dod_ut.h> for
    converting the port between host byte order (least significant byte first)
    and network byte order (most significant byte first):

    #define NET16_TO_HOST16(c) (c[0] << 8 | c[1])
    #define HOST16_TO_NET16(i, c) (c[0] = ((unchar)((i) >> 8))), \
                                  (c[1] = ((unchar)((i))))

    Each of the fields in the address format structures should be filled with
    values in network byte order.  For example, the proper encoding of the
    Internet address 129.135.200.7 with port number 200 would be assigned to
    the structure as follows:

    dodaddr_t        address;

    address.inet.uc[0] = (unchar) 129;



  2/94 - Intergraph Corporation                                              1






  tcp(7)                              CLIX                              tcp(7)



    address.inet.uc[1] = (unchar) 135;
    address.inet.uc[2] = (unchar) 200;
    address.inet.uc[3] = (unchar) 7;

    HOST16_TO_NET16(200, address.port);

    Bind requests inform tcp of the desired local address and port number to
    be associated with the stream.  Bind requests contain either a dod_ut_addr
    structure or a zero length in the address specification.

    Bind requests containing all zeros in the inet field indicate to tcp that
    any local host address is acceptable for connecting to remote hosts.
    Otherwise, the host address in the inet field must contain a valid local
    host address.  Bind requests with all zeros in the port field tell tcp to
    find and allocate the first free port in the dynamic range for this
    stream.  Otherwise, the port field indicates the port to be used.  Bind
    requests with an address length of zero indicate the same information to
    tcp that a bind request with all zeros in the inet and port fields does.

    If an existing stream is listening for incoming connect indications and
    another stream makes a bind request to listen on the same port, the
    request may fail.  The failure will occur if the host address matches that
    of the existing stream or if either host address was specified as all
    zeros.

    A maximum of one connect indication will be queued by a listening tcp
    stream.

    The tcp device supports the Address Resolution Protocol (ARP) ioctl()
    requests described in arp.

    tcp supports options when establishing a connection.  The local address
    that will be used throughout the lifetime of a connection is passed
    upstream from tcp as options in both the T_CONN_IND and T_CONN_CON
    primitives.  The format of this address is one dod_ut_addr structure.

    Because tcp allows only one listening stream per TCP port, the presence of
    any listening stream, including one in a connected state, disallows other
    streams from being bound to that port number for listening.  A stream that
    has been bound as a listening stream can be marked as nonlistening in an
    option passed with the T_CONN_REQ primitive.  The format of this option is
    one tcp_creq_opt structure defined in <sys/dod/tcp.h>.  The dont_listen
    field in the structure should be set to nonzero if this stream is not to
    be used as a listening stream again.

  FILES

    /dev/tcp             Special device file for TCP.

    <sys/dod/tcp.h>      Definitions for tcp device.




  2                                              Intergraph Corporation - 2/94






  tcp(7)                              CLIX                              tcp(7)



    <sys/dod/tcph.h>     Definitions for TCP protocol.

    <sys/dod/inet.h>     Internet address definitions.

    <sys/dod/dod_ut.h>   Internet utility and address definitions.

  NOTES

    The incd command is used at boot time to configure the STREAMS drivers and
    modules that implement network protocols, including tcp.  Manual
    configuration is not usually necessary.

  RELATED INFORMATION

    Commands:  incd(8)

    Files:  arp(7), icmp(7), ip(7), clone(7), udp(7)

    AT&T UNIX System V Network Programmer's Guide



































  2/94 - Intergraph Corporation                                              3




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026