User Tools

Site Tools


cdc:nos2.source:nam5871:netfunc

NETFUNC

Table Of Contents

  • [00007] PROC NETFUNC(FCODE,WSA)
  • [00083] PROC NP$ERR
  • [00084] PROC NP$SEND
  • [00085] PROC NP$SN
  • [00086] PROC NP$USI

Source Code

NETFUNC.txt
  1. *DECK NETFUNC
  2. USETEXT AIPDEF
  3. USETEXT NP$GMB
  4. USETEXT NP$MODE
  5. USETEXT NP$NWL
  6. USETEXT NP$STAT
  7. PROC NETFUNC(FCODE,WSA);
  8. BEGIN
  9. #
  10. *1DC NETFUNC
  11. *
  12. * 1. PROC NAME AUTHOR DATE
  13. * NETFUNC E. GEE 01/30/85
  14. *
  15. * 2. FUNCTIONAL DESCRIPTION.
  16. * THIS ROUTINE PROCESSES AIP FUNCTION CODES. CURRENTLY THE
  17. * FOLLOWING FUNCTION CODES HAVE BEEN DEFINED.
  18. *
  19. * FCODE=1 SEND NETWAIT WORKLIST TO NIP EVEN IF DATA IS QUEUED
  20. * IN NIP AS LONG AS THAT DATA IS NOT DELIVERABLE THROUGH
  21. * LIST PROCESSING.
  22. * FCODE=2 QUEUE MULTIPLE UPLINE MESSAGES WITHIN AIP-S FIELD
  23. * LENGTH TO INCREASE THE THROUGHPUT FOR RECEIVING SMALL
  24. * MESSAGES.
  25. * FCODE=3 DO NOT ABORT APPLICATION PROGRAM AFTER A WORKLIST
  26. * TRANSFER IS ATTEMPTED AND NAM IS NOT AVAILABLE.
  27. * FCODE=4 QUEUE DOWNLINE MESSAGES IN AN APPLICATION-SUPPLIED
  28. * BUFFER TO INCREASE THE THROUGHPUT FOR SENDING
  29. * MULTIPLE LARGE MESSAGES TO NIP.
  30. *
  31. * 3. METHOD USED.
  32. * IF VALID FUNCTION CODE,
  33. * INDEX ACCORDING TO THE FUNCTION CODE SPECIFIED.
  34. * FC=1 SET ISSUE-NETWAIT-IF-NO-DELIVERABLE-DATA FLAG.
  35. * FC=2 SET MULTIPLE-MESSAGE-UPLINE-QUEUING FLAG.
  36. * FC=3 SET NO-ABORT-IF-NAM-NOT-AVAILABLE FLAG.
  37. * FC=4 SET MULTIPLE-MESSAGE-DOWNLINE-QUEUING FLAG.
  38. * ELSE (BAD FUNCTION CODE WAS SPECIFIED),
  39. * CALL NP$ERR TO ISSUE DAYFILE MSG AND ABORT APP.
  40. *
  41. * 4. ENTRY CONDITIONS.
  42. * FCODE FUNCTION CODE TO PROCESS
  43. * WSA ADDR OF BUFFER IF ONE IS NEEDED FOR
  44. * PROCESSING THE FUNCTION CODE.
  45. * FC=1 NOT USED.
  46. * FC=2 ADDR OF BUF TO HOLD UPLINE DATA
  47. * MESSAGES.
  48. * FC=3 NOT USED.
  49. * FC=4 ADDR OF BUF TO HOLD DOWNLINE DATA
  50. * MESSAGES.
  51. *
  52. * 5. EXIT CONDITIONS.
  53. * DOWNUSE UPDATED IF FC = 4.
  54. * GMBUSE UPDATED IF FC = 2.
  55. * WAITDEL UPDATED IF FC = 1.
  56. *
  57. * 6. COMDECKS AND SYMPL TEXT USED.
  58. * AIPDEF CONSTANT DEFINITIONS
  59. * NP$GMB UPLINE DATA BUFFER TEMPLATE
  60. * NP$MODE GLOBAL VARIABLES
  61. * NP$NWL NETWORK WORKLIST TABLE
  62. * NP$STAT STATISTICS TABLE
  63. *
  64. * 7. PROCEDURES/FUNCTIONS CALLED.
  65. * NP$ERR ISSUE ERROR MESSAGE AND ABORT APP
  66. * NP$SEND SEND A WORKLIST TO NIP
  67. * NP$SN INCREMENT AIP STATISTICS
  68. * NP$USI UPDATE S AND I BITS IN NSUP WORD
  69. *
  70. * 8. DAYFILE MESSAGES OR OTHER IMPORTANT INFORMATION.
  71. * * NETWORK APPLICATION ABORTED, RC = XX. *
  72. * * NETFUNC: REQUEST INVALID BEFORE NETON. * (RC=29)
  73. * * NETFUNC: INVALID FUNCTION CODE USED. * (RC=52)
  74. * * NETFUNC: DOWNLINE BUFFERING ALREADY ON. * (RC=59)
  75. * * NETFUNC: DOWNLINE BUFFER SIZE TOO SMALL. * (RC=60)
  76. * * NETFUNC: DOWNLINE BUFFERING ALREADY OFF. * (RC=61)
  77.  #
  78. #
  79.   EXTERNAL ROUTINES CALLED
  80. #
  81. XREF
  82. BEGIN
  83. PROC NP$ERR; # ISSUE ERROR MESSAGE AND ABORT APP #
  84. PROC NP$SEND; # SEND A WORKLIST TO NIP #
  85. PROC NP$SN; # INCREMENT AIP STATISTICS #
  86. PROC NP$USI; # UPDATE S AND I BITS IN NSUP #
  87. END
  88. #
  89.   INPUT VARIABLES
  90. #
  91. ITEM FCODE; # AIP FUNCTION CODE #
  92. ITEM WSA; # ADDRESS OF BUFFER TO HOLD UPLINE DATA #
  93. #
  94.   LOCAL VARIABLES
  95. #
  96. DEF MINFC#1#; # MINIMUM FUNCTION CODE VALUE #
  97. DEF MAXFC#4#; # MAXIMUM FUNCTION CODE VALUE #
  98.  
  99. SWITCH SWTCH$FC ,FC$1,FC$2,FC$3,FC$4;
  100.  
  101. #**********************************************************************#
  102.  
  103. CONTROL EJECT;
  104. #
  105.   EXECUTABLE CODE BEGINS HERE
  106. #
  107. IF NOT ACCEPTED
  108. THEN # APPLICATION HAS NOT NETTED ON #
  109. BEGIN
  110. NP$ERR("29"); # ISSUE DAYFILE MSG AND ABORT AP#
  111. END
  112. *IF,DEF,STAT
  113. NP$SN(TYPE"FUNC"); # INCREMENT AIP STATISTICS #
  114. *ENDIF
  115. IF (FCODE GQ MINFC) AND
  116. (FCODE LQ MAXFC)
  117. THEN # VALID FUNCTION CODE #
  118. BEGIN
  119. GOTO SWTCH$FC[FCODE];
  120.  
  121.  
  122. FC$1: # ISSUE NETWAIT WORKLIST EVEN IF DATA IS #
  123. BEGIN # AVAILABLE AS LONG AS DATA IS NOT #
  124. # DELIVERABLE THROUGH LIST PROCESSING #
  125.  
  126. WAITDEL = TRUE; # SET ISSUE-NETWAIT-IF-NO-DELIVERABLE DATA#
  127. # FLAG #
  128. GOTO FC$END;
  129.  
  130. END
  131.  
  132. FC$2: # QUEUE MULTIPLE UPLINE MESSAGES IN AIP #
  133. BEGIN # FOR EITHER THE SAME CONNECTION NUMBER #
  134. # OR SAME LIST NUMBER #
  135.  
  136. P<GMB> = LOC(WSA); # ADDRESS OF UPLINE DATA BUFFER #
  137. IF GMBFLG[0]
  138. THEN # TURN UPLINE DATA QUEUE PROCESSING ON #
  139. BEGIN
  140. *IF,DEF,STAT
  141. NP$SN(TYPE"GMR"); # INCREMENT AIP STATISTICS #
  142. *ENDIF
  143. GMBHEAD = 1; # INITIALIZE UPLINE DATA BUFFER PTRS #
  144. GMBFOOT = 1; # INITIALIZE UPLINE DATA BUFFER PTRS #
  145. GMBUSE= TRUE; # SET FLAG FOR UPLINE QUEUE PROCESSING #
  146. GMBLN = GMBALN[0]; # SAVE LIST NUMBER FOR AIP DATA BUFFER #
  147. GMBCN = GMBACN[0]; # SAVE CON NUMBER FOR AIP DATA BUFFER #
  148. GMBLAST = GMBSIZE[0]; #INDEX FOR LAST WORD OF AIP DATA BUF#
  149. GMMESIZE = GMMSIZE; # SIZE OF GMM WORKLIST ENTRY #
  150. END
  151. ELSE # TURN UPLINE DATA QUEUE PROCESSING OFF #
  152. BEGIN
  153. GMBHEAD = 1; # INITIALIZE UPLINE DATA BUFFER PTRS #
  154. GMBFOOT = 1; # INITIALIZE UPLINE DATA BUFFER PTRS #
  155. GMBUSE= FALSE; # CLEAR FLAG FOR UPLINE QUEUE PROCESSING #
  156. END
  157. GOTO FC$END;
  158.  
  159. END
  160.  
  161.  
  162. FC$3: # DO NOT ABORT APPLICATION PROGRAM IF NAM #
  163. BEGIN # IS NOT AVAILABLE #
  164.  
  165. NOABTAPP = TRUE; # SET NO-ABORT-IF-NAM-NOT-AVAILABLE FLAG #
  166. GOTO FC$END;
  167.  
  168. END
  169.  
  170. FC$4: # QUEUE DOWNLINE MESSAGES IN APPL-SUPPLIED#
  171. # BUFFER #
  172. BEGIN
  173.  
  174. P<APPBUFHDR> = LOC(WSA); # GET BUFFER HEADER #
  175. IF AB$FLAG[0]
  176. THEN # TURN DOWNLINE BUFFERING ON #
  177. BEGIN
  178. IF DOWNUSE
  179. THEN # DOWNLINE FEATURE ALREADY ON #
  180. BEGIN
  181. NP$ERR("59"); # ISSUE DAYFILE MSG AND ABORT AP#
  182. END
  183.  
  184. IF AB$SIZE[0] LS MINABSIZE
  185. THEN # BUFFER SIZE IS TOO SMALL #
  186. BEGIN
  187. NP$ERR("60"); # ISSUE DAYFILE MSG AND ABORT AP#
  188. END
  189.  
  190. NP$SEND; # SEND EXISTING WORKLIST TO NIP #
  191.  
  192. LOC$APBUF = LOC(WSA) + 1; # START OF TEXT AREA OF APP BUF #
  193. P<WORKLIST> = LOC$APBUF; # USE APP BUF FOR THE WORKLIST #
  194. NEXT = 0; # START OF APP BUFFER #
  195. SPACE$LEFT = AB$SIZE[0]; # SPACE LEFT IN APP BUFFER #
  196. DOWNUSE = TRUE; # SET FLAG FOR DWNLIN MSG QUEUE #
  197.  
  198. END
  199. ELSE # TURN DOWNLINE BUFFERING OFF #
  200. BEGIN
  201. IF NOT DOWNUSE
  202. THEN # DOWNLINE FEATURE ALREADY OFF #
  203. BEGIN
  204. NP$ERR("61"); # ISSUE DAYFILE MSG AND ABORT AP#
  205. END
  206.  
  207. NP$SEND; # CLEAR BUFFER BY SENDING TO NIP#
  208.  
  209. # POINT WORKLIST B-ARRAY BACK TO#
  210. # FIXED BUFFER IN AIP'S FL #
  211. P<WORKLIST> = LOC(NWLBUF);
  212. NEXT = NHDR + 1; # RESET WORKLIST POINTERS #
  213. SPACE$LEFT = LWL;
  214. DOWNUSE = FALSE; # CLEAR FLAG FOR DWNLIN FEATURE #
  215. END
  216.  
  217. NP$USI; # SET S, I BITS IN NSUP AFTER #
  218. # CALL TO NP$SEND #
  219. GOTO FC$END;
  220.  
  221. END
  222.  
  223. FC$END:
  224. END
  225. ELSE # BAD FUNCTION CODE SPECIFIED #
  226. BEGIN
  227. NP$ERR("52");
  228. END
  229.  
  230. RETURN;
  231. END
  232. TERM
cdc/nos2.source/nam5871/netfunc.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator