User Tools

Site Tools


cdc:nos2.source:nam5871:neton

Table of Contents

NETON

Table Of Contents

  • [00013] PROC NETON1)
  • [00109] PROC NP$ERR
  • [00110] PROC NP$RCL
  • [00111] PROC NP$SEND

Source Code

NETON.txt
  1. *DECK NETON
  2. USETEXT AIPDEF
  3. USETEXT NP$MODE
  4. USETEXT NP$DB
  5. USETEXT NP$NWL
  6. USETEXT NP$ONAM
  7. USETEXT NP$STAT
  8. USETEXT NP$ZHDR
  9. *IF DEF,XFR
  10. USETEXT NX$ACBF
  11. USETEXT NX$ACBX
  12. *ENDIF
  13. PROC NETON((ANAME),NSUP,RESULT,(MINACN),(MAXACN));
  14. *IF DEF,IMS
  15. #
  16. *1DC NETON
  17. *
  18. * 1. PROC NAME AUTHOR DATE
  19. * NETON S. KRULEVITCH 78/11/10
  20. *
  21. * 2. FUNCTIONAL DESCRIPTION
  22. * SETS AIP VARIABLES TO INITIAL STATE. FORMATS A NETON ENTRY
  23. * AND SENDS IT TO NIP BY USE OF NETSEND. NIP AND CS WILL THEN
  24. * EITHER ACCEPT THE APPLICATION AND BUILD TABLES RELEVANT TO IT
  25. * OR THEY WILL REJECT THE APPLICATION.
  26. *
  27. * 3. METHOD USED
  28. * A NETON ENTRY IS FORMATTED FOR NIP. NIP RETURNS A PROCESS
  29. * NUMBER AND ON ACCEPT/REJECT CODE (RESULT).
  30. *
  31. * 4. ENTRY CONDITIONS
  32. * ACCEPTED - BOOLEAN VARIABLE WHICH SHOULD BE FALSE ON ENTRY
  33. * ANAME - APPLICATION NAME
  34. * MINACN - GREATER THAN ZERO AND LESS THAN OR EQUAL TO MAXACN
  35. * MAXACN - LESS THAN 4095 (ACNMX)
  36. * NSUP - THIS WORD CONTAINS FOUR FLAGS AS FOLLOWS:
  37. * BIT: 0 1 2 3 4
  38. * C N I S
  39. *
  40. * C - COMPLETE BIT CONTAINING THE STATUS FROM NETCHEK
  41. * =1 COMPLETE
  42. * =0 NOT COMPLETE
  43. * N - NAM AVAILABLE
  44. * =1 AVAILABLE
  45. * =0 NOT AVAILABLE
  46. * I - INPUT OTHER THAN ACN =0 AVAILABLE
  47. * =1 TRUE
  48. * =0 FALSE
  49. * S - SUPERVISORY MESSAGES AVAILABLE (NSUP)
  50. * =1 TRUE
  51. * =0 FALSE
  52. * NSUP ALSO CONTAINS A FIELD MSGCNT THAT TRACKS THE NUMBER OF
  53. * MESSAGES WRITTEN TO THE DEBUG LOG FILE ZZZZZDN.
  54. *
  55. * 5. EXIT CONDITIONS
  56. * NSUP WORD FLAGS ARE PRESET AS FOLLOWS:
  57. * C = 0
  58. * N = 1
  59. * I = 0
  60. * S = 0
  61. * DEFER$PRO = FALSE
  62. * NP$SMB POINTERS ARE PRESET: HEAD = FOOT = FIRST
  63. * NEXTSMLEN = 0
  64. * NP$NWL HEADER IS INITIALIZED.
  65. * NP$CRT NP$MODE NP$NWL NP$STAT
  66. * RESULT - STATUS OF NETON REQUEST, 0 = ACCEPTED, 1 = BUSY,
  67. * TRY AGAIN, 2 = REJECTED.
  68. *
  69. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  70. * AIPDEF NP$CRT NP$DB NP$LOF
  71. * NP$MODE NP$NWL NP$ONAM NP$STAT
  72. * NP$ZHDR
  73. *
  74. * 7. ROUTINES CALLED
  75. * NP$ERR - PRINTS ERROR MESSAGE, THEN STOPS
  76. * NP$RCL - GO INTO RECALL
  77. * NP$SEND - SENDS WORKLIST TO NIP
  78. *
  79. * 8. DAYFILE MESSAGES
  80. * NETWORK APPLICATION ABORTED, RC = 30.
  81. * NETON: DUPLICATE NETON REQUEST.
  82. *
  83. * NETWORK APPLICATION ABORTED, RC = 40.
  84. * NETON: PREVIOUS REQUEST INCOMPLETE.
  85. *
  86. *
  87.  #
  88. *ENDIF
  89. BEGIN
  90.  
  91. *CALL NP$CRT
  92.  
  93. # #
  94. # PARAMETERS: #
  95. # #
  96. ITEM
  97. ANAME C(7),# APPLICATION NAME #
  98. I I, # INDUCTION VARIABLE #
  99. NSUP I, #MORE SUPERVISORY MESSAGES IN SMB #
  100. RESULT I, #STATUS OF NETON REQUEST #
  101. MINACN I, # 0<MINACN@MAXACN<4095 #
  102. MAXACN I,
  103. NETTRY B, # NETON RETRY FLAG #
  104. NETLOOP I;
  105. # #
  106. # ROUTINES CALLED: #
  107. # #
  108. XREF BEGIN
  109. PROC NP$ERR; #ERROR PROCESSOR #
  110. PROC NP$RCL; # GO INTO RECALL #
  111. PROC NP$SEND; #SENDS NWL TO NIP VIA SSCALL #
  112. END #XREFS#
  113.  
  114.  
  115.  
  116. #**********************************************************************#
  117. #
  118.   NETON EXECUTION BEGINS HERE
  119. #
  120. IF ACCEPTED
  121. THEN
  122. NP$ERR("30"); # DUPLICATE NETON. #
  123. IF DEFER$PRO
  124. THEN
  125. NP$ERR("40"); # PREVIOUS REQUEST INCOMPLETE. #
  126.  
  127. #
  128.   AIP INITIALIZATION
  129. #
  130. NETTRY = TRUE; # SET RETRY FLAG TO TRUE #
  131. FOR NETLOOP = 0 WHILE NETTRY # TRY TO NETON #
  132. DO
  133. BEGIN
  134. DAWORD = 0; # CLEAR DATA AVAILABILITY WORD #
  135. RESULT = 0; # CLEAR RESULT WORD #
  136. NETTRY = FALSE; # CLEAR RETRY FLAG #
  137. NSUP = O"10000000000000000000"; #NAM AVAILABLE FLAG SET #
  138. P<NSUPWRD> = LOC(NSUP); # LOCATION OF NSUP COMM/WORD. #
  139. #
  140.   INITIALIZE NETWORK WORKLIST BUFFER
  141. #
  142. P<WORKLIST> = LOC(NWLBUF); # LOCATION OF NWL BUFFER #
  143. NEXT = NHDR + 1; #SET NWL POINTERS AND #
  144. SPACE$LEFT=LWL; # COUNTERS #
  145. DOWNUSE = FALSE; # DOWNLINE BUFFERING NOT IN USE#
  146. N$AWL[0] = 0; # CLEAR AWL RESPONSE INDICATORS #
  147. #
  148.   INITIALIZE POINTERS FOR SUPERVISORY MESSAGE BUFFER - SMB
  149. #
  150. HEAD = FIRST; #FIRST IS START OF SMB #
  151. FOOT = HEAD; #SMB IS EMPTY: NO MESSAGES #
  152. NEXTSMLEN = 0; #NO SUPERVISORY MSGS IN NIP #
  153. #
  154.   INITIALIZE POINTERS FOR AIP UPLINE DATA MESSAGE BUFFER - GMB
  155. #
  156. GMBHEAD = 1; # INITIAL INDX FOR FWA TO WRITE#
  157. GMBFOOT = 1; # INITIAL INDX FOR LWA TO WRITE#
  158. GMBUSE = FALSE; # INIT GMB NOT IN USE FLAG #
  159. GMBTRUNC = FALSE; # INIT NO TRUNCATION OF DATA #
  160. GMBLAST = 1; # INITIAL INDEX FOR END OF BUF #
  161. GMBCN = 0; # INIT CON NUMBER FOR GMB #
  162. GMBLN = 0; # INIT LIST NUMBER FOR GMB #
  163. GMMESIZE = 0; # INIT FOR NO GMM ENTRY NEEDED #
  164. #
  165.   SET UP NWL HEADER
  166. #
  167. HDR[NHDR]=LOC(HDR[NHDR]) + 1; #RETURN AWL AFTER CONTROL WDS #
  168. HDR$N[NHDR]=1; #ONLY 1 ENTRY, I.E. THE NETON #
  169. HDR$W[NHDR] = 1 + NONBSIZE;
  170. #
  171.   FORMAT NETON NWL ENTRY
  172. #
  173. N$NETONAWL[0] = 1; # FLAG NETON AWL TO PROCESS #
  174. NWL[NEXT]=0; #CLEAR AND BUILD OP WORD #
  175. NWL$OP[NEXT]=OP$ON;
  176. NWL$ID[NEXT] = AWLID; #UNPROCESSED WORKLIST ID = AWLID (=11) #
  177. NWL$BS[NEXT] = NONBSIZE;
  178. NON[NEXT+1]=0;
  179. NON$AN[NEXT+1] = ANAME;
  180. NON[NEXT+2] = MINACN;
  181. NON[NEXT+3] = MAXACN;
  182. NON[NEXT+4] = LOC(DAWORD); # INFORM NIP OF DAWORD ADDRESS #
  183. NON[NEXT+5] = LOC(RESULT); # SAVE LOCATION OF RESULT #
  184.  
  185. *IF DEF,DEBUG
  186. ZH$ANAM[0] = ANAME;
  187. P<CALLADR> = LOC(NETON);
  188. ON$CALL[0] = CALLADDR[0];
  189. ON$MIN[0] = MINACN;
  190. ON$MAX[0] = B<48,12>MAXACN ; # THE MAX ACN FROM APPLICATION #
  191. *ENDIF
  192. #
  193.   SEND NETON NWL TO NIP
  194. #
  195. SENDGETMM = FALSE; # NO NEED TO PICK UP DATA MSGS UNTIL NETON#
  196. SENDGETSM = FALSE; # NO NEED TO PICK UP SUP MSGS UNTIL NETON #
  197. NP$SEND;
  198. IF RESULT EQ 1 AND N$FLAG[0] # IF NETON REJECT CODE 1 AND #
  199. THEN
  200. BEGIN
  201. NETTRY = TRUE; # RETRY NETON #
  202. FOR I = 1 STEP 1 UNTIL 20
  203. DO # DELAY BEFORE REISSUING NETON #
  204. BEGIN
  205. NP$RCL(0); # GO INTO TIME DELAY RECALL #
  206. END
  207. END # END IF #
  208. END # END WHILE #
  209. SENDGETMM = TRUE;
  210. SENDGETSM = TRUE;
  211. *IF DEF,XFR
  212. MINIACN = MINACN ;
  213. # MAXACN INPUT PARAM IS #
  214. # A COMBINATION OF 2 MAX CONNECTION LIMIT:#
  215. # . BIT 48-59: MAX ACN #
  216. # . BIT 36-47: RESERVED OUTGOING CONS. #
  217. MAXIACN = B<48,12>MAXACN ;
  218. NUMIRCN = B<36,12>MAXACN ;
  219. NUMFILEXFR = 0 ;
  220. GROUPNAME = 0 ;
  221. *ENDIF
  222.  
  223. RETURN;
  224. END #NETON #
  225. TERM
1)
ANAME),NSUP,RESULT,(MINACN),(MAXACN
cdc/nos2.source/nam5871/neton.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator