SCKBK | Back to Index page

| Prolog Control Block Contents SCKBK DSECT SCKARY DSECT Storage Layout Cross Reference (Contains links to field and bit definitions) |
Programming Interface Information: This information is NOT intended to be used as Programming Interfaces of z/VM.

SCKBK Prolog | Top of page

     NAME       : HCPSCKBK
     DESCRIPTION: Socket control block
     DSECT      : SCKBK
     FUNCTION   :
                  This structure defines the ISFC socket structure.
                  The socket is used for service communications between
                  different nodes.
     LOCATED BY :
                  Anchored at HCPHSHSK.  Use HCPGAL routines to look up a
                  socket by PORT or run the list of sockets in KCMSCKBK and/or
                  KCMUBSCK
     CREATED BY :
                  See HCPKCS and the HCPSOCK macro.
                  (HCPKCSCR, HCPKCSCP, HCPKCSCC, HCPKCSCS)
     DELETED BY :
                  See HCPKCS and the HCPSOCK macro.
                  (HCPKCSCL)
     SERIALIZED :
                  See HCPKCMBK for lock hierarchy rules.
                  The SCKBK chain is serialized by KCMSCKLK.
                  Fields in the SCKBK are serialized by SCKLKWRD unless
                  otherwise noted.
     RELOCATION CONSIDERATIONS : None
     NOTES      :

