*DECK NEIB1 USETEXT NIPDEF USETEXT DRHDR USETEXT NHEADER USETEXT NCNB USETEXT LLCB USETEXT NCNT USETEXT SUPMSG USETEXT AHEADER USETEXT ACB USETEXT ACNB USETEXT ACNT USETEXT AT USETEXT NBT USETEXT PT USETEXT STATTAB USETEXT OVERLAY USETEXT PARAMP USETEXT PARAMS PROC NEIB1 (BUFADDR,NBTHNN) ; STARTIMS; # *1DC NEIB1 * * 1. PROC NAME AUTHOR DATE * NEIB1 C. BITTNER 82/06/18 * * 2. FUNCTIONAL DESCRIPTION * CALL APPROPRIATE PROCESSOR TO PROCESS * MESSAGES IN THE PIP INBOUND BUFFER * AND MESSAGES IN THE A-A MESSAGE QUEUE. * * 3. METHOD USED * JUMP ON ACTION ORDINAL DERIVED FROM * PFC/SFC MATCH * * 4. ENTRY PARAMETERS * BUFADDR - ADDRESS OF MESSAGE BLOCK * NBTHNN - HOST NODE ON INBOUND BLOCK * NBTIDX - INDEX OF CURRENT NBT ENTRY BEING PROCESSED * * 5. EXIT PARAMETERS * NONE * * 6. SYMPL TEXTS USED * NIPDEF DRHDR * NHEADER NCNB * LLCB NCNT * SUPMSG AHEADER * ACB AT * NBT NETWORK BUFFER TABLE * PT STATTAB * OVERLAY PARAMP * ACNB ACNT * PIT PARAMS * * 7. ROUTINES CALLED * BLINK - LINK MESSAGE ON APPLICATION-S ACB * LOCLLCB - LOCATE LLCB * LOCNCNT - LOCATE NCNT ENTRY * NBSTTP - NETWORK BLOCK STATE TABLE * NPNIPSM - PROCESS NIP SM * NPPWL - PROCESS PRU WORKLIST FROM PIP * OSCHAPP - SCHEDULE APPLICATION * OVLCALL - LOAD AND EXECUTE OVERLAY * FINDPIT OVL ALLOCATE PIT ENTRY INDEX * NGIGO OVL PROCESS GARBAGE MESSAGE * HFASTQ - QUEUE UPLINE MESSAGE TO ACNB * MRELS - RELEASE BUFFER SPACE * XTRACE - TRACE PROCEDURE CALL * * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION * * THIS PROCEDURE IS CALLED BY NEIB. * # STOPIMS; # INPUT PARAMETERS # ITEM BUFADDR; # ADDRESS OF MSG BLOCK # ITEM NBTHNN ; # HOST NODE NUMBER FROM THE NBT # # EXTERNAL VARIABLES # XREF BEGIN PROC NPPWL; # PROCESS PRU WORKLIST FROM PIP # PROC LOCLLCB; # LOCATE LLCB # PROC MRELS; # RELEASE BUFFER # PROC NBSTTP; # NETWORK BLOCK STATE TABLE # PROC LOCNCNT; # LOCATE NCNT ENTRY # PROC BLINK; # LINK MSG ON APPLICATION-S ACB # PROC HFASTQ ; PROC OSCHAPP; # SCHEDULE APPLICATION # PROC OVLCALL; # LOAD AND EXECUTE OVERLAY # PROC NPNIPSM; # PROCESS NIP SM # PROC XTRACE; # TRACE PROCEDURE CALL # END # INTERNAL VARIABLES # ITEM BADNBLK B; # FLAG FOR BAD NETWORK BLOCK # ITEM DISCSNS B; # FLAG FOR JUST DISCARDING DUMP/LOAD # ITEM I; # INDEX OF PFCSFC FOUND # ITEM BLKT; # TEMPORARY FOR BLOCK TYPE # ITEM DNNUM ; ITEM FOUND B; # PFCSFC MATCH FOUND FLAG # ITEM NBSTRIG; # NBSTTP TRIGGER # ITEM TWORD; # TEMPORARY TO HOLD NETWORK HEADER # ITEM ACNTINDX ; # INDEX INTO ACNB IN ACNT # DEF ERR1 #77#; # ERROR CASE - NO VALID STATE TABLE TRIG # SWITCH MSGDESTJT SMC0,SMC1,SMC2; ARRAY NBTRIGTAB [NETBLK:NETICMDR] S(1); BEGIN # NETW BLOCK STATE TABLE TRIGGER FOR NETW BLK # ITEM NBS$TRIG U(0,0,60) = [ NBRMSG, NBRMSG, NBRBACK, NBRMSG, NBRBRK, NBRMSG, NBRMSG, NBRRST, RINITR, RINITN, RTERM, NBRICMD, ICMDR ]; END BEGIN CONTROL IFEQ DEBUG,1; XTRACE("NEIB1"); CONTROL FI; P = BUFADDR; P = P + BLKHSIZE; PARAMP4 = DMCBNBD; # INDEX FOR BAD NETWORK BLK DISCARDED # BADNBLK = TRUE; DISCSNS = FALSE ; DNNUM = DN[0] ; IF ( (DNNUM NQ NBTHNN) OR # DN DOES NOT MATCH HN # (SN[0] EQ 0 ) ) AND # SN IS 0 # (NBTHNN NQ 0 ) AND # NOT INTRAHOST MSG # ( (DNNUM NQ 0 ) OR # DN IS NONZERO # (SN[0] NQ 0 ) OR # SN IS NONZERO # (NBTET[NBTIDX] NQ "ND") ) # NOT CDCNET FRONT END # THEN BEGIN PARAMP4 = DMCBNN; # INDEX FOR BAD NODE NUMBER DAY MSG # GOTO NEXT ; END BLKT = BT[0]; # BLOCK TYPE # IF BLKID[0] EQ PWLIDVALUE THEN BEGIN NPPWL(P); # PROCESS PRU WORKLIST FROM PIP # BADNBLK = FALSE; END ELSE BEGIN # NOT A PWL # IF BLKT LS NETBLK OR BLKT GR NETICMDR THEN BEGIN IF BLKT EQ 0 THEN # ASSUME PIP IS DISCARDING BAD NETWORK MSG# BEGIN PARAMP4 = DMCBNBD; # DMC FOR IVT BLK PROTOCOL ERR # END ELSE # PIP GENERATED BAD BLOCK TYPE IN MSG # BEGIN PARAMP4 = DMCUBT; # UNKNOWN BLOCK TYPE DAY MSG # END GOTO NEXT ; # INVALID BLOCK TYPE FROM PIP # END IF CN[0] NQ 0 THEN BEGIN LOCLLCB(DN[0],SN[0],P); # LOCATE LLCB # IF P NQ 0 THEN BEGIN # VALID NETWORK BLOCK # LOCNCNT(P,CN[0],P); # LOCATE NCNT ENTRY # IF P NQ 0 THEN BEGIN P = NCNTNCNB[0]; # NCNB ADDRESS # IF P NQ 0 THEN BEGIN NBSTRIG = NBS$TRIG[BLKT]; IF NBSTRIG NQ ERR1 AND BLKT LQ NETICMDR THEN BEGIN CONTROL IFEQ STAT,1; # STATISTICS ON # IF BT[0] LQ NETMSG OR BT[0] EQ NETQBLK OR BT[0] EQ NETQMSG THEN BEGIN # DATA BLOCK # ST$IDB = ST$IDB + 1; # INCR *N/W IN DATA BLOCK # ST$IDC = ST$IDC + CC[0]; # INCR *N/W IN DATA CHARS# END ELSE BEGIN # NON DATA BLOCKS # ST$INB = ST$INB + 1; # INCR *N/W IN NON-DATA BK # ST$INC = ST$INC + CC[0]; # INCR *N/W IN ND CR # END CONTROL FI; P = NCNBACNB[0] ; # TRY FIND THE TWIN # IF NBSTRIG EQ NBRMSG AND P NQ 0 THEN # WE TRY TO SKIP THE STATE TABLES # BEGIN P = ATACBA[ACNBAN[0]] ; P= ACBACNT[0] ; ACNTINDX = ACNBACN[0]+ACNTHSIZE-ACNTMINACN[0] ; IF( NCNBBST[0] EQ NBALLD # ALL DATA ALLOWED # AND ACNTIS[ACNTINDX] EQ HBALLD)# ALSO HOST SIDE # THEN BEGIN IF NHBSN[0] LS 7 THEN NCNTNIB[0] = NHBSN[0] + 1 ; # NEXT BSN OF UPLIN# ELSE NCNTNIB[0] = 1 ; HFASTQ(BUFADDR,P) ; GOTO GOON ; END END NBSTTP(P,NBSTRIG,BUFADDR) ; GOON: BADNBLK = FALSE ; END END END END END ELSE # CN = 0 ASYNCHRONOUS SM # IF (CC[0] GQ 2 ) AND # SUP MSG IS NOT TOO SMALL # (CC[0] LQ 472) # SUP MSG IS NOT TOO LARGE # THEN BEGIN P = P + NBHSIZE; FOUND = FALSE; IF (PFCSFC[0] EQ NPIDD) OR (PFCSFC[0] EQ NPIPP) THEN # HALT NPU SUP MSG TO BE PROCESSED BY NIP # BEGIN # FALL THROUGH TO LABEL SMC0 # FOUND = TRUE; # FOUND MATCHING PFC/SFC # END FOR I=1 STEP 1 WHILE I LQ 4 AND NOT FOUND DO BEGIN IF PFC[0] GQ MINPFC[I] AND PFC[0] LQ MAXPFC[I] THEN BEGIN IF PROCAN[I] NQ 0 THEN BEGIN # WITHIN PFC/SFC RANGE # FOUND = TRUE; GOTO MSGDESTJT[CASEORD[I]]; END ELSE BEGIN IF I NQ 4 # MSG TO MISSING CS OR NS # THEN DISCSNS = TRUE ; END END END SMC0: # SM-S PROCESSED BY NIP # NPNIPSM(P,BADNBLK); GOTO SMC2; SMC1: # SM-S PROCESSED BY NS/CS # P = ATACBA[PROCAN[I]] ; IF ATNVFN[ACBAN] OR ATNVFF[ACBAN] THEN BEGIN # APPLICATION HAS NETTED OFF OR FAIL# BADNBLK = TRUE ; # DISCARD THIS MESAGE # GOTO NEXT ; END # APPL. HAS NETTED OFF OR FAILED # # FORMAT SPECIAL ABH FOR ABT=4 # P = P; TWORD = NHWORD[0]; # SAVE NETWORK HEADER # P = LOC(TWORD); ABHWORD[0] = 0; ABHABT[0] = APPSUP; # APPLICATION BLOCK TYPE # ABHBT[0] = BLKT; # NETWORK BLOCK TYPE # ABHNBH[0] = NBHABH[0]; # SET DN/SN/CN # ABHTLC[0] = CC[0]; # TEXT LENGTH # ABHACT[0] = CT8ASCII; # CHARACTER TYPE # BLINK(P,P); # LINK SM TO APP ACB # OSCHAPP(P); # SCHEDULE APPLICATION # BADNBLK = FALSE; SMC2: END END # NOT A PWL # NEXT: IF BADNBLK AND ( NOT DISCSNS) THEN # PROCESS GARBAGE MESSAGE # BEGIN OVLNAME = NGIGOP; # OVERLAY NAME # PARAMP1 = P; # ADDRESS OF BAD MSG # OVLCALL; # LOAD AND EXECUTE OVERLAY # END BLKT = BLKID[0]; IF BLKT NQ DRIDVALUE AND BLKT NQ PWLRIDVALUE AND BLKT NQ POBIDVALUE THEN # BUFFER NOT QUEUED TO DATA RING BUFFER NOT QUEUED TO ACB # MRELS(P); #RELEASE BUFFER# RETURN; END TERM