*DECK NXBLOCK USETEXT NIPDEF USETEXT AHEADER USETEXT BACKBUF USETEXT DRHDR USETEXT NCNB USETEXT NHEADER USETEXT PT PROC NXBLOCK((NCNBFWA),(BLOCKTYPE)); # SEND BLOCK PROTOCOL ELEMENT # STARTIMS; # *1DC NXBLOCK * * 1. PROC NAME AUTHOR DATE * NXBLOCK J.C. LEE 82/06/08 * * 2. FUNCTIONAL DESCRIPTION * SEND NETWORK BLOCK PROTOCOL ELEMENTS * BACK/BRK/RST/INITN/INITR/TERM/ICMD/ICMDR TO NPU. * * 3. METHOD USED * IF BLOCKTYPE IS BACK * AND THERE IS A FREE ENTRY IN THE BACK BUFFER, * USE BACK BUFFER ENTRY FOR DOWNLINE BACK. * ELSE (BACK BUFFER CANNOT BE USED), * ALLOCATE BUFFER FOR THE DOWNLINE BLOCK * SET NETWORK BLOCK TYPE * CALL NFOB TO LINK BUFFER TO PIP OUTBOUND CHAIN * * 4. ENTRY PARAMETERS * NCNBFWA - FWA OF NCNB * BLOCKTYPE - NETWORK BLOCK TYPE * * 5. EXIT PARAMETERS * NONE * * 6. SYMPL TEXTS USED * AHEADER APPLICATION BLOCK HEADER WORD TEMPLATE * BACKBUF DOWNLINE BACK BUFFER * DRHDR BUFFER HEADER WORD TEMPLATE * NCNB NETWORK CONNECTION BLOCK TEMPLATE * NHEADER NETWORK BLOCK HEADER WORD TEMPLATE * NIPDEF CONSTANT DEFINITIONS * * 7. ROUTINES CALLED * MGETS - ALLOCATE BUFFER * NFOB - LINK BUFFER TO PIP OUTBOUND CHAIN * XTRACE - TRACE PROCEDURE CALL * * THIS PROCEDURE IS CALLED BY NFOB, NLOBCH, * HSFCBRK, AND NBSTTP. * # STOPIMS; # FORMAL PARAMETERS # ITEM NCNBFWA U; # FWA OF NCNB # ITEM BLOCKTYPE U; # NETWORK BLOCK TYPE # # EXTERNAL VARIABLES # XREF BEGIN PROC MGETS; # ALLOCATE BUFFER # PROC NFOB; # LINK BUFFER TO PIP OUTBOUND CHAIN # PROC XTRACE; # TRACE PROC CALL # END # LOCAL VARIABLES # DEF NETSIZE # 2 #; # BUFFER SIZE OF NETW DOWNLINE BLK # ITEM BUFFWA U; # BUFFER FOR NETWORK BLOCK # ITEM NXBSIZE; # BUFFER SIZE # CONTROL IFEQ DEBUG,1; ARRAY TRACE$NBLK [1:NETICMDR] S(1); BEGIN # TRACE NETWORK BLOCK CALL # ITEM NBLK$NAME C(00,00,05) = [ "ERROR", "ERROR", "NXBCK", "ERROR", "NXBRK", "ERROR", "ERROR", "NXRST", "NXINR", "NXINN", "NXTRM", "NXICM", "NXICR", ]; END CONTROL FI; #**********************************************************************# BEGIN CONTROL IFEQ DEBUG,1; XTRACE(NBLK$NAME[BLOCKTYPE]); CONTROL FI; P = NCNBFWA; # NCNB ADDRESS # IF (BLOCKTYPE EQ NETBACK) AND # DOWNLINE BACK FOR NPU # (BACKFFREE NQ 0) AND # FREE ENTRY IN BACK BUFFER # (NCNBTN[0] NQ 0) AND # CHECK FOR NOT INTRAHOST A-A CN# (NCNBHN[0] NQ 0) THEN # USE BACK BUFFER FOR BACK # BEGIN BUFFWA = BACKFFREE + 1; # ADDRESS OF FREE ENTRY IN BUF # P = BACKFFREE; BACKFFREE = CMWORD[0]; # ADDRESS OF NEXT FREE ENTRY # END ELSE # GET BUFFER FOR DOWNLINE BLOCK # BEGIN IF (BLOCKTYPE NQ NETICMD) AND (BLOCKTYPE NQ NETBRK) THEN BEGIN NXBSIZE = NETSIZE; END ELSE BEGIN NXBSIZE = ICMDSIZE; END MGETS(NXBSIZE,BUFFWA,TRUE); END P = BUFFWA + BLKHSIZE; NHWORD[0] = 0; # CLEAR NETWORK HEADER WORD # P = P; BT[0] = BLOCKTYPE; # NETWORK BLOCK TYPE # IF BLOCKTYPE EQ NETBACK THEN # SET BSN FOR DOWNLINE BLOCK # NHBSN[0] = TEMPBSN; ELSE IF (BLOCKTYPE EQ NETICMD) OR (BLOCKTYPE EQ NETBRK) THEN BEGIN ABHACT[0] = CT8ASCII; # SET CHARACTER TYPE # ABHTLC[0] = 1; # CHAR COUNT FOR INTERRUPT CHAR/BREAK RC # NHICMDA[1] = TEMPBSN; # SET INTERRUPT CHAR/BREAK REASON CODE # END NFOB(BUFFWA,NCNBFWA); RETURN; END TERM