*DECK NFOB1
USETEXT NIPDEF
USETEXT LLCB
USETEXT DRHDR
USETEXT NHEADER
USETEXT SUPMSG
USETEXT OVERLAY
USETEXT PARAMP
USETEXT TNT
USETEXT PT
PROC NFOB1(BUFADD);
STARTIMS;
#
*1DC NFOB1
*
* 1. PROC NAME AUTHOR DATE
* NFOB1 C. BITTNER 82/06/18
*
* 2. FUNCTIONAL DESCRIPTION
* LINK MESSAGE ON A-A MESSAGE QUEUE.
*
* 3. METHOD USED
* QUEUE MESSAGE TO THE END OF THE CHAIN.
*
* 4. ENTRY PARAMETERS
* BUFADD - ADDRESS OF MESSAGE TO QUEUE
*
* 5. EXIT PARAMETERS
* NONE
*
* 6. SYMPL TEXTS USED
* NIPDEF LLCB
* DRHDR
* NHEADER
* TNT PT
*
* 7. ROUTINES CALLED
* MGETS - GET EMPTY BUFFER
* MRELS - RELEASE BUFFER TO FREE CHAIN
* XTRACE - TRACE PROCEDURE CALL
*
* 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
* THIS PROCEDURE IS CALLED BY NFOB.
*
#
STOPIMS;
#
INPUT PARAMETERS
#
ITEM BUFADD; # SM BUFFER ADDRESS #
#
EXTERNAL VARIABLES
#
XREF
BEGIN
PROC LOCLLCB; # LOCATE LLCB #
PROC MGETS; # GET EMPTY BUFFER #
PROC MRELS; # RELEASE BUFFER TO FREE CHAIN #
PROC OVLCALL; # LOAD AND EXECUTE OVERLAY #
PROC XTRACE; # TRACE PROCEDURE CALL #
END
#
INTERNAL VARIABLES
#
ITEM BUFADDR; # ADDR OF 3 WORD BUFFER FOR BACK #
ITEM I; # LOOP VARIABLE #
ITEM NEXTBUF; # NEXT BUFFER TO PROCESS #
BEGIN
CONTROL IFEQ DEBUG,1;
XTRACE("NFOB1");
CONTROL FI;
P<DRHDRWD> = BUFADD;
P<NHEADER> = BUFADD + BLKHSIZE; # ADDR OF NETWORK HEADER WORD #
IF BT[0] EQ NETBACK
THEN # RECEIVING BACK ON INTRAHOST A-A CON #
BEGIN
#
GET BUFFER FOR 3 WORD BACK SINCE THAT IS WHAT PIP CREATES
#
MGETS(LFCACK+BLKHSIZE+ABHSIZE,BUFADDR,TRUE);
P<DRHDRWD> = BUFADDR;
CMWORD[BLKHSIZE] = NHWORD[0]; # COPY NETWORK HEADER TO NEW BUF#
MRELS(BUFADD);
END
ELSE # DO NOT NEED TO ALLOCATE NEW BUFFER #
BEGIN
BUFADDR = BUFADD; # ADDRESS OF BUFFER TO LINK TO A-A QUEUE #
END
BLKID[0] = HHQIDVALUE; # SET TO NON-MOVEABLE ID #
NEXTPTR[0] = 0; # CLEAR POINTER FIELD #
P<LLCB> = TNTLLAD[0];
P<DRHDRWD> = LLCBSHFP[0]; # FIND LAST BUFFER #
IF P<DRHDRWD> NQ 0
THEN
BEGIN # SEARCH FOR END OF LIST #
NEXTBUF = NEXTPTR[0];
FOR I = I WHILE NEXTBUF NQ 0
DO
BEGIN
P<DRHDRWD> = NEXTPTR[0];
NEXTBUF = NEXTPTR[0];
END
NEXTPTR[0] = BUFADDR; # LINK MSG TO END OF LIST #
END
ELSE
BEGIN # CREATE INTRA HOST QUEUE #
LLCBSHFP[0] = BUFADDR;
END
RETURN;
END
TERM