SCKBK Control Block Content | Top of page

     SCKBK DSECT
    Top of page

    Hex   Dec Type/Val   Lng Label (dup)    Comments
    ---- ---- --------- ---- -------------- --------
    0000    0 Structure      SCKBK          Socket control block
          SCKPORT must be the first element in this structure.  The
          SCKBKs are stored in a hash table (HCPHSHSK) and the key is
          SCKPORT.  The address returned from the hash table lookups
          will be the address of SCKPORT.  By keeping SCKPORT as the
          first element, we ensure that we have the address of the
          SCKBK as well.
    0000    0 Character    8 SCKPORT        Socket Port/address/Service ID
    0008    8 Signed       4 SCKID (0)      Socket ID
    0008    8 Signed       2 SCKINDEX       Socket array index
    000A   10 Signed       2 SCKINSTN       Instance number
    000C   12 Signed       4 SCKNUM         Socket Number
    0010   16 Dbl-Word     8 SCKCTOD        Creation TOD clock
    0018   24 Address      4 SCKFPTR        Pointer to next Socket
    001C   28 Address      4 SCKBPTR        Pointer to previous Socket
    0020   32 Character   32 SCKNAME        Socket Name
    0040   64 Signed       4 SCKNLEN        Length of Socket Name
    0044   68 Bitstring    1 SCKSTAT        Socket Status
              00000000       SCKIDLE        0 SCKIDLE Socket is idle
              00000001       SCKRECPN       1 SCKRECPN Socket is pending
                                            receive
              00000002       SCKSEND        2 SCKSEND Socket is sending
              00000003       SCKDELIP       3 SCKDELIP Delete in progress
              00000004       SCKWCNT        4 SCKWCNT Waiting; Connection
                                            initiated
              00000005       SCKACPLP       5 SCKACPLP Waiting; Accept
                                            suspended
              00000006       SCKCNFLD       6 SCKCNFLD Connection Failed
              00000007       SCKCLPND       7 SCKCLPND Close Pending
    0045   69 Bitstring    1 SCKFLAGS       Flags
              1... ....      SCKBIND        X'80' SCKBIND Explicit Bind done
              .1.. ....      SCKSNAME       X'40' SCKSNAME Explicit SETNAME
                                            done
              ..1. ....      SCKLSTN        X'20' SCKLSTN Listen mode set
              ...1 ....      SCKCNET        X'10' SCKCNET Connected Socket
              .... ..1.      SCKPNDCL       X'02' SCKPNDCL Close Pending
    0046   70 Bitstring    1 SCKFLAG2       Flags
              1... ....      SCKLCLSE       X'80' SCKLCLSE Closed locally
              .1.. ....      SCKRCLSE       X'40' SCKRCLSE Closed remotely
              ..1. ....      SCKINCNT       X'20' SCKINCNT Initiated
                                            connection - debug info
              ...1 ....      SCKACSCK       X'10' SCKACSCK Socket created on
                                            accept (special)
              .... 1...      SCKLTMSG       X'08' SCKLTMSG Message lost;
                                            Socket should close
    0047   71 Bitstring    1 SCKTYPE        Socket type
              00000000       SCK_LISTEN     0 SCK_LISTEN Listening socket
                                            (accept only)
              00000001       SCK_STREAM     1 SCK_STREAM Streaming Socket
              00000002       SCK_DGRAM      2 SCK_DGRAM Datagram Socket
    0048   72 Signed       4 SCKLIMIT       Limit for connections
    004C   76 Signed       4 SCKMASK        VMPLEX Node Mask
    0050   80 Address      4 SCKVMDBK       VMDBK used for creation
    0054   84 Address      4 SCKRXQUE       Queue of received message (if out
                                            of order condition occurs)
          The SCKILOCK is an integrity lock to serialize the creation
          and destruction of a socket.  See HCPKCD to follow the
          lock flow for creation and destruction of a socket.
          This lock is used as a reference counter for the SCKBK.
          The lock heirarchy for this lock and others can be found
          in HCPKCMBK.
    0058   88 Dbl-Word     8 SCKILOCK (3)   Integrity Socket Lock Word
          The SCKLKWRD serializes the changes to the socket structure.
          The KCMSCKLK serializes the changes to the HCPHSHSK.  To
          make changes to both the hash table and the socket, the locks
          have to be obtained in this order:
          (1) KCMSCKLK
          (2) SCKLKWRD
          Changes requiring an addition or deletion from the HCPHSHSK
          require EXCLUSIVE locks.   See HCPKCMBK COPY for more info.
    0070  112 Dbl-Word     8 SCKLKWRD (3)   Socket Lock word - general work
    0088  136 Dbl-Word     8 * (3)          Reserved
              00000006       SCKQSIZ        6 The size of SCKQUEBK for
                                            BLOCKMAP is 48
    00A0  160 Dbl-Word     8 SCKQUEBK (6)   Socket QUEBK for input messages
                                            Serialized by Compare and Swap in
                                            HCPQMX routines.
    00D0  208 Signed       4 SCKMSGID       Socket MSGID field Serialized by
                                            Compare and Swap using HCPCOUNT
                                            INTERLOCK
    00D4  212 Signed       4 SCKCHAIN       Chain of control messages
    00D8  216 Dbl-Word     8 SCKACTOD       TOD of last accept
    00E0  224 Address      4 SCKCNRQU       Queue of connection requests
                                            waiting on an ACCEPT
    00E4  228 Signed       4 SCKCNNUM       # of queued connection requests
                                            Serialized by Compare and Swap
                                            using HCPCOUNT INTERLOCK
    00E8  232 Character    8 SCKASSOC       Associated Socket
    00F0  240 Dbl-Word     8 SCKRECV (0)    HCPSOCK Receive structure
                                            Serialized by Compare and Swap
    00F0  240 Signed       4 SCKIQCTR       Count of messages in SCKQUEBK
    00F4  244 Address      4 SCKREECB       Pointer to ECBBK for receive
    00F8  248 Address      4 SCKOQUHD       Head Ptr to output queue
    00FC  252 Address      4 SCKOQUTL       Tail Ptr to output queue
    0100  256 Address      4 SCKECBBK       Pointer to ECBBK for connection
    0104  260 Address      4 SCKACECB       Pointer to ECBBK for accept loop
    0108  264 Character    4 *              Reserved for IBM use
    010C  268 Address      4 SCKCLOSE       Pointer to ECBBK for close
    0110  272 Address      4 SCKRCECB       Pointer to ECBBK for recover msg
          Message storage
    0114  276 Address      4 SCKRCVR        Ptr to msgs for recovery
          Chain of messages waiting on a reply
    0118  280 Address      4 SCKRPND        Ptr to MBRBKS (waiting on reply)
          Message id used to determine if messages have arrived out
          of order on a connected socket.
    011C  284 Signed       4 SCKRMSID       Socket receive MSGID field
                                            Serialized by Compare and Swap
                                            using HCPCOUNT INTERLOCK
    0120  288 Signed       2 SCKCNTMO       Counter for timing out connect
                                            requests, and to track delayed
                                            close requests.
    0122  290 Bitstring    1 SCKPRIOR       Socket priority See HCPSOCPL for
                                            codes defined for SCKPRIOR.
    0123  291 Bitstring    1 *              Reserved
    0124  292 Signed       4 *              Reserved
    0128  296 Character   16 SCKTGT (0)     Target if Connected/blank if not
    0128  296 Character    8 SCKTGTND       Target Node ID
    0130  304 Character    8 SCKTGTSV       Target Service/port
    0138  312 Dbl-Word     8 SCKCTRS (0)
    0138  312 Dbl-Word     8 SCKRXMSG       Count of messages received
    0140  320 Dbl-Word     8 SCKTXMSG       Count of messages transmitted
    0148  328 Dbl-Word     8 SCKRXDSC       Count of messages discarded (RX)
    0150  336 Dbl-Word     8 SCKTXDSC       Count of messages discarded (TX)
                                            Serialized by Compare and Swap
                                            using HCPCOUNT INTERLOCK
    0158  344 Dbl-Word     8 SCKRXBYT       Count of bytes received
    0160  352 Dbl-Word     8 SCKTXBYT       Count of bytes transmitted
          Counts of messages that are buffered.
          SCKTXBUF is the # of messages that are queued waiting on
          a RECOVER_MSG to be issued.  These are messages that have
          been sent via SEND_QUEUED.  This will be displayed in the
          Q ISFC SOCKETS output.
    0168  360 Character    8 *              Reserved for IBM use
    0170  368 Dbl-Word     8 SCKTXBUF       Count of messages buffered (TX)
                                            Serialized by Compare and Swap
                                            using HCPCOUNT INTERLOCK
    0178  376 Dbl-Word     8 SCKOUTSD       Count of outstanding sends These
                                            are sends that have not yet gone
                                            across the link.
    0180  384 Dbl-Word     8 SCKTHROT       Count of times throttled
                                            Serialized by Compare and Swap
                                            using HCPCOUNT INTERLOCK
              00000050       SCKCTRLN       *-SCKCTRS
    0188  392 Signed       4 SCKMWAIT       Count of times RECV waited
    018C  396 Signed       4 SCKMOOO        Count of message arriving out of
                                            order
    0190  400 Signed       4 SCKRXQCT       Current count of msgs on SCKRXQUE
    0194  404 Signed       4 *
    0198  408 Dbl-Word     8 *              Reserved for IBM use
              000001A0       SCKEND         * End of Socket control block
              000001A0       SCKBKLN        *-SCKBK Length of typical SCKBK
              00000034       SCKBKSZ        (SCKBKLN+7)/8 Size of typical
                                            SCKBK (dblwords)
          MRSOCISC PLXCOPY monitor record.
          MRMTRISC PLXCOPY monitor record.
          Mapping for entry in socket array

     SCKARY DSECT
    Top of page

    Hex   Dec Type/Val   Lng Label (dup)    Comments
    ---- ---- --------- ---- -------------- --------
    0000    0 Structure      SCKARY         Socket control block
    0000    0 Address      4 SCKARY_ADDR    Address of SCKBK
    0004    4 Signed       2 SCKARY_CINST   Current instance number
    0006    6 Bitstring    1 SCKARY_FLAG    Array flag byte
              1... ....      SCKARY_INVHN   X'80' SCKARY_INVHN Handle is not
                                            valid
    0007    7 Bitstring    1 *              Reserved
              00000008       SCKARLN        (*-SCKARY) Size of array entry
              00000001       SCKARSZ        (SCKARLN+7)/8 Size of array entry
                                            in DWs
              00000009       SCKARXSF       9 Socket array index shift factor
                                            (2**SCKARXSF sockets/page)
              00000003       SCKARPSF       3 Socket array page shift factor
                                            (2**SCKARPSF bytes/array entry)

SCKBK Storage Layout | Top of page

    *** SCKBK - Socket control block
    *
    *     +-------------------------------------------------------+
    *   0 |                       SCKPORT                         |
    *     +-------------+-------------+---------------------------+
    *   8 |  SCKINDEX   |  SCKINSTN   |          SCKNUM           |
    *     +-------------+-------------+---------------------------+
    *  10 |                       SCKCTOD                         |
    *     +---------------------------+---------------------------+
    *  18 |         SCKFPTR           |         SCKBPTR           |
    *     +---------------------------+---------------------------+
    *  20 |                                                       |
    *     =                       SCKNAME                         =
    *     |                                                       |
    *     +---------------------------+------+------+------+------+
    *  40 |         SCKNLEN           |:STAT |:FLAGS|:FLAG2|:TYPE |
    *     +---------------------------+------+------+------+------+
    *  48 |         SCKLIMIT          |         SCKMASK           |
    *     +---------------------------+---------------------------+
    *  50 |         SCKVMDBK          |         SCKRXQUE          |
    *     +---------------------------+---------------------------+
    *  58 |                                                       |
    *     =                       SCKILOCK                        =
    *     |                                                       |
    *     +-------------------------------------------------------+
    *  70 |                                                       |
    *     =                       SCKLKWRD                        =
    *     |                                                       |
    *     +-------------------------------------------------------+
    *  88 |///////////////////////////////////////////////////////|
    *     =///////////////////////////////////////////////////////=
    *     |///////////////////////////////////////////////////////|
    *     +-------------------------------------------------------+
    *  A0 |                                                       |
    *     =                       SCKQUEBK                        =
    *     |                                                       |
    *     +---------------------------+---------------------------+
    *  D0 |         SCKMSGID          |         SCKCHAIN          |
    *     +---------------------------+---------------------------+
    *  D8 |                       SCKACTOD                        |
    *     +---------------------------+---------------------------+
    *  E0 |         SCKCNRQU          |         SCKCNNUM          |
    *     +---------------------------+---------------------------+
    *  E8 |                       SCKASSOC                        |
    *     +---------------------------+---------------------------+
    *  F0 |         SCKIQCTR          |         SCKREECB          |
    *     +---------------------------+---------------------------+
    *  F8 |         SCKOQUHD          |         SCKOQUTL          |
    *     +---------------------------+---------------------------+
    * 100 |         SCKECBBK          |         SCKACECB          |
    *     +---------------------------+---------------------------+
    * 108 |///////////////////////////|         SCKCLOSE          |
    *     +---------------------------+---------------------------+
    * 110 |         SCKRCECB          |         SCKRCVR           |
    *     +---------------------------+---------------------------+
    * 118 |         SCKRPND           |         SCKRMSID          |
    *     +-------------+------+------+---------------------------+
    * 120 |  SCKCNTMO   |:PRIOR|//////|///////////////////////////|
    *     +-------------+------+------+---------------------------+
    * 128 |                       SCKTGTND                        |
    *     +-------------------------------------------------------+
    * 130 |                       SCKTGTSV                        |
    *     +-------------------------------------------------------+
    * 138 |                       SCKRXMSG                        |
    *     +-------------------------------------------------------+
    * 140 |                       SCKTXMSG                        |
    *     +-------------------------------------------------------+
    * 148 |                       SCKRXDSC                        |
    *     +-------------------------------------------------------+
    * 150 |                       SCKTXDSC                        |
    *     +-------------------------------------------------------+
    * 158 |                       SCKRXBYT                        |
    *     +-------------------------------------------------------+
    * 160 |                       SCKTXBYT                        |
    *     +-------------------------------------------------------+
    * 168 |///////////////////////////////////////////////////////|
    *     +-------------------------------------------------------+
    * 170 |                       SCKTXBUF                        |
    *     +-------------------------------------------------------+
    * 178 |                       SCKOUTSD                        |
    *     +-------------------------------------------------------+
    * 180 |                       SCKTHROT                        |
    *     +---------------------------+---------------------------+
    * 188 |         SCKMWAIT          |         SCKMOOO           |
    *     +---------------------------+---------------------------+
    * 190 |         SCKRXQCT          |///////////////////////////|
    *     +---------------------------+---------------------------+
    * 198 |///////////////////////////////////////////////////////|
    *     +-------------------------------------------------------+
    * 1A0
    *
    *** SCKBK - Socket control block

    *** SCKARY - Socket control block
    *
    *     +---------------------------+-------------+------+------+
    *   0 |       SCKARY_ADDR         |SCKARY_CINST |(006) |//////|
    *     +---------------------------+-------------+------+------+
    *   8
    *
    *** SCKARY - Socket control block

