User Tools

Site Tools


cdc:nos2.source:nam5871:textipl

TEXTIPL

Table Of Contents

  • [00002] PROC TEXTIPL
  • [00004] TEXTIPL - SYMPL TEXT FOR THE IP SOCKET LIBRARY

Source Code

TEXTIPL.txt
  1. *DECK TEXTIPL
  2. PROC TEXTIPL;
  3. *CALL COPYRITE CDCNET - COPYRIGHT CONTROL DATA. 1992.
  4. # TITLE TEXTIPL - SYMPL TEXT FOR THE IP SOCKET LIBRARY #
  5.  
  6. CONTROL STEXT;
  7.  
  8. BEGIN # TEXTIPL #
  9. #
  10. **** TEXTIPL SYMPL TEXT FOR THE IP SOCKET LIBRARY
  11. *
  12. * THIS PROCEDURE GENERATES A SYMPL TEXT FOR COMPILING THE IP
  13. * SOCKET LIBRARY FOR TCP AND UDP INTERFACES.
  14. * IT CONTAINS DEFINITIONS OF SYMBOLS, PARAMETERS, COMMON BLOCKS,
  15. * ETC THROUGHOUT THE PROGRAM.
  16. *
  17. *
  18. #
  19. *CALL COPYRITC
  20.  
  21. #
  22. **** MISCELLANEOUS DEFINITIONS
  23. #
  24. DEF SM$ # 0 #; # SUPERVISORY MESSAGE LIST NUMB #
  25. DEF DATA$ # 1 #; # DATA MESSAGE LIST NUMBER #
  26.  
  27. DEF ACNSIZE$ # 7 #; # ACN CONNECTION BLOCK SIZE #
  28. DEF MINACN$ # 1 #; # MINIMUM NAM CONNECTION NUMBER #
  29. DEF MAXACN$ # 5 #; # MAXIMUM NAM CONNECTION NUMBER #
  30.  
  31. DEF INPSIZE$ # 273 #; # SIZE OF INPUT BUFFER #
  32. DEF OUTSIZE$ # 273 #; # SIZE OF OUTPUT BUFFER #
  33.  
  34. DEF NORMWAIT$ # 2 #; # NORMAL NETWAIT TIME #
  35. DEF NOWAIT$ # 1 #; # NO WAIT REQUESTED NETWAIT TIME#
  36.  
  37. DEF CONNECTABN$ # 1 #; # CON/ACRQ ABN VALUE #
  38.  
  39. DEF BLOCKWAIT$ # 60 #; # DEFAULT BLOCKING VALUE 60 SEC #
  40.  
  41. DEF HOSTNAME$ # "LOCALHOST_" #; # LOCAL HOST NAME IN TCPHOST FIL#
  42. DEF HOSTSIZE$ # 30 #; # MAXIMUM HOST NAME SIZE #
  43. DEF NLFILE #O"16220634000000000000"#;# LOG FILE NAME #
  44.  
  45. #
  46. **** DISPLAY CHARACTERS
  47. #
  48.  
  49. DEF CHARA$ # "A" #; # UPPER CASE "A" #
  50. DEF CHARZ$ # "Z" #; # UPPER CASE "Z" #
  51. DEF CHARNUL$ # 0 #; # NULL CHARACTER #
  52. DEF CHARNSIGN$ # O"60" #; # NUMBER SIGN #
  53. DEF CHARSP$ # " " #; # SPACE CHARACTER #
  54. DEF CHAR0$ # "0" #; # CHARACTER "0" #
  55. DEF CHAR9$ # "9" #; # CHARACTER "9" #
  56. DEF ESC76$ # O"76" #; # ESCAPE CHARACTER - OCTAL 76 #
  57.  
  58. #
  59. **** TCPHOST FILE INFORMATION.
  60. #
  61.  
  62. DEF TCPHFN$ # "TCPHOST" #; # TCP HOST FILE NAME #
  63.  
  64. #
  65. **** SOCKET APPLICATION ABORT CODES
  66. #
  67. DEF ERRLGL$ # 0 #; # ERR/LGL RECEIVED #
  68. DEF NAKERR$ # 1 #; # FC/NAK RECEIVED #
  69. DEF NCONACRQA$ # 2 #; # UNEXPECTED CON/ARCQ/A #
  70. DEF NCONCB$ # 3 #; # UNEXPECTED CON/CB/R #
  71. DEF NCONENDN$ # 4 #; # UNEXPECTED CON/END/N #
  72. DEF NCONREQ$ # 5 #; # INTERNAL ERROR #
  73. DEF NFCACK$ # 6 #; # UNEXPECTED FC/ACK #
  74. DEF NFCINIT$ # 7 #; # UNEXPECTED FC/INIT/R #
  75. DEF NDATA$ # 8 #; # UNEXPECTED DATA #
  76. DEF NINVALID$ # 9 #; # INVALID DATA OR UDP VERSION #
  77. DEF INTERROR$ # 10 #; # INTERNAL ERROR #
  78. DEF NLAST$ # 10 #; # LAST EXIT CONDITION #
  79.  
  80. #
  81. **** NAM NETON STATUS
  82. #
  83. STATUS NETON$STATUS # NETON STATUS LIST #
  84. SUCCESS, # NETON SUCCESSFUL #
  85. UNAVAILABLE, # NAM UNAVAILABLE #
  86. DUPLICATE, # DUPLICATE NETON ATTEMPT #
  87. DISABLED, # APPLICATION DISABLED #
  88. HSTNOTFOUND; # HOST NOT FOUND IN TCPHOST FILE#
  89.  
  90. #
  91. **** PROTOCOL TYPES SUPPORTED BY THE SOCKET LIBRARY
  92. #
  93. STATUS PTYPE
  94. SOCKETUDP, # UDP PACKET PROTOCOL #
  95. SOCKETTCP; # TCP STREAM PROTOCOL #
  96.  
  97. #
  98. **** SOCKET CONNECTION STATE TO THE GATEWAY.
  99. #
  100. STATUS CONNECTSTATE
  101. IDLE, # GATEWAY CONN NOT ESTABLISHED #
  102. CONNECTED, # CONNECT EST, CON/REQ/R RECEIVD#
  103. OPEN, # CONNECTION OPEN, FC/INIT REC #
  104. BOUND, # SOCKET BOUND TO A PORT #
  105. CLOSING, # SENT THE CON/END/R MESSAGE #
  106. CLOSED; # THE SOCKET IS CLOSED #
  107.  
  108. #
  109. **** SOCKET ROUTINES RETURN STATUS CODES
  110. #
  111. STATUS SOCKSTAT
  112. OK, # COMPLETE NO ERROR #
  113. WAIT, # CONNECTION INIT IN PROCESS #
  114. ABORT, # CONNECTION ABORTED #
  115. NODATA, # NO SM/DATA AVAILABLE #
  116. FLOWCTRL, # DATA NOT SENT, AT ABL #
  117. INVALIDST, # INVALID STATE FOR THE REQUEST #
  118. CONFIGERR, # SYSTEM CONFIGURED INCORRECTLY #
  119. UNAVGATE, # TCP/IP GATEWAY UNAVAILABLE #
  120. REQFAIL; # REQUEST FAILED #
  121.  
  122. #
  123. **** TCP/IP UDP GATEWAY INTERFACE DECLARATIONS
  124. *
  125. * THE FOLLOWING CONTAIN CONSTANT AND STATUS DECLARATIONS RELATED
  126. * TO THE IP SOCKET LIBRARY INTERFACE TO THE CDCNET TCP/IP GATEWAY.
  127. *
  128. #
  129.  
  130. DEF BASENAME$ # "TCPIPGW" #; # BASE TCPIP GW NAME #
  131. DEF ADDSIZE$ # 4 #; # IP ADDRESS RECORD SIZE #
  132. DEF UDPHEADSZ$ # 16 #; # BYTES IN A UDP HEADER RECORD #
  133.  
  134. #
  135. **** TCP/IP UDP GATEWAY INTERFACE REQUEST/INDICATIONS
  136. #
  137. DEF CALLREQ$ # X"10" #; # UDP CALL REQUEST #
  138. DEF DATAREQ$ # X"11" #; # DATA REQUEST, NO DESTINATION #
  139. DEF DESTREQ$ # X"12" #; # DATA REQUEST WITH DESTINATION #
  140. DEF DATAIND$ # X"13" #; # DATA INDICATION FROM THE GW #
  141. DEF CALLRES$ # X"14" #; # CALL RESPONSE #
  142.  
  143. DEF UDPVERS$ # X"2" #; # UDP PROTOCOL VERSION #
  144.  
  145. STATUS IP$FIU # IP ADDRESS FIELDS IN USE #
  146. NONE,
  147. NETWORK,
  148. HOST,
  149. BOTH;
  150.  
  151. #
  152. **** GW$INT$COM - GATEWAY INTERFACE COMMON AREA
  153. *
  154. * THIS LABELLED COMMON BLOCK CONTAINS THE ARRAY AND BASED ARRAY
  155. * AREAS USED TO COMMUNICATE WITH THE GATEWAY.
  156. *
  157. #
  158. COMMON GW$INT$COM;
  159. BEGIN # GW$INT$COM #
  160.  
  161. ARRAY TGW$GWNAME [00:00] S(1);
  162. BEGIN
  163. ITEM TGW$BASENAME C(00,00,07); # BASE DEFAULT GATEWAY NAME #
  164. ITEM TGW$MID C(00,42,03); # MACHINE IDENTIFIER #
  165. END
  166.  
  167. ARRAY UDP$HEAD$REC [00:00] S(UDPHEADSZ$);
  168. BEGIN
  169. ITEM UDP$HEADER U(00,52,08); # UDP DATAGRAM HEADER REQUEST #
  170. ITEM UDP$VERSION U(01,52,08); # UDP VERSION #
  171. ITEM UDP$NOTUSED U(02,52,08); # SPARE BYTE #
  172. ITEM UDP$FIU U(03,52,08); # IP ADDRESS FIELDS IN USE #
  173. END
  174.  
  175. ARRAY REC$UDP [00:00] S(2);
  176. BEGIN # FIRST 2 BYTES OF RECEIVE HEAD #
  177. ITEM REC$REQ U(00,52,08); # UDP DATAGRAM HEADER REQUEST #
  178. ITEM REC$VER U(01,52,08); # UDP VERSION #
  179. END
  180.  
  181. ARRAY HST$ADDR [00:00] S(ADDSIZE$);;# LOCAL HOST IP ADDRESS #
  182.  
  183. BASED ARRAY IP$ADDR$REC [00:00] S(ADDSIZE$);
  184. BEGIN
  185. ITEM IP$IPFIU U(00,52,08); # FIELDS IN USE #
  186. ITEM IP$IPNET U(01,28,32); # NETWORK (O..0FFFFFFH) #
  187. ITEM IP$IPHOST U(02,28,32); # HOST (O..0FFFFFFH) #
  188. ITEM IP$PIU B(03,35,01); # PORT IN USE #
  189. ITEM IP$PORT U(03,36,24); # PORT NUMBER #
  190. ITEM IP$UDPORT U(03,28,32); # IN USE/PORT NUMBER #
  191. END
  192. END # GW$INT$COM #
  193.  
  194. #
  195. **** FMTCOM - FILE MANAGEMENT COMMON BLOCK.
  196. *
  197. * THIS COMMON BLOCK CONTAINS THE DEFINITIONS REQUIRED TO INTERACT
  198. * WITH THE NOS PERMANANT FILE SYSTEM.
  199. *
  200. #
  201.  
  202. #
  203. **** FET/CIO BUFFER DEFINITIONS.
  204. #
  205. DEF FBUFSIZ$ # 128 #; # CIO BUFFER SIZE = 2 PRUS #
  206. DEF FETSIZ$ # 16 #; # SIZE OF FET #
  207. DEF WORKSIZ$ # 24 #; # SIZE OF WORKING BUFFER #
  208.  
  209. COMMON FMTCOM;
  210. BEGIN # FMTCOM #
  211.  
  212. #
  213. **** FET - FILE ENVIRONMENT TABLE.
  214. *
  215. * THE FET BUFFER CONTAINS THE 16-WORD FET DEFINITION FOR READING
  216. * THE TCPHOST FILE.
  217. #
  218.  
  219. ARRAY FET [00:00] S(FETSIZ$);
  220. BEGIN
  221. ITEM FET$WORD U(00,00,60); # FULL WORD REFERENCE #
  222. ITEM FET$LFN C(00,00,07); # LOCAL FILE NAME #
  223. ITEM FET$LFNU U(00,00,42); # LFN AS NUMERIC #
  224. ITEM FET$STAT U(00,42,18); # RETURNED STATUS CODE #
  225. ITEM FET$LEVN U(00,42,04); # EOR/EOF LEVEL NUMBER #
  226. ITEM FET$AT U(00,46,05); # ABNORMAL TERMINATION CODE #
  227. ITEM FET$FSTAT U(00,48,11); # REPLY FROM *STATUS* MACRO #
  228. ITEM FET$CODE U(00,51,09); # RETURN CODE #
  229. ITEM FET$COMPB B(00,59,01); # COMPLETION BIT #
  230. ITEM FET$FET1 U(01,00,60); # FULL WORD REFERENCE #
  231. ITEM FET$DT C(01,00,02); # DEVICE TYPE #
  232. ITEM FET$DTU U(01,00,12); # DEVICE TYPE INTEGER #
  233. ITEM FET$RANF B(01,12,01); # RANDOM ACCESS FLAG #
  234. ITEM FET$UP B(01,14,01); # USER PROCESSING FLAG #
  235. ITEM FET$EP B(01,15,01); # ERROR PROCESSING #
  236. ITEM FET$RT B(01,16,01); # REAL TIME PROCESSING #
  237. ITEM FET$A B(01,21,01); # CCESS LEVEL PROCESSING #
  238. ITEM FET$FB B(01,23,01); # FLUSH BIT #
  239. ITEM FET$LEN U(01,36,06); # LENGTH OF FET-5 #
  240. ITEM FET$FIRST U(01,42,18); # FIRST POINTER #
  241. ITEM FET$IN U(02,42,18); # IN POINTER #
  242. ITEM FET$OUT U(03,42,18); # OUT POINTER #
  243. ITEM FET$FET4 U(04,00,60); # FULL WORD REFERENCE #
  244. ITEM FET$AL U(04,22,03); # FULL WORD REFERENCE #
  245. ITEM FET$LIMIT U(04,42,18); # LIMIT POINTER #
  246. ITEM FET$FET5 U(05,00,60); # FULL WORD REFERENCE #
  247. ITEM FET$CAT U(05,30,30); # SECURITY CATEGORIES #
  248. ITEM FET$FET6 U(06,00,60); # FULL WORD REFERENCE #
  249. ITEM FET$PFN C(08,00,07); # PERMANNET FILE NAME #
  250. ITEM FET$SR U(08,42,06); # SPECIAL REQUEST #
  251. ITEM FET$CT U(08,48,06); # FILE CATEGORY #
  252. ITEM FET$M U(08,54,06); # FILE ACCESS MODE #
  253. ITEM FET$UN C(09,00,07); # ALTERNATE USER NAME #
  254. ITEM FET$UNU U(09,00,42); # ALTERNATE USER NAME (NUM) #
  255. ITEM FET$DN U(09,42,06); # DEVICE NUMBER FOR CATLIST #
  256. ITEM FET$S U(09,36,24); # NUMBER OF PRUS FOR FILE #
  257. ITEM FET$PW C(10,00,07); # FILE PASSWORD #
  258. ITEM FET$PWU U(10,00,42); # FILE PASSWORD AS INTEGER #
  259. ITEM FET$ERAD U(10,42,18); # ERROR MESSAGE ADDRESS #
  260. ITEM FET$UCW U(11,00,60); # USER CONTROL WORD #
  261. ITEM FET$PN C(12,00,07); # PACKNAME #
  262. ITEM FET$PNU U(12,00,42); # PACKNAME AS INTEGER #
  263. ITEM FET$UNIT U(12,48,12); # NUMBER OF UNITS ON DEVICE #
  264. ITEM FET$NFN C(13,00,07); # NEW FILE NAME #
  265. ITEM FET$XT U(13,42,18); # EXPIRATION TERM #
  266. ITEM FET$PR U(15,00,03); # PREFERRED RESIDENCE #
  267. ITEM FET$BR U(15,03,03); # BACKUP REQUIREMENT #
  268. ITEM FET$SS U(15,06,06); # SUBSYSTEM #
  269. ITEM FET$AC U(15,12,02); # ALTERNATE USER CATLIST #
  270. END
  271.  
  272. #
  273. **** CIOBUF - CIRCULAR I/O BUFFER.
  274. *
  275. #
  276. ARRAY CIOBUF [00:00] S(FBUFSIZ$);
  277. BEGIN
  278. ITEM CIO$WORD U(00,00,60);
  279. END
  280.  
  281. #
  282. **** WORKBUF - FILE I/O WORKING BUFFER FOR DATA TRANSFER.
  283. *
  284. #
  285. ARRAY WORKBUF [00:00] S(WORKSIZ$);
  286. BEGIN
  287. ITEM WORK$CHAR C(00,00,240);
  288. END
  289.  
  290. END # FMTCOM #
  291.  
  292. #
  293. **** NETWORK SUPERVISORY MESSAGE DEFINITIONS
  294. *
  295. * SUPERVISORY MESSAGE DEFINITIONS ARE SUPPLIED BY THE COMMON
  296. * DECKS: SMAPPFC, SMAPDEF, MISCOM.
  297. #
  298. *CALL SMAPPFC
  299. *CALL SMAPDEF
  300. *CALL MISCOM
  301. #
  302. **** BASESM$COM - BASED ARRAY POINTERS.
  303. *
  304. * THIS LABELLED COMMON BLOCK CONTAINS THE BASED ARRAY POINTERS
  305. * WHICH ARE USED DURING SUPERVISORY MESSAGE PROCESSING.
  306. *
  307. #
  308. COMMON BASESM$COM;
  309. BEGIN # BASESM$COM #
  310. #
  311. **** ABH - APPLICATION BLOCK HEADER DEFINITION.
  312. *
  313. * THE ABH FIELD DECLARATIONS ARE SUPPLIED BY THE COMMON DECK
  314. * *HEADER*.
  315. #
  316. BASED ARRAY ABH [00:00] S(1);
  317. BEGIN
  318. *CALL HEADER
  319. END
  320.  
  321. #
  322. **** APSM - SUPERVISORY MESSAGES DEFINITION.
  323. *
  324. * THE SUPERVISORY MESSAGE FIELD DECLARATIONS ARE SUPPLIED
  325. * BY THE COMMON DECKS *SUPMSG* AND *SMAPPL*.
  326. #
  327.  
  328. BASED ARRAY APSM [00:00] S(19);
  329. BEGIN
  330. *CALL SUPMSG
  331. *CALL SMAPPL
  332. END
  333. END # BASESM$COM #
  334.  
  335. #
  336. **** SOCKET$COM - COMMON STORAGE AREA FOR THE SOCKET LIBRARY.
  337. *
  338. * THIS LABELLED COMMON BLOCK CONTAINS THE ACTUAL STORAGE AREA
  339. * REQUIRED BY THE SOCKET LIBRARY DURING PROCESSING.
  340. *
  341. #
  342.  
  343. COMMON SOCKET$COM;
  344. BEGIN # SOCKET$COM #
  345.  
  346. ITEM IPMC I; # LOGGING MESSAGE COUNT #
  347. ITEM IPHOSTUN C(10); # TCPHOST USERNAME #
  348. ITEM CURACN U; # CURRENT ACN NUMBER #
  349. ITEM NUMACN U; # NUMBER OF OUTSTANDING CONNECTS#
  350. ITEM BLOCK B; # WAIT FOR COMPLETION #
  351. ITEM NDLFILE I; # NETWORK DEBUG LOG FILE #
  352. ITEM DFLAG B; # DEBUG FLAG #
  353.  
  354. #
  355. **** NSUP - NAM SUPERVISORY STATUS WORD
  356. *
  357. * NSUP IS THE WORD INTO WHICH NAM STORES THE STATE OF
  358. * NETWORK COMMUNICATIONS.
  359. *
  360. #
  361. ARRAY NSUP [00:00] S(1);
  362. BEGIN
  363. ITEM NSUP$W U(00,00,60); # FULL WORD REFERNECE #
  364. ITEM NSUP$C B(00,00,01); # COMPLETION BIT #
  365. ITEM NSUP$N B(00,02,01); # NAM AVAILABLE BIT #
  366. ITEM NSUP$D B(00,03,01); # DATA MESSAGE AVAILABLE BIT #
  367. ITEM NSUP$DU U(00,03,01); # DATA MESSAGE AVAILABLE BIT #
  368. ITEM NSUP$S B(00,04,01); # SUPERVISORY MESSAGE AVAIL BIT #
  369. ITEM NSUP$SU U(00,04,01); # SUPERVISORY MESSAGE AVAIL BIT #
  370. ITEM NSUP$MC U(00,30,30); # DEBUG LOG OPER MESSAGE COUNT #
  371. END
  372.  
  373. #
  374. **** IABH - INPUT APPLICATION BLOCK HEADER
  375. *
  376. * IABH IS THE WORD INTO WHICH NAM STORES THE APPLICATION BLOCK
  377. * HEADER FOLLOWING A *NETGETL* OPERATION.
  378. *
  379. #
  380. ARRAY IABH [00:00] S(1);
  381. BEGIN
  382. ITEM IABH$WRD U(00,00,60); # FULL WORD REFERENCE #
  383. END
  384.  
  385. #
  386. **** DABH - OUTPUT DATA APPLICATION BLOCK HEADER
  387. *
  388. * DABH IS THE WORD CONTAINING THE APPLICATION BLOCK HEADER WHICH
  389. * NAM INTERPRETS AFTER A *NETPUT* OPERATION FOR OUTGOING DATA TO
  390. * A MDI.
  391. * FIXED FIELDS IN THE ABH ARE SET UP AT INITIALIZATION TIME.
  392. *
  393. #
  394. ARRAY DABH [00:00] S(1);
  395. BEGIN
  396. ITEM DABH$WRD U(00,00,60); # FULL WORD REFERENCE #
  397. END
  398.  
  399. #
  400. **** SABH - OUTPUT SUPERVISORY MESSAGE APPLICATION BLOCK HEADER
  401. *
  402. * SABH IS THE WORD CONTAINING THE APPLICATION BLOCK HEADER WHICH
  403. * NAM INTERPRETS AFTER A *NETPUT* OPERATION OF AN OUTGOING
  404. * ASYNCHRONOUS SUPERVISORY MESSAGE.
  405. * FIXED FIELDS IN THE ABH ARE SET UP AT INITIALIZATION TIME.
  406. *
  407. #
  408. ARRAY SABH [00:00] S(1);
  409. BEGIN
  410. ITEM SABH$WRD U(00,00,60); # FULL WORD REFERENCE #
  411. END
  412.  
  413. #
  414. **** BWT - BLOCK WAIT TIME
  415. *
  416. * BWT IS THE WORDS CONTAINING THE TIME OF DAY USED TO DETERMINE
  417. * THE LENGTH OF TIME FOR THE IP SOCKET ROUTINES TO BLOCK WAITING
  418. * FOR A REQUEST TO BE PROCESSED.
  419. #
  420. ARRAY BWT$TIME [00:00] S(2);
  421. BEGIN
  422. ITEM BWT$WORD U(00,00,60); # FULL WORD REFERENCE #
  423. ITEM BWT$SECONDS U(00,00,24); # SECOND TIMER #
  424. ITEM BWT$MILLI U(00,24,36); # MILLISECOND TIMER #
  425. ITEM BWT$EXPIRE U(01,00,24); # SECOND EXPIRE TIME #
  426. END
  427.  
  428. #
  429. **** ISS - INITIATING SOCKET STATUS
  430. *
  431. * ISS IS THE WORD CONTAINING THE SOCKET STATUS USED THROUGH THE
  432. * OPEN SOCKET PROCEDURE TO DETERMINE THE COMPLETION OF THE OPEN
  433. * SOCKET PROCESS.
  434. #
  435. ARRAY ISS$CONNECT [00:00] S(1);
  436. BEGIN
  437. ITEM ISS$WORD U(00,00,60); # FULL WORD REFERENCE #
  438. ITEM ISS$STATUS S:SOCKSTAT(00,00,03); # CURRENT SOCKET STATUS #
  439. ITEM ISS$ACN U(00,48,12); # NEW CONNECTION ACN #
  440. END
  441.  
  442. #
  443. **** ACNST - APPLICATION CONNECTION SOCKET TABLE.
  444. *
  445. * ACNST IS THE TABLE USED TO KEEP TRACK OF THE SOCKET CONNECTIONS.
  446. *
  447. #
  448. ARRAY ACN$ST [1:MAXACN$] S(ACNSIZE$);
  449. BEGIN
  450. ITEM ACN$WORD0 U(00,00,60); # FULL WORD REFERENCE #
  451. ITEM ACN$ACN U(00,00,12); # CONNECTION NUMBER #
  452. ITEM ACN$PTYPE S:PTYPE(00,12,02); # PROTOCOL UDP OR TCP #
  453. ITEM ACN$CONTROL B(00,14,01); # CONTROL ACN FOR TCP ONLY #
  454. ITEM ACN$STATE S:CONNECTSTATE(00,15,03);# CURRENT CONNECT STATE#
  455. ITEM ACN$DATACN U(00,18,12); # DATA CONNECTION FOR TCP #
  456. ITEM ACN$CNTRLACN U(00,18,12); # CONTROL ACN IF DATA CONN #
  457. ITEM ACN$DBZ U(00,30,12); # DOWNLINE BLOCK SIZE #
  458. ITEM ACN$ABL U(00,42,03); # APPLICATION BLOCK LIMIT #
  459. ITEM ACN$OBC U(00,45,03); # OUTSTANDING BLOCK COUNT #
  460. ITEM ACN$CONNECT B(00,58,01); # SOCKET CONNECTED TO NAM #
  461. ITEM ACN$ABORT B(00,59,01); # CON/CB RECEIVED #
  462. ITEM ACN$ABN U(01,00,12); # CURRENT APPL BLOCK NUMBER#
  463. ITEM ACN$DATAV B(01,24,01); # DATA AVAILABLE IN BUFFER #
  464. ITEM ACN$MORE B(01,25,01); # DATA IS A BLK BLOCK #
  465. ITEM ACN$DATALNTH U(01,30,12); # BYTES IN RECEIVED BUFFER #
  466. ITEM ACN$BUFFER U(01,42,18); # DATA BUFFER POINTER #
  467. ITEM ACN$SIPADDR U(02,00,60); # SOURCE IP ADDRESS LOC #
  468. ITEM ACN$SIPFIU S:IP$FIU(02,57,03); # FIELDS IN USE #
  469. ITEM ACN$SIPNET U(03,36,24); # NETWORK (O..0FFFFFFH) #
  470. ITEM ACN$SIPHOST U(04,36,24); # HOST (O..0FFFFFFH) #
  471. ITEM ACN$SUDPIU B(05,35,01); # PORT IN USE #
  472. ITEM ACN$SUDPORT U(05,36,24); # PORT (O..0FFFFH) #
  473. ITEM ACN$SIUPORT U(05,28,32); # IN USE/PORT #
  474. ITEM ACN$WAITIME U(06,48,09); # BLOCK TIME IN SECONDS #
  475. ITEM ACN$BLOCK B(06,59,01); # SOCKET BLOCKING #
  476. END
  477.  
  478. #
  479. **** INPUT BUFFER.
  480. *
  481. * THE INPUT BUFFER IS USED FOR RECEIVING DATA FROM THE NETWORK.
  482. *
  483. #
  484. ITEM INPLENGTH I; # INPUT LENGTH IN OCTETS #
  485.  
  486. ARRAY INPBUF [00:INPSIZE$] S(1); # INPUT BUFFER #
  487. BEGIN
  488. ITEM INP$WORD U(00,00,60);
  489. END
  490.  
  491. #
  492. **** OUTPUT BUFFER.
  493. *
  494. * THE OUTPUT BUFFER IS USED FOR WRITING TO A FILE AND SENDING
  495. * DATA TO THE NETWORK.
  496. *
  497. #
  498. ITEM OUTLENGTH I; # OUTPUT LENGTH IN OCTETS #
  499.  
  500. ARRAY OUTBUF [00:OUTSIZE$] S(1); # OUTPUT BUFFER #
  501. BEGIN
  502. ITEM OUT$WORD U(00,00,60);
  503. END
  504.  
  505. END # SOCKET$COM #
  506.  
  507. COMMON QUEUE$COM;
  508. BEGIN # QUEUE$COM #
  509.  
  510. #
  511. **** INPUT QUEUE STORAGE AREA.
  512. *
  513. * THIS ARRAY HOLDS ONE BLOCK OF DATA/CONNECTION TO BE PASSED TO
  514. * AN APPLICATION WHEN REQUESTED. ALSO CONTAINS A BASED ARRAY
  515. * POINTER USED TO MOVE DATA INTO THE ARRAY.
  516. *
  517. #
  518. BASED ARRAY REA$BUF [00:INPSIZE$] S(1);
  519. BEGIN
  520. ITEM REA$WORD U(00,00,60); # FULL WORD REFERENCE #
  521. END
  522.  
  523. ARRAY QUE$BUF [00:INPSIZE$,MINACN$:MAXACN$] S(1);
  524. BEGIN
  525. ITEM QUE$WORD U(00,00,60);
  526. END
  527. END # QUEUE$COM #
  528.  
  529.  
  530. END # TEXTIPL #
  531.  
  532. TERM
cdc/nos2.source/nam5871/textipl.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator