*DECK NPNIPSM
USETEXT NIPDEF
USETEXT DRHDR
USETEXT MSGIDX
USETEXT OVERLAY
USETEXT PARAMP
USETEXT PARAMS
USETEXT SUPMSG
USETEXT PT
USETEXT LLCB
USETEXT NHEADER
USETEXT NBT
PROC NPNIPSM(BUFADDR,ERROR);
STARTIMS;
#
*1DC NPNIPSM
*
* 1. PROC NAME AUTHOR DATE
* NPNIPSM C. BITTNER 82/06/18
*
* 2. FUNCTIONAL DESCRIPTION
* PROCESS MESSAGES FOR NIP FROM PIP INBOUND BUFFER
* AND A-A MESSAGE QUEUE.
*
* 3. METHOD USED
* MATCH PFCSFC AND JUMP TO CORRESPONDING ACTION
* ORDINAL.
*
* 4. ENTRY PARAMETERS
* BUFADDR - ADDRESS OF MESSAGE BLOCK
*
* 5. EXIT PARAMETERS
* ERROR - FLAG SET TO TRUE IF GARBAGE MESSAGE
*
* 6. SYMPL TEXTS USED
* NIPDEF DRHDR
* PARAMP PARAMS
* OVERLAY SUPMSG
* LLCB NHEADER
*
* 7. ROUTINES CALLED
* LOCLLCB - LOCATE LLCB
* NCSTTP - NETWORK CONNECTION STATE TABLE
* OVLCALL - LOAD AND EXECUTE OVERLAY
* XTRACE - TRACE PROCEDURE CALL
*
*
* 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
* THIS PROCEDURE IS CALLED BY NEIB1.
*
#
STOPIMS;
#
INPUT PARAMETERS
#
ITEM BUFADDR; # ADDRESS OF MESSAGE BLOCK #
ITEM ERROR B; # GARBAGE MESSAGE FLAG RETURNED #
#
EXTERNAL VARIABLES
#
XREF
BEGIN
PROC LOCLLCB; # LOCATE LLCB #
PROC NCSTTP; # NETWORK CONNECTION STATE TABLE #
PROC OMSG; # ISSUE DAYFILE MESSAGE #
PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
PROC XTRACE; # TRACE PROCEDURE CALL #
END
#
INTERNAL VARIABLES
#
DEF ENDTAB #19#; # SIZE OF PFC/SFC TABLE #
ITEM NCSTRIG; # NCSTTP TRIGGER #
ITEM I; # INDEX INTO PFC/SFC JUMP TABLE #
ITEM NCN; # CONNECTION NUMBER #
ITEM BADNBLK B; # FLAG FOR BAD NETWORK BLOCK #
ITEM FOUND B; # FLAG FOR LOCATING THE NBT ENTRY #
ITEM INDIX; # LOOP INDEX #
ARRAY PFCSFCTAB [0:ENDTAB];
BEGIN
ITEM NIPSMFC U(00,00,16) =
[ICNTE,TCNTAN,TCNTA,ICNAP,ICNEX,ICNAPN,
REGLL,REGCP,REGST,ESTOFF,CHCTE,NPIDD,NPIPP,
TOTBTS,HOPSEND,REGHH,ICNAPA,HECP,INIDMDI,
0];
ITEM OVL$TRIG U(0,16,12) =
[RICNTER,RTCNTAN,RTCNTAR,RICNAPR,RICNAPR,RICNAPN,
,,,,RCHCTEU,,,
,,,RICNAPA,,,
0];
END
SWITCH SMCASEJT C1,C1,C1,C1,C1,C1,
C01,C02,C03,C06,C1,C09,C09,
C07,C08,C04,C1,C05,C10,
C3;
BEGIN
CONTROL IFEQ DEBUG,1;
XTRACE("NIPSM");
CONTROL FI;
ERROR = FALSE;
P<DRHDRWD> = BUFADDR;
P<SUPMSG> = P<DRHDRWD> + BLKHSIZE + NBHSIZE;
NIPSMFC[ENDTAB] = PFCSFC[0]; # GUARANTEE A MATCH #
FOR I=0 WHILE NIPSMFC[I] NQ PFCSFC[0]
DO # FIND MATCHING PFCSFC #
BEGIN
I = I + 1;
END
GOTO SMCASEJT[I]; # JUMP ON ACTION ORDINAL #
C01:
OVLNAME = NPREGLLP; # OVERLAY NAME #
PARAMS5 = FALSE; # FLAG FOR ERROR #
PARAMP1 = P<DRHDRWD>;
OVLCALL; # LOAD AND EXECUTE OVERLAY #
IF PARAMS5 # IF ERROR OCCURS #
THEN
GOTO C3; # DISCARD REGLL #
ELSE
GOTO EXIT; # NORMAL EXIT #
C02:
OVLNAME = NPREGCPP; # OVERLAY NAME #
GOTO C0;
C03:
OVLNAME = NPREGSTP;
GOTO C0;
C04:
OVLNAME = NPREGHHP;
GOTO C0;
C05:
OVLNAME = NPHECPP;
GOTO C0;
C06:
OVLNAME = NPESTOFP;
PARAMP2 = 0;
GOTO C0;
C07:
OVLNAME = NTOTBTSP;
GOTO C0;
C08:
OVLNAME = NPHOPMSP;
GOTO C0;
C09:
OVLNAME = NPNPIDDP ;
GOTO C0;
C10:
OVLNAME = NPININDP;
GOTO C0;
C0:
#
CALL PRIMARY OVERLAY TO PROCESS SM
#
PARAMP1 = P<DRHDRWD>;
OVLCALL; # LOAD AND EXECUTE OVERLAY #
GOTO EXIT;
C1:
#
CALL NCSTTP
#
P<NHEADER> = P<DRHDRWD> + BLKHSIZE;
LOCLLCB(DN[0],SN[0],P<LLCB>); # LOCATE LLCB #
IF P<LLCB> NQ 0
THEN
BEGIN
P<SMNIP> = P<SUPMSG>; # BASE SM #
NCN = ICNCN[0]; # CN FOR ICN/TCN/CHC #
IF PFCSFC[0] EQ TCNTA
THEN
BEGIN
RCBRK = TCNRC[0]; # SAVE REASON CODE #
END
IF PFCSFC[0] EQ ICNTE # ICNTE MESSAGE #
THEN
BEGIN
FOUND = FALSE;
FOR INDIX = 0 STEP NBTFETNO WHILE NOT FOUND AND INDIX LQ
NBTMAXID
DO
BEGIN
IF NBTIUF[INDIX] AND NBTHN[INDIX] EQ DN[0]
THEN
BEGIN
FOUND = TRUE;
IF NBTET[INDIX] EQ "ND" # IF MDI #
THEN
BEGIN
ICNNET[0] = TRUE; # SET CDCNET FLAG #
END
END
END
END
NCSTRIG = OVL$TRIG[I]; # SET NCSTTP TRIGGER #
NCSTTP(P<LLCB>,NCN,NCSTRIG,P<DRHDRWD>);
GOTO EXIT;
END
ELSE
GOTO C3; # PROCESS GARBAGE MESSAGE #
C3:
#
PROCESS GARBAGE MESSAGE
#
ERROR = TRUE;
EXIT:
RETURN;
END
TERM