SCKBK Cross Reference | Top of page

    Symbol         Dspl Value
    -------------- ---- -----
    SCK_DGRAM      0047 00000002
    SCK_LISTEN     0047 00000000
    SCK_STREAM     0047 00000001
    SCKACECB       0104
    SCKACPLP       0044 00000005
    SCKACSCK       0046 10
    SCKACTOD       00D8
    SCKARLN        0007 00000008
    SCKARPSF       0007 00000003
    SCKARSZ        0007 00000001
    SCKARXSF       0007 00000009
    SCKARY_ADDR    0000
    SCKARY_CINST   0004
    SCKARY_FLAG    0006
    SCKARY_INVHN   0006 80
    SCKASSOC       00E8
    SCKBIND        0045 80
    SCKBKLN        0198 000001A0
    SCKBKSZ        0198 00000034
    SCKBPTR        001C
    SCKCHAIN       00D4
    SCKCLOSE       010C
    SCKCLPND       0044 00000007
    SCKCNET        0045 10
    SCKCNFLD       0044 00000006
    SCKCNNUM       00E4
    SCKCNRQU       00E0
    SCKCNTMO       0120
    SCKCTOD        0010
    SCKCTRLN       0180 00000050
    SCKCTRS        0138
    SCKDELIP       0044 00000003
    SCKECBBK       0100
    SCKEND         0198 000001A0
    SCKFLAGS       0045
    SCKFLAG2       0046
    SCKFPTR        0018
    SCKID          0008
    SCKIDLE        0044 00000000
    SCKILOCK       0058
    SCKINCNT       0046 20
    SCKINDEX       0008
    SCKINSTN       000A
    SCKIQCTR       00F0
    SCKLCLSE       0046 80
    SCKLIMIT       0048
    SCKLKWRD       0070
    SCKLSTN        0045 20
    SCKLTMSG       0046 08
    SCKMASK        004C
    SCKMOOO        018C
    SCKMSGID       00D0
    SCKMWAIT       0188
    SCKNAME        0020
    SCKNLEN        0040
    SCKNUM         000C
    SCKOQUHD       00F8
    SCKOQUTL       00FC
    SCKOUTSD       0178
    SCKPNDCL       0045 02
    SCKPORT        0000
    SCKPRIOR       0122
    SCKQSIZ        0088 00000006
    SCKQUEBK       00A0
    SCKRCECB       0110
    SCKRCLSE       0046 40
    SCKRCVR        0114
    SCKRECPN       0044 00000001
    SCKRECV        00F0
    SCKREECB       00F4
    SCKRMSID       011C
    SCKRPND        0118
    SCKRXBYT       0158
    SCKRXDSC       0148
    SCKRXMSG       0138
    SCKRXQCT       0190
    SCKRXQUE       0054
    SCKSEND        0044 00000002
    SCKSNAME       0045 40
    SCKSTAT        0044
    SCKTGT         0128
    SCKTGTND       0128
    SCKTGTSV       0130
    SCKTHROT       0180
    SCKTXBUF       0170
    SCKTXBYT       0160
    SCKTXDSC       0150
    SCKTXMSG       0140
    SCKTYPE        0047
    SCKVMDBK       0050
    SCKWCNT        0044 00000004

This information is based on z/VM 7.2.0 Last updated on 24 Jun 2020 at 09:30:20 EDT.
Copyright IBM Corporation, 1990, 2020