z/OS Communications Server: IP Programmer's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Applications in a common INET environment

z/OS Communications Server: IP Programmer's Guide and Reference
SC27-3659-02

When a generic application in a common INET environment creates a socket, UNIX System Services creates socket sub-instances to each active TCP/IP instance. When the application then issues an IOCTL on its socket, UNIX System Services propagates the IOCTL to all active TCP/IP instances until the sockets all indicate that the IOCTL was successful. If a TCP/IP instance indicates a failure, IOCTL processing stops at that point and a failure return value, return code, and reason code are returned to the application. If the generic application issues a SIOCSMOCTL attach request and encounters a failure, some TCP/IP instances might have access to the shared memory object, and some might not. For problem determination purposes, all TCP/IP instances should gain access to the shared memory object, or no TCP/IP instances should gain access to it. When a SIOCSMOCTL attach request fails in a common INET environment, the application should immediately issue a SIOCSMOCTL detach request to ensure that no TCP/IP instance has access to the shared memory object and should thereafter not set a value in the AioCommBuff bit in the AIOCB.

A generic application in a common INET environment can use the SOCK#SO_EIOIFNEWTP socket option on its listening socket so that the application is notified when a TCP/IP instance is stopped and restarted. When a TCP/IP instance is recycled, the application's response is to close the listening socket and create a new listening socket, which cause new listening socket sub-instances to each active TCP/IP instance to be created. The application should do the following to ensure that the recycled TCP/IP instance gains access to the shared memory object and that the other TCP/IP instances retain their access to the share memory object:

  1. After the new listening socket is created, create a new ancillary socket (which is propagated to all active TCP/IP instances).
  2. Issue a SIOCSMOCTL attach request for the shared memory object on the new ancillary socket.
  3. Close the original ancillary socket descriptor.
  4. Perform the Steps for creating an ancillary socket to ensure that the new ancillary socket is not closed until all stream sockets that might reference the shared memory object are closed.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014