cdc:nos2.source:nam5871:hvllcb
Table of Contents
HVLLCB
Table Of Contents
- [00014] PRGM HVLLCB
- [00063] PROC LOCLLCB
- [00064] PROC XTRACE
- [00065] PROC OVLCALL
- [00066] PROC BLINK
- [00067] PROC MGETS
- [00068] PROC OSCHAPP
Source Code
- HVLLCB.txt
- *DECK HVLLCB
- USETEXT NIPDEF
- USETEXT PARAMP
- USETEXT PARAMS
- USETEXT SUPMSG
- USETEXT PT
- USETEXT TNT
- USETEXT AT
- USETEXT ACB
- USETEXT ACNB
- USETEXT LLCB
- USETEXT NCNT
- USETEXT OVERLAY
- PRGM HVLLCB; # VALIDATE LLCB AND SELECT CONNECTION #
- STARTIMS;
- #
- *1DC HVLLLCB
- *
- * 1. PROC NAME AUTHOR DATE
- * HVLLCB A. BEN-ARZI 82/05/05
- *
- * 2. FUNCTIONAL DESCRIPTION
- * VALIDATE LOGICAL LINK AND SELECT CONNECTION NUMBER
- *
- * 3. METHOD USED
- * - VALIDATE THE LOGICAL LINK IN CR/IAP/N
- * - IF NOT EXISTING RETURN ADDRESS = 0 SEND CR/IAP/R TO NVF
- * WITH A SPECIAL FORMAT OF A "RETRY" CASE.
- * - IF IT EXISTS CHOOSE A CONNECTION NUMBER, USING THE RULE -
- *
- * * IF SN < DN START LOOKING FROM CN=1
- * * IF SN > DN START LOOKING FROM CN=255
- *
- * 4. ENTRY PARAMETERS
- * PARAMP1 - ADDRESS OF CR/IAP/N MESSAGE FROM NVF
- * PARAMP2 - ADDRESS OF THE CONNECTION-S ACNB
- *
- * 5. EXIT PARAMETERS
- * PARAMP3 - LLCB ADDRESS
- * PARAMP4 - NUMBER OF CONNECTION TO USE
- *
- * 6. COMDECKS CALLED AND SYMPL TEXTS USED
- * NIPDEF SUPMSG PT OPSIZE
- * LLCB PARAMP PARAMS NCNT
- *
- * 7. ROUTINES CALLED
- * LOCLLCB - FIND LLCB ADDRESS
- * XTRACE - TRACE PROCEDURE CALL
- * OVLCALL - LOAD AND EXECUTE OVERLAY
- *
- * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
- * THIS PROGRAM IS A PRIMARY OVERLAY CALLED BY HCSTTP.
- * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
- *CALL OPSIZE
- *
- #
- STOPIMS;
- #
- EXTERNAL VARIABLES
- #
- XREF
- BEGIN
- PROC LOCLLCB; # LOCATE LLCB #
- PROC XTRACE ; # DEBUG TRACE CALL #
- PROC OVLCALL; # LOAD AND EXECUTE AN OVERLAY #
- PROC BLINK ; # SEND MESSAGE TO APPLICATION #
- PROC MGETS ; # GET A BUFFER #
- PROC OSCHAPP; # SCHEDULE APPLICATION #
- LABEL RJMAIN;
- END
- #
- INTERNAL VARIABLES
- #
- ITEM COUNT ;
- ITEM LLCBAD ; # LOGICAL LINK ADDRESS #
- ITEM TEMPLL ; # LAST LOGICAL LINK ADDRESS #
- ITEM I ; # LOOP INDEX #
- ITEM FIRST ; # FIRST CONNECTION TO START LOOKING FROM #
- ITEM STPSZ ; # STEP DIRECTION (+1 OR -1) #
- ITEM FOUND B; # LOOP TERMINATOR WHEN WE FIND THE REQUESTED CONN#
- ARRAY CNX;
- BEGIN
- ITEM NCN U(0,0,60); # NETWORK CONNECTION NUMBER #
- ITEM CN1 U(0,52,4); # INDEX TO NCNT #
- ITEM CN2 U(0,56,4); # INDEX TO NCNB #
- END
- #**********************************************************************#
- BEGIN
- CONTROL IFEQ DEBUG,1;
- XTRACE("VLLCB") ;
- CONTROL FI ;
- LLCBAD = 0 ; # PRE - SETTING #
- FOUND = FALSE ;
- PARAMS1 = 0 ;
- PARAMP3 = 0 ;
- P<SUPMSG> = PARAMP1 + BLKHSIZE + AIPHSIZE ;
- P<SMNVF> = P<SUPMSG> ; # CR/IAP/N FROM NVF #
- IF CRISNOD[0] EQ 0 AND CRIDNOD[0] EQ 0
- THEN # THIS IS INTRA HOST #
- BEGIN
- IF TNTLLAD[0] EQ 0
- THEN # NO INTRA HOST DUMMY LLCB YET #
- BEGIN
- MGETS(LLCBSIZE,LLCBAD,TRUE) ;
- P<LLCB> = LLCBAD ;
- LLCBID [0] = LLCBIDVALUE ; # FORMAT BASIC FIELDS #
- LLCBHN [0] = 0 ;
- LLCBTN [0] = 1 ;
- LLCBHH[0] = TRUE ;
- LLCBHRL[0]= 3 ;
- LLCBNRL[0]= 3 ;
- LLCBFP [0] = 0 ; # THIS IS THE LAST IN THE LLCB-RING #
- IF TNTNLL[1] NQ 0
- THEN # BUT IT IS NOT THE FIRST #
- BEGIN
- P<LLCB> = TNTLLAD[1] ; # THIS IS THE FIRST #
- FOR I = 1 STEP 1 WHILE LLCBFP[0] NQ 0 DO
- BEGIN
- P<LLCB> = LLCBFP[0] ; # THAT IS THE NEXT #
- END
- LLCBFP[0] = LLCBAD ; # CAIN TO NEW ONE #
- TEMPLL = P<LLCB> ;
- P<LLCB> = LLCBAD ;
- LLCBBP[0] = TEMPLL ; # AND CHAIN BACK #
- END
- ELSE
- BEGIN
- TNTLLAD[1] = LLCBAD; # STORE LLCB ADDR IN TNT TABLE #
- LLCBBP[0] = 0 ; # IT IS THE FIRST ONE #
- END
- TNTNLL[1] = TNTNLL[1] + 1 ;
- MGETS(LLCBSIZE,LLCBAD,TRUE) ;
- P<LLCB> = LLCBAD ; # THIS IS THE SECOND DUMMY #
- LLCBID [0] = LLCBIDVALUE ;
- LLCBHN [0] = 1 ;
- LLCBTN [0] = 0 ;
- LLCBHH[0] = TRUE ;
- LLCBHRL[0]= 3 ;
- LLCBNRL[0]= 3 ;
- LLCBFP [0] = 0 ;
- LLCBBP [0] = 0 ; # CANNOT BE MORE THAN 1 LIKE THIS #
- TNTNLL [0] = 1 ;
- TNTLLAD[0] = LLCBAD ;
- END
- ELSE
- LLCBAD = TNTLLAD[0] ;
- END
- ELSE
- LOCLLCB(CRISNOD[0],CRIDNOD[0],LLCBAD) ;
- P<LLCB> = LLCBAD ;
- IF P<LLCB> EQ 0 # NO LLCB AVAILABLE #
- OR ( LLCBAD NQ 0 AND LLCBWOF[0] ) # LLCB BUT FAILURE IN #
- # PROGRESS #
- THEN
- BEGIN # NO SUCH LLCB EXISTS #
- PARAMS1 = RCIA"NLL" ; # REASON CODE = 35, NO LLCB EXISTS #
- END
- # #
- ELSE
- # #
- BEGIN # THIS LOGICAL LINK EXISTS.LET"S CHOOSE A CONNECTION #
- PARAMP3 = LLCBAD ;
- P<LLCB> = LLCBAD ; # BASE LLCB #
- IF CRISNOD[0] GR CRIDNOD[0]
- THEN
- BEGIN # WE START LOOKING FROM HIGHEST CONNECTION#
- FIRST = 1 ; # START LOOKING FROM CONNECTION = 1 #
- STPSZ = 1 ;
- END
- ELSE
- BEGIN
- FIRST = LLCBESIZE * ( NCNTSIZE-NCNTHSIZE) - 1 ;
- STPSZ = -1 ; # SEARCH BACKWARDS #
- END
- #
- NOW LOOP FOR SEARCH UNTIL FIRST NCNB ADDRESS IS ZERO
- #
- COUNT = 0 ; # PRESET COUNT FROM 1 TO 255 #
- FOR I = FIRST STEP STPSZ WHILE ( NOT FOUND )
- AND COUNT LS
- ( ( LLCBESIZE *
- (NCNTSIZE - NCNTHSIZE)) - 1 )
- # COUNT ONLY GO FROM 1 TO 255 MAX #
- DO
- BEGIN
- NCN = I ; # TRY THIS CONNECTION NUMBER #
- COUNT = COUNT + 1 ;
- IF LLCBNCNT[LLCBHSIZE + CN1] EQ 0 # NO NCNT FOR THIS ENTRY#
- THEN
- FOUND = TRUE ;
- ELSE # THERE IS A NCNT EXISTING #
- BEGIN
- P<NCNT> = LLCBNCNT[LLCBHSIZE + CN1] ;
- IF NCNTNCNB[NCNTHSIZE + CN2] EQ 0 # NO NCNB TO NCNT ENTRY #
- THEN
- FOUND = TRUE ;
- END
- END # SEARCH LOOP #
- IF NOT FOUND # DID NOT FIND ANY ENTRY FOR NCNT #
- THEN
- BEGIN # NO NCNT AVAILABLE, SEND RC = TEMP #
- PARAMP3 = 0 ; # UNVAILABLE. #
- PARAMS1 = RCIA"NLL" ;
- END
- ELSE
- PARAMP4 = NCN ; # ENTRY FOUND #
- END # CONNECTION CHOOSING #
- # #
- IF PARAMS1 NQ 0
- THEN
- BEGIN # ERROR OCCURED #
- P<ACNB> = PARAMP2 ;
- PARAMS2 = ACNBACN[0] ; # APPLICATION CONNECTION NUMBER #
- PARAMS3 = 0 ; # APPLICATION NUMBER=0 MEANS NOT FIRST CALL #
- PARAMS4 = PARAMP2 ; # ACNB ADDRESS #
- PARAMS7 = 0; # NO EXTRA WORDS PASSED #
- OVLNAME = HCRIAPRP ; # OVERLAY TO SEND CR/IAP/R TO NVF #
- OVLCALL ; # LOAD AND EXECUTE OVERLAY #
- END # ERROR OCCURED #
- GOTO RJMAIN ;
- END # MAIN #
- TERM
cdc/nos2.source/nam5871/hvllcb.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator