Source code of HPW routine I25561

Client program that runs on Host

 

*********************************************************************
*
*                                I25561
*
*                        TCP/IP Password Client
*
*             Written by William van den Heuvel, 1998
*
*             Update: 1998-11-10
*
*********************************************************************
*
* This program is a TCP/IP client that requests Password services.
*
* The program submits the request by sending a TCP/IP message
* to the Password server on the host.
* The Password server (I25560) always returns a single reply message.
*
***********************************************************************
*
* on entry,
* register 1 points to a fullword that contains the address
* of the PARM string.
*
* The PARM string is made by the Operating System when the PARM=
* keyword was found on the EXEC statement.
* The PARM string is a character string with a 2-byte length prefix
* that shows the number of bytes that follow.
* If there was no PARM string on the EXEC statement then the System
* makes a dummy PARM string: in this case the 2-byte length prefix
* contains 0.
*
*......................................................................
*
* This is the main entry point of the program.
* It's purpose is to accept and parse input parameters from the PARM
* string and then call I255611 passing the parsed parameters.
*
* Currently, the PARM string is not used and is therefore ignored.
*
*......................................................................
*
* on completion,
* register 15 will contain a return code (RC):
*
* RC=0 - normal completion (always)
*
***********************************************************************




**********************************************************************
*
I25561   CSECT
I25561   AMODE ANY
I25561   RMODE ANY
*
R0       EQU   0
R1       EQU   1
R2       EQU   2
R3       EQU   3
R4       EQU   4
R5       EQU   5
R6       EQU   6
R7       EQU   7
R8       EQU   8
R9       EQU   9
R10      EQU   10   PARM - address of pointer to PARM-string)
R11      EQU   11   BASE - base register of this program
R12      EQU   12   CAA  - reserved for LE
R13      EQU   13   DSA  - Dynamic Storage Area
R14      EQU   14   return address
R15      EQU   15   entry point address
*
DSA      EQU   R13
CAA      EQU   R12
BASE     EQU   R11
PARM     EQU   R10
API      EQU   R9         API parameters
*
         USING PARM_DSECT,PARM
         USING DSA_DSECT,DSA
         USING API_DSECT,API
*
*********************************************************************



*********************************************************************
*
         LEMENTRY BASE=BASE,LENGTH=DSA_DSECT_LENGTH,PARAM=PARM,TRACE=0
*
* note:
*        PARM -> PARM_DSECT
*        DSA  -> DSA_DSECT
*
***********************************************************************
*
         LEMTRACE 0,'I25561: entry'
*
***********************************************************************
*
*        make API parameters
*
         XC    DSA_API,DSA_API                     clear API
         LA    API,DSA_API                         address API
*
*        set parameters passed by user (parsed from PARM string)
         MVC   API_CONNECT_IP,USER_IP            server IP-address
         MVC   API_CONNECT_PORT,USER_PORT        server port number
         MVC   API_MAXSOC,USER_MAXSOC            number of sockets
*
***********************************************************************
*
*        call I255611 passing API
*
         LR    R1,API
         L     R15,=V(I255611)
         BASR  R14,R15
*
***********************************************************************
*
         LEMTRACE 0,'I25561: exit'
*
***********************************************************************
*
*        return to caller
*
         LEMEXIT
*
*********************************************************************



***********************************************************************
*
* The following is the information that can be passed by the user
* via the PARM string.
*
* The parsing of the PARM string is not yet implemented
* hence the "user" information is temporarily specified as constants.
*
* The port number is always 11111
*
* The IP-address is:
* S91 = 10.138.165.9  (maintenance machine "G")
* S51 = 10.138.165.33 (test machine "T")
*
USER_IP      DC AL1(10,138,165,9)    IP-address of server S91
****_IP      DC AL1(10,138,165,33)   IP-address of server S51
****_PORT    DC H'11111'             port number on server 11111
USER_PORT    DC H'11110'             port number on server 11111
USER_MAXSOC  DC H'10'                maximum sockets
*
*********************************************************************





***********************************************************************
*
* DSA - Dynamic Storage Area (pointed to by register 13)
*
DSA_DSECT  LEMDSA
*
*......................................................................
*
           DS   0D   D-align what follows
DSA_API    DS   XL256   API to be passed to I25561
*
*......................................................................
*
           DS   0D   D-align what follows
DSA_DSECT_LENGTH EQU  *-DSA_DSECT
*
***********************************************************************
*
* PARM - parameters passed by caller via register 1
* this dsect is address via register PARM
*
PARM_DSECT   DSECT
PARM_STRING  DS  A  pointer to LL-string
*
***********************************************************************
*
* API - parameters passed between modules
* this dsect is address via register API
*
API_DSECT      DSECT
*
* following fields are set by I25561:
API_MAXSOC       DS  H    maximum number of sockets         for INITAPI
API_CONNECT_IP   DS  XL4 IP-address of server               for CONNECT
API_CONNECT_PORT DS  H   port number of server              for CONNECT
*
***********************************************************************
        END