User Tools

Site Tools


cdc:nos2.source:nam5871:nicnapx

NICNAPX

Table Of Contents

  • [00011] PROC NICNAPX
  • [00054] PROC MGETS
  • [00055] PROC NFOB
  • [00056] PROC XTRACE

Source Code

NICNAPX.txt
  1. *DECK NICNAPX
  2. USETEXT NIPDEF
  3. USETEXT SUPMSG
  4. USETEXT PARAMS
  5. USETEXT LLCB
  6. USETEXT AHEADER
  7. USETEXT ACKHEAD
  8. USETEXT NCNB
  9. USETEXT PT
  10. USETEXT STATTAB
  11. PROC NICNAPX; # SEND ICN/AP/R,ICN/AP/N,A OR ICN/EX/N,A #
  12. STARTIMS;
  13. #
  14. *1DC NICNAPX
  15. *
  16. * 1. PROC NAME AUTHOR DATE
  17. * NICNAPX A. BEN-ARTZI 82/05/05
  18. *
  19. * 2. FUNCTIONAL DESCRIPTION
  20. * SEND ICN/AP/A OR ICN/AP/N TO CCP
  21. *
  22. * 3. METHOD USED
  23. * ALLOCATE A BUFFER FOR THE MESSAGE
  24. * SET UP APPLICATION AND TEXT FIELDS
  25. * LINK MESSAGE TO PIP OUTBOUND CHAIN
  26. * NORMAL OR ABNORMAL ARE DETERMINED BY REASON CODE
  27. *
  28. * 4. ENTRY PARAMETERS
  29. * PARAMS1 - CONNECTION NUMBER
  30. * PARAMS2 - LLCB ADDRESS
  31. * PARAMS3 - REASON CODE FOR THE ICN/AP/A
  32. *
  33. * 5. EXIT PARAMETERS
  34. * NONE
  35. *
  36. * 6. COMDECKS CALLED AND SYMPL TEXTS USED
  37. * NIPDEF SUPMSG PARAMS LLCB AHEADER
  38. *
  39. * 7. ROUTINES AND OVERLAYS CALLED
  40. * XTRACE - TRACE PROCEDURE CALL
  41. * MGETS - ALLOCATE A BUFFER
  42. * NFOB - LINK BUFFER TO PIP OUTBOUND CHAIN
  43. *
  44. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  45. * THIS PROCEDURE IS CALLED BY SECONDARY OVERLAY COMPCON.
  46. *
  47.  #
  48. STOPIMS;
  49. #
  50.   EXTERNAL REFERENCES
  51. #
  52. XREF
  53. BEGIN
  54. PROC MGETS; # GET BUFFER #
  55. PROC NFOB; # SEND DATA TO NETWORK #
  56. PROC XTRACE; # TRACE CALL #
  57. END
  58. #
  59.   LOCAL VARIABLES
  60. #
  61. ITEM CN; # CONNECTION NUMBER #
  62. ITEM ACKQSIZE; # ACK QUEUE BUFFER SIZE #
  63. ITEM BUFADDR; # ACK QUEUE BUFFER ADDRESS #
  64. ITEM TLC; # TEXT LENGTH IN CHARACTERS #
  65. ARRAY SMWORD[0:0] S(1);
  66. BEGIN # FIRST WORD OF INCOMING SM #
  67. ITEM PFCSFCV U(00,00,16); # PFC/SFC #
  68. ITEM PFCSFCA B(00,08,01); # ERROR RESPONSE BIT #
  69. ITEM PFCSFCN B(00,09,01); # NORMAL RESPONSE BIT #
  70. END
  71. BEGIN # NICNAPX #
  72.  
  73. CONTROL EJECT;
  74.  
  75. CONTROL IFEQ DEBUG,1;
  76. XTRACE("CNAPX"); # TRACE CALL #
  77. CONTROL FI;
  78.  
  79. P<AHEADER> = PARAMS1+BLKHSIZE; # FWA OF SM ABH #
  80. P<SUPMSG> = P<AHEADER>+ABHSIZE; # FWA OF SM #
  81. P<SMNIP> = P<SUPMSG>;
  82. P<SMNVF> = P<SUPMSG>;
  83. P<NCNB> = PARAMS4; # FWA OF NCNB #
  84. P<LLCB> = PARAMS2;
  85. IF P<NCNB> NQ 0
  86. THEN # NCNB EXISTS, CR/IAP/N OR CR/RAP/N OR CR/RAP/A #
  87. BEGIN
  88. CN = NCNBCN[0]; # CONNECTION NUMBER #
  89. IF SFC[0] EQ IAP
  90. THEN # ITS A CR/IAP/N#
  91. PFCSFCV[0] = ICNAP;
  92. ELSE # ITS A CR/RAP/N OR CR/RAP/A #
  93. BEGIN # SEND ICN/EX OR ICN/AP RESPONSE #
  94. IF NCNBX25[0]
  95. THEN # ITS A X.25 A-A CONNECTION #
  96. PFCSFCV[0] = ICNEXN; # PRESET TO ICN/EX/N #
  97. ELSE # ITS A A-A CONNECTION OVER H-H LINK #
  98. PFCSFCV[0] = ICNAPN; # PRESET TO ICN/AP/N #
  99. IF RB[0]
  100. THEN # ITS A CR/RAP/N FROM NVF #
  101. BEGIN # SET DOWNLINE BLOCK LIMIT, BUILD ACK QUEUE #
  102. NCNBDBL[0] = ICNADBL[0]; # ICN FORMAT = CR FORMAT #
  103. ACKQSIZE = NCNBDBL[0]+ACKHSIZE; # ACK QUEUE SIZE #
  104. MGETS(ACKQSIZE,BUFADDR,TRUE); # GET ACK QUEUE BUFFER #
  105. P<ACKHEAD> = BUFADDR; # FWA OF ACK QUEUE #
  106. ACKQID[0] = ACKQIDVALUE; # SET BLOCK IDENTIFIER #
  107. ACKNCNB[0] = P<NCNB>; # SET CORR NCNB ADDRESS #
  108. NCNBAKIN[0] = 0; # SET IN PTR #
  109. NCNBAKOU[0] = 0; # SET OUT PTR #
  110. NCNBACKQ[0] = BUFADDR; # SET ADDRESS OF ACK QUEUE #
  111. IF CRAPRI[0]
  112. THEN # ITS A HIGH PRIORITY CONNECTION #
  113. NCNBPRI[0] = 1;
  114. ELSE # ITS A LOW PRIORITY CONNECTION #
  115. NCNBPRI[0] = 2;
  116. IF LLCBNRL[0] EQ BUFLSM# BUFFER REGULATION LEVEL 1 #
  117. THEN
  118. BEGIN
  119. NCNBNR[0] = TRUE; # PUT NCNB IN REGULATION #
  120. END
  121. ELSE
  122. BEGIN
  123. IF LLCBNRL[0] EQ BUFLHDS # BUFFER REGULATION LEVEL 2 #
  124. THEN
  125. BEGIN
  126. IF NCNBPRI[0] EQ 2 # LOW PRIORITY DATA #
  127. THEN
  128. BEGIN
  129. NCNBNR[0] = TRUE; # PUT NCNB IN REGULATION #
  130. END
  131. END
  132. END
  133. CONTROL IFEQ STAT,1;
  134. ST$AQ = ST$AQ+1; # INCREMENT ACK QUEUE COUNT #
  135. CONTROL FI;
  136. END
  137. END
  138. END
  139.  
  140. ELSE # SET ERROR RESPONSE, REJECT ICN/AP/R OR ICN/EX/R #
  141. BEGIN
  142. PFCSFCV[0] = PFCSFC[0] ;
  143. CN = ICNCN[0] ;
  144. END
  145.  
  146. IF PARAMS3 NQ 0
  147. THEN # ERROR RESPONSE REASON CODE #
  148. BEGIN
  149. PFCSFCN[0] = FALSE; # CLEAR NORMAL RESPONSE BIT #
  150. PFCSFCA[0] = TRUE; # SET ERROR RESPONSE BIT #
  151. END
  152.  
  153. IF PFCSFCV[0] NQ ICNAP # NOT AN ICN/AP/R FROM NIP #
  154. AND PFCSFCV[0] NQ ICNEXN # NOT AN ICN/EX/N TO NETWORK #
  155. THEN # SEND ONE WORD RESPONSE ONLY #
  156. BEGIN # SEND ICN/AP/N OR ICN/EX/A OR ICN/AP/A #
  157. MGETS(LICNAP+BLKHSIZE+ABHSIZE,BUFADDR,TRUE);
  158. TLC = LICNAPA;
  159. END
  160. ELSE # ITS ICN/AP/R OR ICN/EX/N #
  161. BEGIN # USE CR/IAP/N OR CR/RAP/N BUFFER #
  162. TLC = (ABHTLC[0]*15)/2; # CONVERT TO ASCII CHARACTER COUNT #
  163. IF PFCSFCV[0] EQ ICNEXN
  164. THEN
  165. BEGIN
  166. TLC = TLC - 1; # LESS ONE EXTRA OCTET FOR A 3 WORD #
  167. END # INCNEXN #
  168. ELSE
  169. BEGIN
  170. IF PFCSFCV[0] EQ ICNAP # IF ICNAP #
  171. THEN
  172. BEGIN
  173. TLC = CRBYTE; # EXTRACT CHARACTER COUNT FROM #
  174. END # CRIAPN #
  175. END
  176. BUFADDR = PARAMS1; # REUSE CR/IAP/N OR CR/RAP/N BUFFER #
  177. END
  178.  
  179. P<AHEADER> = BUFADDR+BLKHSIZE;
  180. P<SUPMSG> = P<AHEADER>+ABHSIZE;
  181. P<SMNIP> = P<SUPMSG>; # RESET BASED POINTERS #
  182. ABHABT[0] = APPCMD;
  183. ABHACT[0] = CT8ASCII;
  184. ABHTLC[0] = TLC;
  185. PFCSFC[0] = PFCSFCV[0];
  186. ICNCN[0] = CN;
  187. ICNRAP[0] = PARAMS3; # REASON CODE IF AN ERROR RESPONSE #
  188. NFOB(BUFADDR,PARAMS2); # SEND SM TO NETWORK #
  189.  
  190. RETURN;
  191. END # NICNAPX #
  192. TERM
cdc/nos2.source/nam5871/nicnapx.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator