* * Local Port and Limited Server Enhancements * * TPNS Version 3 Release 5 Service Level 9711 * APARs PQ14597, PQ14602, PQ16617, PQ16840 recommended * * Updated 6/12/98, to change offsets in ITPDSP to * avoid overlaying areas used when * running SNA simulations. * * This zap provides two enhancements to the TPNS TCP/IP * simulation support. * * The first enhancement allows the specification of the * local port number to be used by a Simple TCP (STCP) or * Simple UDP (SUDP) device instead of having that port * automatically assigned by TCP/IP. After the socket * has been obtained, TPNS will BIND that socket to the * specified local port. * * The second enhancement builds on the first and provides * a limited server simulation function. After BINDing * to the specified local port, TPNS can accept a connection * (STCP) or wait to receive data (SUDP). For STCP, only * one connection at a time can be processed, and TPNS closes * the listen socket between connections. For SUDP, an exit * (see below) is provided to glean the address associated * with the sender of an incoming message and to set the * address of the recipient for an outgoing message. * * To specify the local port to be used by a particular * simulated client or server, code the following two operands * on the DEV statement for that resource: * * TRANS=YES indicating that a specific * Local Port is to be used; * BLKDLY=Fxxxxx where xxxxx is the decimal * value of the local port to * be used; the F must be * included as shown. * * To specify that a particular DEV is to act as a limited * server, code the following operand on the DEV statement * for that resource: * * RTR=YES indicating that the DEV should * wait for an incoming connection * before generating any message. * * Note1: RTR=YES should not be coded unless TRANS=YES and * BLKDLY=Fn are also coded. This is not enforced but * unpredictable results will be obtained if the * restriction is not observed. * * Note2: All these operands MUST be coded ON THE DEV statement * to be effective. They will not default from higher * levels, even though in other circumstances the same * operands would so default. * * Note3: Clearly these operands are not normally valid on a * DEV following a TCPIP statement. Ignore their normal * meanings when using them on such a DEV. If this * enhancement is later supplied in other than zap * form, new operands will very likely be introduced * in lieu of these. * * Note4: For a DEV with TYPE=STCP and RTR=YES, the SERVADDR * and PORT operands, while they must have valid values, * are not used. For a DEV with TYPE=UDP and RTR=YES, * the SERVADDR and PORT are used as the destination * of all datagrams transmitted by the server. They * can be modified dynamically by the script for * particular messages using the ITPGSIPA exit described * below. * * * Associated Available User Exits * * In addition to this zap, two TPNS User Exits are available * that may be useful. These are available in separate files * and should be installed in accordance with directions in * the TPNS User Exits publication (SC31-6071). * * The ITPGSIPA exit can particularly helpful in a UDP server * environment. When specified as an input exit (INEXIT=ITPGSIPA * on the NTWRK statement) it will cause the full INET address * (including IP and port addresses) of the sender of each * message received by an STCP or SUDP device to be placed in * network save area 13. This address can be saved using an STL * ONIN scripting statement or an IF statement with WHEN=IN in * the TPNS Scripting Language. * * The same exit can also be specified in an STL script as * USEREXIT('ITPGSIPA') or in a TPNS Scripting Language script * as EXIT NAME=ITPGSIPA to cause the contents of network save * area 13 to be set as the address for the next message to be * transmitted by the UDP device (or the next connection to be * made by an STCP client). * * In addition, an information exit, ITPWR47X, is available to * write ITP477I and ITP478I informational messages, which are * the messaes logged when TCP/IP indicates any type of socket * call error, to the operator as well as to the TPNS log. * Use of this exit would be specified by coding * INFOEXIT=ITPWR47X on the NTWRK statement. * * Further information about these exits is available in the * separate jobs provided to install them.