*DECK NVFOLNE USETEXT TEXTNVF USETEXT TEXTSS USETEXT TXCMDNV USETEXT TXTAPSS PROC NVFOLNE; # TITLE NVFOLNE - LOG NETWORK EVENTS. # BEGIN # NVFOLNE # # ** NVFOLNE - LOG NETWORK EVENTS. * * A. LIM. 82/03/18. * * THIS PROCEDURE LOGS NETWORK EVENTS TO THE NETWORK-LOG FILE(OR NIP * DAYFILE), HISTORY BUFFER, AND K-DISPLAY. * IT IS CALLED INTO EXECUTION WHENEVER THERE IS DATA IN UNSOLICITED- * STATUS-QUEUE *USQ*. * * PROC NVFOLNE * * ENTRY NETWORK EVENTS IN UNSOLICITED-STATUS-QUEUE *USQ*. * * EXIT NETWORK EVENTS LOGGED TO NETWORK-LOG FILE, HISTORY BUFFER * AND K-DISPLAY. * * METHOD THIS PROCEDURE CONSISTS PRIMARY A LARGE LOOP, EACH TIME * THROUGH THE LOOP, *SSTRQE* IS CALLED TO REMOVE AN ENTRY * FROM THE *USQ*. THEN A HOP/LG SM IS BUILT AND SENT TO * OUTGOING-TRAFFIC-QUEUE *OTQ* DESTINED FOR NETWORK-LOG * FILE. THEN IT IS LOGGED TO HISTORY BUFFER, AND * IS SENT TO THE CONNECTION-TRAFFIC-QUEUE *CTQ* REGARDLESS * OF K-DISPLAY ASSIGNED/UNASSIGNED. * IT TERMINATES WHEN *USQ* IS EXHAUSTED. # # **** PROC NVFOLNE XREF LIST # XREF BEGIN PROC MOVE; # MACREL- MOVE CM WORDS # PROC SSTAQE; # SS- ACCEPT A QUEUE ENTRY # PROC SSTATS; # SS- ALLOCATE TABLE SPACE # PROC SSTRQE; # SS- REMOVE QUEUE ENTRY TO FIXED BUFFER # PROC SSTRTS; # SS- REMOVE TABLE SPACE # END # **** # ITEM DONE B; # LOOP EXIT VARIABLE # ITEM I I; # LOOP INDUCTION VARIABLE # ITEM L U; # INDEX TO HISTORY BUFFER # ITEM WC I; # WORD-COUNT WORDS TO ALLOCATE TABLE SPACE# # * PROCESS ALL ENTRIES IN *USQ* # FOR I = 0 WHILE USQLNGTH NQ 0 DO BEGIN SSTRQE(P,WCBUF[0],ABHBUF[0],MSGBUF[3]); # MOVE TO FIX BUF# # * BUILD A HOP/LG SM AND SEND IT TO *OTQ* # MSG$WORD[0] = 0; MSG$PSFC[0] = HOPLG; # PFC/SFC FOR HOP/LG # IF ABHABT[0] EQ 5 THEN MSG$WORD[1] = HOCMDID$; # ID = *NV/HOSTNVF* # ELSE MSG$WORD[1] = USMSGID$; # ID = *NV/ * # MSG$WORD[2] = CTM$CLOCK[0]; # TIME STAMP THE MESSAGE # WCB$WORD[1] = 0; # CLEAR WC WORD 1 # ABHWORD[1] = 0; # CLEAR ABH WORD 1 # WCB$WC[1] = WCB$WC[0]+3; # WC=PSFC+TIME+ID+ORIGINAL MSG # ABHABT[1] = APPCMD; ABHACT[1] = CT60TRANS; ABHTLC[1] = WCB$WC[1] - 2; SSTAQE(P,WCBUF[1],ABHBUF[1],MSGBUF[0]); # SEND HOP/LG # # * LOG THE MESSAGE TO HISTORY BUFFER. # IF HSBCNT EQ MXHSBCNT$ THEN BEGIN # HISTORY BUF FULL, DELETE FIRST ENTRY # DONE = FALSE; FOR I = 0 STEP 1 WHILE (NOT DONE) AND (I LS HSBL) DO BEGIN # SEARCH ZERO BYTE FOR END OF ENTRY # IF HSB$ZERO[I] EQ 0 THEN DONE = TRUE; # FOUND IT# END SSTRTS(P,0,I); # DELETE THIS FIRST ENTRY # HSBCNT = HSBCNT - 1; END WC = WCB$WC[0] - 1; L = HSBL; # SAVE INDEX TO END OF HISTORY BUF # SSTATS(P, WC);# ALLOC SPACE FOR THIS NEW MSG LINE # MOVE(WC,MSGBUF[2],HSBUF[L]); # MOVE LINE TO HISTROY BUF # HSBCNT = HSBCNT + 1; # INCREMENT HISTORY LINES COUNT # # * SEND THE MESSAGE AS TERMINAL TEXT TO *CTQ* IF THIS IS NOT A * COMMAND TEXT. # IF ABHABT[0] NQ 5 THEN BEGIN WCB$WORD[1] = 0; ABHWORD[1] = 0; WCB$WC[1] = WCB$WC[0] + 1; WCB$IAF[1] = FALSE; WCB$HAF[1] = WCB$HAF[0]; ABHABT[1] = HOPTX$; SSTAQE(P,WCBUF[1],ABHBUF[1],MSGBUF[2]); END END # FOR I LOOP # END TERM