cdc:nos2.source:nam5871:nicnapx
Table of Contents
NICNAPX
Table Of Contents
- [00011] PROC NICNAPX
- [00054] PROC MGETS
- [00055] PROC NFOB
- [00056] PROC XTRACE
Source Code
- NICNAPX.txt
- *DECK NICNAPX
- USETEXT NIPDEF
- USETEXT SUPMSG
- USETEXT PARAMS
- USETEXT LLCB
- USETEXT AHEADER
- USETEXT ACKHEAD
- USETEXT NCNB
- USETEXT PT
- USETEXT STATTAB
- PROC NICNAPX; # SEND ICN/AP/R,ICN/AP/N,A OR ICN/EX/N,A #
- STARTIMS;
- #
- *1DC NICNAPX
- *
- * 1. PROC NAME AUTHOR DATE
- * NICNAPX A. BEN-ARTZI 82/05/05
- *
- * 2. FUNCTIONAL DESCRIPTION
- * SEND ICN/AP/A OR ICN/AP/N TO CCP
- *
- * 3. METHOD USED
- * ALLOCATE A BUFFER FOR THE MESSAGE
- * SET UP APPLICATION AND TEXT FIELDS
- * LINK MESSAGE TO PIP OUTBOUND CHAIN
- * NORMAL OR ABNORMAL ARE DETERMINED BY REASON CODE
- *
- * 4. ENTRY PARAMETERS
- * PARAMS1 - CONNECTION NUMBER
- * PARAMS2 - LLCB ADDRESS
- * PARAMS3 - REASON CODE FOR THE ICN/AP/A
- *
- * 5. EXIT PARAMETERS
- * NONE
- *
- * 6. COMDECKS CALLED AND SYMPL TEXTS USED
- * NIPDEF SUPMSG PARAMS LLCB AHEADER
- *
- * 7. ROUTINES AND OVERLAYS CALLED
- * XTRACE - TRACE PROCEDURE CALL
- * MGETS - ALLOCATE A BUFFER
- * NFOB - LINK BUFFER TO PIP OUTBOUND CHAIN
- *
- * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
- * THIS PROCEDURE IS CALLED BY SECONDARY OVERLAY COMPCON.
- *
- #
- STOPIMS;
- #
- EXTERNAL REFERENCES
- #
- XREF
- BEGIN
- PROC MGETS; # GET BUFFER #
- PROC NFOB; # SEND DATA TO NETWORK #
- PROC XTRACE; # TRACE CALL #
- END
- #
- LOCAL VARIABLES
- #
- ITEM CN; # CONNECTION NUMBER #
- ITEM ACKQSIZE; # ACK QUEUE BUFFER SIZE #
- ITEM BUFADDR; # ACK QUEUE BUFFER ADDRESS #
- ITEM TLC; # TEXT LENGTH IN CHARACTERS #
- ARRAY SMWORD[0:0] S(1);
- BEGIN # FIRST WORD OF INCOMING SM #
- ITEM PFCSFCV U(00,00,16); # PFC/SFC #
- ITEM PFCSFCA B(00,08,01); # ERROR RESPONSE BIT #
- ITEM PFCSFCN B(00,09,01); # NORMAL RESPONSE BIT #
- END
- BEGIN # NICNAPX #
- CONTROL EJECT;
- CONTROL IFEQ DEBUG,1;
- XTRACE("CNAPX"); # TRACE CALL #
- CONTROL FI;
- P<AHEADER> = PARAMS1+BLKHSIZE; # FWA OF SM ABH #
- P<SUPMSG> = P<AHEADER>+ABHSIZE; # FWA OF SM #
- P<SMNIP> = P<SUPMSG>;
- P<SMNVF> = P<SUPMSG>;
- P<NCNB> = PARAMS4; # FWA OF NCNB #
- P<LLCB> = PARAMS2;
- IF P<NCNB> NQ 0
- THEN # NCNB EXISTS, CR/IAP/N OR CR/RAP/N OR CR/RAP/A #
- BEGIN
- CN = NCNBCN[0]; # CONNECTION NUMBER #
- IF SFC[0] EQ IAP
- THEN # ITS A CR/IAP/N#
- PFCSFCV[0] = ICNAP;
- ELSE # ITS A CR/RAP/N OR CR/RAP/A #
- BEGIN # SEND ICN/EX OR ICN/AP RESPONSE #
- IF NCNBX25[0]
- THEN # ITS A X.25 A-A CONNECTION #
- PFCSFCV[0] = ICNEXN; # PRESET TO ICN/EX/N #
- ELSE # ITS A A-A CONNECTION OVER H-H LINK #
- PFCSFCV[0] = ICNAPN; # PRESET TO ICN/AP/N #
- IF RB[0]
- THEN # ITS A CR/RAP/N FROM NVF #
- BEGIN # SET DOWNLINE BLOCK LIMIT, BUILD ACK QUEUE #
- NCNBDBL[0] = ICNADBL[0]; # ICN FORMAT = CR FORMAT #
- ACKQSIZE = NCNBDBL[0]+ACKHSIZE; # ACK QUEUE SIZE #
- MGETS(ACKQSIZE,BUFADDR,TRUE); # GET ACK QUEUE BUFFER #
- P<ACKHEAD> = BUFADDR; # FWA OF ACK QUEUE #
- ACKQID[0] = ACKQIDVALUE; # SET BLOCK IDENTIFIER #
- ACKNCNB[0] = P<NCNB>; # SET CORR NCNB ADDRESS #
- NCNBAKIN[0] = 0; # SET IN PTR #
- NCNBAKOU[0] = 0; # SET OUT PTR #
- NCNBACKQ[0] = BUFADDR; # SET ADDRESS OF ACK QUEUE #
- IF CRAPRI[0]
- THEN # ITS A HIGH PRIORITY CONNECTION #
- NCNBPRI[0] = 1;
- ELSE # ITS A LOW PRIORITY CONNECTION #
- NCNBPRI[0] = 2;
- IF LLCBNRL[0] EQ BUFLSM# BUFFER REGULATION LEVEL 1 #
- THEN
- BEGIN
- NCNBNR[0] = TRUE; # PUT NCNB IN REGULATION #
- END
- ELSE
- BEGIN
- IF LLCBNRL[0] EQ BUFLHDS # BUFFER REGULATION LEVEL 2 #
- THEN
- BEGIN
- IF NCNBPRI[0] EQ 2 # LOW PRIORITY DATA #
- THEN
- BEGIN
- NCNBNR[0] = TRUE; # PUT NCNB IN REGULATION #
- END
- END
- END
- CONTROL IFEQ STAT,1;
- ST$AQ = ST$AQ+1; # INCREMENT ACK QUEUE COUNT #
- CONTROL FI;
- END
- END
- END
- ELSE # SET ERROR RESPONSE, REJECT ICN/AP/R OR ICN/EX/R #
- BEGIN
- PFCSFCV[0] = PFCSFC[0] ;
- CN = ICNCN[0] ;
- END
- IF PARAMS3 NQ 0
- THEN # ERROR RESPONSE REASON CODE #
- BEGIN
- PFCSFCN[0] = FALSE; # CLEAR NORMAL RESPONSE BIT #
- PFCSFCA[0] = TRUE; # SET ERROR RESPONSE BIT #
- END
- IF PFCSFCV[0] NQ ICNAP # NOT AN ICN/AP/R FROM NIP #
- AND PFCSFCV[0] NQ ICNEXN # NOT AN ICN/EX/N TO NETWORK #
- THEN # SEND ONE WORD RESPONSE ONLY #
- BEGIN # SEND ICN/AP/N OR ICN/EX/A OR ICN/AP/A #
- MGETS(LICNAP+BLKHSIZE+ABHSIZE,BUFADDR,TRUE);
- TLC = LICNAPA;
- END
- ELSE # ITS ICN/AP/R OR ICN/EX/N #
- BEGIN # USE CR/IAP/N OR CR/RAP/N BUFFER #
- TLC = (ABHTLC[0]*15)/2; # CONVERT TO ASCII CHARACTER COUNT #
- IF PFCSFCV[0] EQ ICNEXN
- THEN
- BEGIN
- TLC = TLC - 1; # LESS ONE EXTRA OCTET FOR A 3 WORD #
- END # INCNEXN #
- ELSE
- BEGIN
- IF PFCSFCV[0] EQ ICNAP # IF ICNAP #
- THEN
- BEGIN
- TLC = CRBYTE; # EXTRACT CHARACTER COUNT FROM #
- END # CRIAPN #
- END
- BUFADDR = PARAMS1; # REUSE CR/IAP/N OR CR/RAP/N BUFFER #
- END
- P<AHEADER> = BUFADDR+BLKHSIZE;
- P<SUPMSG> = P<AHEADER>+ABHSIZE;
- P<SMNIP> = P<SUPMSG>; # RESET BASED POINTERS #
- ABHABT[0] = APPCMD;
- ABHACT[0] = CT8ASCII;
- ABHTLC[0] = TLC;
- PFCSFC[0] = PFCSFCV[0];
- ICNCN[0] = CN;
- ICNRAP[0] = PARAMS3; # REASON CODE IF AN ERROR RESPONSE #
- NFOB(BUFADDR,PARAMS2); # SEND SM TO NETWORK #
- RETURN;
- END # NICNAPX #
- TERM
cdc/nos2.source/nam5871/nicnapx.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator