home *** CD-ROM | disk | FTP | other *** search
/ Scene Xplorer 1 / Scene_Xplorer_1.iso / Tools / ProNet / source / filesystem / packet_descr next >
Text File  |  1978-01-11  |  11KB  |  538 lines

  1. this protocol is not exact.. some parts differ from the actual implementation
  2. it would be best if YOU closed this file immediately :))
  3.  
  4.  
  5.  
  6. Description to how packet data is transferred between handler and
  7. server (handler's point of view..)
  8. --------------------------------------------------------------------------
  9.  
  10. FH = FileHandle
  11. FL = FileLock
  12. BSTR = BCPL-String
  13. FIB = FileInfoBlock
  14. These abbreviations with small 's' before mean the same thing on the
  15. Server.
  16.  
  17. =======================================
  18. ACTION_LOCATE_OBJECT:
  19. =======================================
  20. Preprocessing:
  21.  
  22. Transfer to Server:
  23. FL->fl_Key or NULL if zero-lock.
  24. LONG (access mode)
  25. BSTR
  26.  
  27. Serveraction:
  28.  
  29. Backtransfer (besides dp_Action/Res1/Res2):
  30. Res1: BPTR to sFL or NULL if Error
  31.  
  32. Postprocessing:
  33. Create FL if FL was Zero
  34. &sFL -> FL->fl_Key
  35.  
  36. =======================================
  37. ACTION_FREE_LOCK:
  38. =======================================
  39. Preprocessing:
  40. If FL=0 then return immediately..
  41.  
  42. Transfer to Server:
  43. FL->fl_Key
  44.  
  45. Serveraction:
  46. Call Free_Lock.
  47.  
  48. Backtransfer (besides dp_Action/Res1/Res2):
  49. ++ no transfer back - one way packet.. ++
  50.  
  51. Postprocessing:
  52. Zero fl_Task and free memory.. Return DOSTRUE.
  53.  
  54. =======================================
  55. ACTION_DISK_INFO:
  56. =======================================
  57. Preprocessing:
  58.  
  59. Transfer to Server:
  60.  
  61. Serveraction:
  62. Allocate memory for InfoData, call DISK_INFO.
  63.  
  64. Backtransfer (besides dp_Action/Res1/Res2):
  65. block of InfoData - no Res1/Res2 is transferred..
  66.  
  67. Postprocessing:
  68. Change VolumeNode entry for Handler machine.
  69.  
  70. =======================================
  71. ACTION_INFO:
  72. =======================================
  73. Preprocessing:
  74.  
  75. Transfer to Server:
  76. FL->fl_Key
  77.  
  78. Serveraction:
  79. Allocate InfoData buffer, call INFO.
  80.  
  81. Backtransfer (besides dp_Action/Res1/Res2):
  82. block of InfoData.
  83.  
  84. Postprocessing:
  85.  
  86. =======================================
  87. ACTION_EXAMINE_OBJECT:
  88. =======================================
  89. Preprocessing:
  90.  
  91. Transfer to Server:
  92. FL->fl_Key
  93.  
  94. Serveraction:
  95. Allocate own sFIB, call EXAMINE_OBJECT with sFL and sFIB.
  96. If ERROR, then dealloc sFIB.
  97.  
  98. Backtransfer (besides dp_Action/Res1/Res2):
  99. &sFIB(APTR!), sFIB
  100.  
  101. Postprocessing:
  102. &sFIB -> FIB->fib_DiskKey
  103.  
  104. =======================================
  105. ACTION_EXAMINE_NEXT:
  106. =======================================
  107. Preprocessing:
  108.  
  109. Transfer to Server:
  110. FL->fl_Key
  111. FIB->fib_DiskKey
  112.  
  113. Serveraction:
  114. Call EXAMINE_NEXT. If ERROR, then dealloc sFIB.
  115.  
  116. Backtransfer (besides dp_Action/Res1/Res2):
  117. sFIB
  118.  
  119. Postprocessing:
  120.  
  121. =======================================
  122. ACTION_SET_COMMENT:
  123. =======================================
  124. Preprocessing:
  125.  
  126. Transfer to Server:
  127. FL->fl_Key
  128. [2bytes Space -> lW-alignment]
  129. Comment-String [filled up to 80 chars]
  130. Object-Name-String
  131.  
  132. Serveraction:
  133. Call SET_COMMENT.
  134.  
  135. Backtransfer (besides dp_Action/Res1/Res2):
  136.  
  137. Postprocessing:
  138.  
  139. =======================================
  140. ACTION_FLUSH:
  141. =======================================
  142. Preprocessing:
  143.  
  144. Transfer to Server:
  145.  
  146. Serveraction:
  147. Call ACTION_FLUSH.
  148.  
  149. Backtransfer (besides dp_Action/Res1/Res2):
  150.  
  151. Postprocessing:
  152.  
  153. =======================================
  154. ACTION_WRITE_PROTECT:
  155. =======================================
  156. Preprocessing:
  157.  
  158. Transfer to Server:
  159. dp_Arg1, dp_Arg2
  160.  
  161. Serveraction:
  162. Call WRITE_PROTECT.
  163.  
  164. Backtransfer (besides dp_Action/Res1/Res2):
  165.  
  166. Postprocessing:
  167.  
  168. =======================================
  169. ACTION_MORE_CACHE:
  170. =======================================
  171. Preprocessing:
  172.  
  173. Transfer to Server:
  174. dp_Arg1
  175.  
  176. Serveraction:
  177. Call MORE_CACHE.
  178.  
  179. Backtransfer (besides dp_Action/Res1/Res2):
  180.  
  181. Postprocessing:
  182.  
  183. =======================================
  184. ACTION_SERIALIZE_DISK:
  185. =======================================
  186. Preprocessing:
  187.  
  188. Transfer to Server:
  189.  
  190. Serveraction:
  191. Call SERIALIZE_DISK.
  192.  
  193. Backtransfer (besides dp_Action/Res1/Res2):
  194.  
  195. Postprocessing:
  196.  
  197. =======================================
  198. ACTION_FORMAT:
  199. =======================================
  200. Preprocessing:
  201.  
  202. Transfer to Server:
  203. dp_Arg2, [2bytes space], BString
  204.  
  205. Serveraction:
  206. Call FORMAT.
  207.  
  208. Backtransfer (besides dp_Action/Res1/Res2):
  209.  
  210. Postprocessing:
  211.  
  212. =======================================
  213. ACTION_RENAME_DISK:
  214. =======================================
  215. Preprocessing:
  216.  
  217. Transfer to Server:
  218. [2bytes free], BSTR (name)
  219.  
  220. Serveraction:
  221. Call RENAME_DISK
  222.  
  223. Backtransfer (besides dp_Action/Res1/Res2):
  224.  
  225. Postprocessing:
  226. Change dol_Name of Current Volume if no ERROR.
  227.  
  228. =======================================
  229. ACTION_FIND#?:
  230. =======================================
  231. Preprocessing:
  232.  
  233. Transfer to Server:
  234. FL->fl_Key or NULL if ZERO-lock.
  235. BSTR
  236.  
  237. Serveraction:
  238. Create sFH zeroed except fh_Pos and fh_End = -1
  239. Call FINDxxx.
  240.  
  241. Backtransfer (besides dp_Action/Res1/Res2):
  242. BPTR to sFH
  243.  
  244. Postprocessing:
  245. &sFH -> FH->fh_Arg1
  246. DOSTRUE -> fh_Port
  247.  
  248. =======================================
  249. ACTION_END:
  250. =======================================
  251. Preprocessing:
  252.  
  253. Transfer to Server:
  254. FH->fh_Arg1
  255.  
  256. Serveraction:
  257. Call END and free sFH.
  258.  
  259. Backtransfer (besides dp_Action/Res1/Res2):
  260.  
  261. Postprocessing:
  262.  
  263. =======================================
  264. ACTION_SEEK:
  265. =======================================
  266. Preprocessing:
  267.  
  268. Transfer to Server:
  269. FH->fh_Arg1, LONG, LONG
  270.  
  271. Serveraction:
  272. Call SEEK.
  273.  
  274. Backtransfer (besides dp_Action/Res1/Res2):
  275.  
  276. Postprocessing:
  277.  
  278. =======================================
  279. ACTION_READ:
  280. =======================================
  281. Preprocessing:
  282.  
  283. Transfer to Server:
  284. FH->fh_Arg1, LONG (length)
  285.  
  286. Serveraction:
  287. Allocate buffer large enough, call ACTION_READ with it, then transmit
  288. data if no Error occured.
  289.  
  290. Backtransfer (besides dp_Action/Res1/Res2):
  291. First answer will contain only the results. If no error occured,
  292. more packets of a fixed size will follow. Size is defined in
  293. 'network.i' as MAXPACKETSIZE. The received data will be put in
  294. the buffer passed in dp_Arg2
  295.  
  296. Postprocessing:
  297.  
  298. =======================================
  299. ACTION_WRITE:
  300. =======================================
  301. Preprocessing:
  302.  
  303. Transfer to Server:
  304. FH->fh_Arg1, LONG (length)
  305.  
  306. Serveraction:
  307. Allocate buffer large enough and return error if no mem.
  308.  
  309. Backtransfer (besides dp_Action/Res1/Res2):
  310.  
  311. Postprocessing:
  312. Send write data in chunks of MAXPACKETSIZE bytes. The data will be
  313. put into the buffer allocated by the Server. If all bytes have been
  314. sent, the Server calls ACTION_WRITE with it and returns the results.
  315.  
  316. =======================================
  317. ACTION_SAME_LOCK:
  318. =======================================
  319. Preprocessing:
  320. Test if fl_Volume of both Locks are equal - if not, return DOSFALSE/0.
  321.  
  322. Transfer to Server:
  323. 2xFL->fl_Key
  324.  
  325. Serveraction:
  326. Try SAME_LOCK. If not implemented, try comparing fl_Volume, then try
  327. comparing fl_Key - if this is okay, return OK.
  328.  
  329. Backtransfer (besides dp_Action/Res1/Res2):
  330.  
  331. Postprocessing:
  332.  
  333. =======================================
  334. ACTION_SET_PROTECT:
  335. =======================================
  336. Preprocessing:
  337.  
  338. Transfer to Server:
  339. FL->fl_Key
  340. [2bytes Space -> lW-alignment]
  341. Object-Name-String
  342.  
  343. Serveraction:
  344. Call SET_PROTECT.
  345.  
  346. Backtransfer (besides dp_Action/Res1/Res2):
  347.  
  348. Postprocessing:
  349.  
  350. =======================================
  351. ACTION_COPY_DIR:
  352. =======================================
  353. Preprocessing:
  354.  
  355. Transfer to Server:
  356. FL->fl_Key
  357.  
  358. Serveraction:
  359. Call COPY_DIR
  360.  
  361. Backtransfer (besides dp_Action/Res1/Res2):
  362. BPTR->sFL(in Res1), fl_Access
  363.  
  364. Postprocessing:
  365. Create new lock if no error occured and put fl_Access there.
  366.  
  367. =======================================
  368. ACTION_PARENT:
  369. =======================================
  370. similar to COPY_DIR.
  371.  
  372. =======================================
  373. ACTION_PARENT_FH:
  374. =======================================
  375. Preprocessing:
  376.  
  377. Transfer to Server:
  378. dp_Arg1
  379.  
  380. Serveraction:
  381. Call PARENT_FH.
  382.  
  383. Backtransfer (besides dp_Action/Res1/Res2):
  384. BPTR->sFL(in Res1), fl_Access
  385.  
  386. Postprocessing:
  387. Create new lock if no error occured and put fl_Access there.
  388.  
  389. =======================================
  390. ACTION_COPY_DIR_FH:
  391. =======================================
  392. similar to PARENT_FH.
  393.  
  394. =======================================
  395. ACTION_DELETE_OBJECT:
  396. =======================================
  397. Preprocessing:
  398.  
  399. Transfer to Server:
  400. FL->fl_Key, BSTR
  401.  
  402. Serveraction:
  403. Call DELETE_OBJECT.
  404.  
  405. Backtransfer (besides dp_Action/Res1/Res2):
  406.  
  407. Postprocessing:
  408.  
  409. =======================================
  410. ACTION_RENAME_OBJECT:
  411. =======================================
  412. Preprocessing:
  413.  
  414. Transfer to Server:
  415. 2xFL->fl