gtpc1m1iTransmission Control Protocol/Internet Protocol

Socket Block Table Structure

The socket block table consists of four parts:

  1. The socket block table header, which contains pointers and statistical information about resources used by TCP/IP native stack support
  2. Hash buckets for the IP hash table, which allow a socket block table entry to be easily found, given its IP addresses and port numbers as input
  3. Hash buckets for the file descriptor hash table, which allow a socket block entry to be easily found, given its file descriptor as input
  4. Socket block table entries, which contain one entry for each active socket that is using TCP/IP native stack support.

The socket block table resides in main storage and is the table accessed and updated most frequently by the TCP/IP native stack support code. All of the information about an active socket is maintained in its socket block table entry.

When the TPF system is brought up, all socket block table entries are in the available pool of resources. Socket block table entries are assigned dynamically as sockets are created. When a socket closes, its socket block table entry is returned to the pool of available resources so that it can be reused.

Defining the Socket Block Table

The MAXSOCK parameter on the SNAKEY macro in keypoint 2 (CTK2) defines the number of socket block table entries. One socket block table entry is needed for each active socket that uses TCP/IP native stack support.

See TPF ACF/SNA Network Generation for more information about the SNAKEY macro.