*DECK NETON USETEXT AIPDEF USETEXT NP$MODE USETEXT NP$DB USETEXT NP$NWL USETEXT NP$ONAM USETEXT NP$STAT USETEXT NP$ZHDR *IF DEF,XFR USETEXT NX$ACBF USETEXT NX$ACBX *ENDIF PROC NETON((ANAME),NSUP,RESULT,(MINACN),(MAXACN)); *IF DEF,IMS # *1DC NETON * * 1. PROC NAME AUTHOR DATE * NETON S. KRULEVITCH 78/11/10 * * 2. FUNCTIONAL DESCRIPTION * SETS AIP VARIABLES TO INITIAL STATE. FORMATS A NETON ENTRY * AND SENDS IT TO NIP BY USE OF NETSEND. NIP AND CS WILL THEN * EITHER ACCEPT THE APPLICATION AND BUILD TABLES RELEVANT TO IT * OR THEY WILL REJECT THE APPLICATION. * * 3. METHOD USED * A NETON ENTRY IS FORMATTED FOR NIP. NIP RETURNS A PROCESS * NUMBER AND ON ACCEPT/REJECT CODE (RESULT). * * 4. ENTRY CONDITIONS * ACCEPTED - BOOLEAN VARIABLE WHICH SHOULD BE FALSE ON ENTRY * ANAME - APPLICATION NAME * MINACN - GREATER THAN ZERO AND LESS THAN OR EQUAL TO MAXACN * MAXACN - LESS THAN 4095 (ACNMX) * NSUP - THIS WORD CONTAINS FOUR FLAGS AS FOLLOWS: * BIT: 0 1 2 3 4 * C N I S * * C - COMPLETE BIT CONTAINING THE STATUS FROM NETCHEK * =1 COMPLETE * =0 NOT COMPLETE * N - NAM AVAILABLE * =1 AVAILABLE * =0 NOT AVAILABLE * I - INPUT OTHER THAN ACN =0 AVAILABLE * =1 TRUE * =0 FALSE * S - SUPERVISORY MESSAGES AVAILABLE (NSUP) * =1 TRUE * =0 FALSE * NSUP ALSO CONTAINS A FIELD MSGCNT THAT TRACKS THE NUMBER OF * MESSAGES WRITTEN TO THE DEBUG LOG FILE ZZZZZDN. * * 5. EXIT CONDITIONS * NSUP WORD FLAGS ARE PRESET AS FOLLOWS: * C = 0 * N = 1 * I = 0 * S = 0 * DEFER$PRO = FALSE * NP$SMB POINTERS ARE PRESET: HEAD = FOOT = FIRST * NEXTSMLEN = 0 * NP$NWL HEADER IS INITIALIZED. * NP$CRT NP$MODE NP$NWL NP$STAT * RESULT - STATUS OF NETON REQUEST, 0 = ACCEPTED, 1 = BUSY, * TRY AGAIN, 2 = REJECTED. * * 6. COMDECKS CALLED AND SYMPL TEXTS USED. * AIPDEF NP$CRT NP$DB NP$LOF * NP$MODE NP$NWL NP$ONAM NP$STAT * NP$ZHDR * * 7. ROUTINES CALLED * NP$ERR - PRINTS ERROR MESSAGE, THEN STOPS * NP$RCL - GO INTO RECALL * NP$SEND - SENDS WORKLIST TO NIP * * 8. DAYFILE MESSAGES * NETWORK APPLICATION ABORTED, RC = 30. * NETON: DUPLICATE NETON REQUEST. * * NETWORK APPLICATION ABORTED, RC = 40. * NETON: PREVIOUS REQUEST INCOMPLETE. * * # *ENDIF BEGIN *CALL NP$CRT # # # PARAMETERS: # # # ITEM ANAME C(7),# APPLICATION NAME # I I, # INDUCTION VARIABLE # NSUP I, #MORE SUPERVISORY MESSAGES IN SMB # RESULT I, #STATUS OF NETON REQUEST # MINACN I, # 0 = LOC(NSUP); # LOCATION OF NSUP COMM/WORD. # # INITIALIZE NETWORK WORKLIST BUFFER # P = LOC(NWLBUF); # LOCATION OF NWL BUFFER # NEXT = NHDR + 1; #SET NWL POINTERS AND # SPACE$LEFT=LWL; # COUNTERS # DOWNUSE = FALSE; # DOWNLINE BUFFERING NOT IN USE# N$AWL[0] = 0; # CLEAR AWL RESPONSE INDICATORS # # INITIALIZE POINTERS FOR SUPERVISORY MESSAGE BUFFER - SMB # HEAD = FIRST; #FIRST IS START OF SMB # FOOT = HEAD; #SMB IS EMPTY: NO MESSAGES # NEXTSMLEN = 0; #NO SUPERVISORY MSGS IN NIP # # INITIALIZE POINTERS FOR AIP UPLINE DATA MESSAGE BUFFER - GMB # GMBHEAD = 1; # INITIAL INDX FOR FWA TO WRITE# GMBFOOT = 1; # INITIAL INDX FOR LWA TO WRITE# GMBUSE = FALSE; # INIT GMB NOT IN USE FLAG # GMBTRUNC = FALSE; # INIT NO TRUNCATION OF DATA # GMBLAST = 1; # INITIAL INDEX FOR END OF BUF # GMBCN = 0; # INIT CON NUMBER FOR GMB # GMBLN = 0; # INIT LIST NUMBER FOR GMB # GMMESIZE = 0; # INIT FOR NO GMM ENTRY NEEDED # # SET UP NWL HEADER # HDR[NHDR]=LOC(HDR[NHDR]) + 1; #RETURN AWL AFTER CONTROL WDS # HDR$N[NHDR]=1; #ONLY 1 ENTRY, I.E. THE NETON # HDR$W[NHDR] = 1 + NONBSIZE; # FORMAT NETON NWL ENTRY # N$NETONAWL[0] = 1; # FLAG NETON AWL TO PROCESS # NWL[NEXT]=0; #CLEAR AND BUILD OP WORD # NWL$OP[NEXT]=OP$ON; NWL$ID[NEXT] = AWLID; #UNPROCESSED WORKLIST ID = AWLID (=11) # NWL$BS[NEXT] = NONBSIZE; NON[NEXT+1]=0; NON$AN[NEXT+1] = ANAME; NON[NEXT+2] = MINACN; NON[NEXT+3] = MAXACN; NON[NEXT+4] = LOC(DAWORD); # INFORM NIP OF DAWORD ADDRESS # NON[NEXT+5] = LOC(RESULT); # SAVE LOCATION OF RESULT # *IF DEF,DEBUG ZH$ANAM[0] = ANAME; P = LOC(NETON); ON$CALL[0] = CALLADDR[0]; ON$MIN[0] = MINACN; ON$MAX[0] = B<48,12>MAXACN ; # THE MAX ACN FROM APPLICATION # *ENDIF # SEND NETON NWL TO NIP # SENDGETMM = FALSE; # NO NEED TO PICK UP DATA MSGS UNTIL NETON# SENDGETSM = FALSE; # NO NEED TO PICK UP SUP MSGS UNTIL NETON # NP$SEND; IF RESULT EQ 1 AND N$FLAG[0] # IF NETON REJECT CODE 1 AND # THEN BEGIN NETTRY = TRUE; # RETRY NETON # FOR I = 1 STEP 1 UNTIL 20 DO # DELAY BEFORE REISSUING NETON # BEGIN NP$RCL(0); # GO INTO TIME DELAY RECALL # END END # END IF # END # END WHILE # SENDGETMM = TRUE; SENDGETSM = TRUE; *IF DEF,XFR MINIACN = MINACN ; # MAXACN INPUT PARAM IS # # A COMBINATION OF 2 MAX CONNECTION LIMIT:# # . BIT 48-59: MAX ACN # # . BIT 36-47: RESERVED OUTGOING CONS. # MAXIACN = B<48,12>MAXACN ; NUMIRCN = B<36,12>MAXACN ; NUMFILEXFR = 0 ; GROUPNAME = 0 ; *ENDIF RETURN; END #NETON # TERM