Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

973 lines
21 KiB

  1. /*
  2. File: afppackets.h
  3. Contains: Bitmaps and structures pertaining to the packets received in the session.
  4. These relate to functions used in afpsession.cp.
  5. Version: xxx put version here xxx
  6. Copyright: Copyright Apple Computer, Inc. 1992-1994
  7. File Ownership:
  8. DRI: Leland Wallace
  9. Other Contact: Brad Suinn
  10. Technology: AppleShare X
  11. All rights reserved
  12. Writers:
  13. (bms) Brad Suinn
  14. Change History (most recent first):
  15. <RASC14> 10/18/00 bms Add SymLinks, Finder Attribute bits, now using kAFPNameMax, DHX,
  16. LoginExt, limited chmod, checks for illegal filenames, and
  17. Deleting open files.
  18. <RASC13> 7/11/00 bms mmap support, atten support, and change some print levels.
  19. <RASC12> 6/19/00 bms Add deny modes and read/write bits.
  20. <RASC11> 5/24/00 bms Update again.
  21. <RASC10> 4/21/00 bms Add in the rest of the attribute definitions.
  22. <RASC9> 4/21/00 bms Add write inhibit bit
  23. <RASC8> 4/21/00 bms Add definitions for the attributes field
  24. <RASC7> 4/18/00 bms Add AFP2.3 string constant
  25. <RASC6> 4/7/00 bms Add FPZzzz and the getting/using of the reconnect token
  26. <RASC5> 3/31/00 bms Add some new definitions
  27. <RASC4> 2/2/00 bms Add AFP version string constants for the logins. Also add
  28. constants for the AFP version.
  29. <3> 12/17/99 GBV synced with server side 3.0 header
  30. <RASC2> 10/5/99 bms Make the 68K align macros work again.
  31. <RASC2> 8/25/99 bms Remove silly special characters.
  32. <4> 2/25/98 law added kFPwdPolicyErr
  33. <3> 8/11/97 law added kFPPwdNeedsChangeErr
  34. <2> 10/31/96 bms Add the align 68K flags for the PPC compiles.
  35. 7/18/94 MDV login cleanup
  36. 5/16/94 RMB vol consts and code standards
  37. 1/1/93 MB created
  38. To Do:
  39. */
  40. #ifndef __AFPPACKETS__
  41. #define __AFPPACKETS__
  42. #define kAFP30VersionString "AFPX03"
  43. #define kAFP23VersionString "AFP2.3"
  44. #define kAFP22VersionString "AFP2.2"
  45. #define kAFP21VersionString "AFPVersion 2.1"
  46. #if PRAGMA_STRUCT_ALIGN
  47. #pragma options align=mac68k
  48. #elif PRAGMA_STRUCT_PACKPUSH
  49. #pragma pack(push, 2)
  50. #elif PRAGMA_STRUCT_PACK
  51. #pragma pack(2)
  52. #endif
  53. // Defines used by client
  54. enum {
  55. kAFPVersion11 = 1,
  56. kAFPVersion20 = 2,
  57. kAFPVersion21 = 3,
  58. kAFPVersion22 = 4,
  59. kAFPVersion23 = 5,
  60. kAFPVersion30 = 6
  61. };
  62. enum {
  63. kFPAccessDenied = -5000,
  64. kFPAuthContinue = -5001,
  65. kFPBadUAM = -5002,
  66. kFPBadVersNum = -5003,
  67. kFPBitmapErr = -5004,
  68. kFPCantMove = -5005,
  69. kFPDenyConflict = -5006,
  70. kFPDirNotEmpty = -5007,
  71. kFPDiskFull = -5008,
  72. kFPEOFErr = -5009,
  73. kFPFileBusy = -5010,
  74. kFPFlatVol = -5011,
  75. kFPItemNotFound = -5012,
  76. kFPLockErr = -5013,
  77. kFPMiscErr = -5014,
  78. kFPNoMoreLocks = -5015,
  79. kFPNoServer = -5016,
  80. kFPObjectExists = -5017,
  81. kFPObjectNotFound = -5018,
  82. kFPParamErr = -5019,
  83. kFPRangeNotLocked = -5020,
  84. kFPRangeOverlap = -5021,
  85. kFPSessClosed = -5022,
  86. kFPUserNotAuth = -5023,
  87. kFPCallNotSupported = -5024,
  88. kFPObjectTypeErr = -5025,
  89. kFPTooManyFilesOpen = -5026,
  90. kFPServerGoingDown = -5027,
  91. kFPCantRename = -5028,
  92. kFPDirNotFound = -5029,
  93. kFPIconTypeError = -5030,
  94. kFPVolLocked = -5031,
  95. kFPObjectLocked = -5032,
  96. kFPContainsSharedErr = -5033,
  97. kFPIDNotFound = -5034,
  98. kFPIDExists = -5035,
  99. kFPDiffVolErr = -5036,
  100. kFPCatalogChanged = -5037,
  101. kFPSameObjectErr = -5038,
  102. kFPBadIDErr = -5039,
  103. kFPPwdSameErr = -5040,
  104. kFPPwdTooShortErr = -5041,
  105. kFPPwdExpiredErr = -5042,
  106. kFPInsideSharedErr = -5043,
  107. kFPInsideTrashErr = -5044,
  108. kFPPwdNeedsChangeErr = -5045,
  109. kFPwdPolicyErr = -5046
  110. };
  111. enum {
  112. kFPAddAPPL = 53,
  113. kFPAddComment = 56,
  114. kFPAddIcon = 192,
  115. kFPByteRangeLock = 1,
  116. kFPByteRangeLockExt = 59,
  117. kFPCatSearch = 43,
  118. kFPCatSearchExt = 67,
  119. kFPChangePassword = 36,
  120. kFPCloseDir = 3,
  121. kFPCloseDT = 49,
  122. kFPCloseFork = 4,
  123. kFPCloseVol = 2,
  124. kFPCopyFile = 5,
  125. kFPCreateID = 39,
  126. kFPCreateDir = 6,
  127. kFPCreateFile = 7,
  128. kFPDelete = 8,
  129. kFPDeleteID = 40,
  130. kFPEnumerate = 9,
  131. kFPEnumerateExt = 66,
  132. kFPExchangeFiles = 42,
  133. kFPFlush = 10,
  134. kFPFlushFork = 11,
  135. kFPGetAPPL = 55,
  136. kFPGetAuthMethods = 62,
  137. kFPGetComment = 58,
  138. kFPGetFileDirParms = 34,
  139. kFPGetForkParms = 14,
  140. kFPGetIcon = 51,
  141. kFPGetIconInfo = 52,
  142. kFPGetSrvrInfo = 15,
  143. kFPGetSrvrMsg = 38,
  144. kFPGetSrvrParms = 16,
  145. kFPGetUserInfo = 37,
  146. kFPGetVolParms = 17,
  147. kFPLogin = 18,
  148. kFPLoginCont = 19,
  149. kFPLoginDirectory = 63,
  150. kFPLogout = 20,
  151. kFPMapID = 21,
  152. kFPMapName = 22,
  153. kFPMoveAndRename = 23,
  154. kFPOpenDir = 25,
  155. kFPOpenDT = 48,
  156. kFPOpenFork = 26,
  157. kFPOpenVol = 24,
  158. kFPRead = 27,
  159. kFPReadExt = 60,
  160. kFPRemoveAPPL = 54,
  161. kFPRemoveComment = 57,
  162. kFPRename = 28,
  163. kFPResolveID = 41,
  164. kFPSetDirParms = 29,
  165. kFPSetFileDirParms = 35,
  166. kFPSetFileParms = 30,
  167. kFPSetForkParms = 31,
  168. kFPSetVolParms = 32,
  169. kFPWrite = 33,
  170. kFPWriteExt = 61,
  171. kFPZzzzz =122,
  172. kFPGetSessionToken = 64,
  173. kFPDisconnectOldSession = 65
  174. };
  175. enum { kFPNoUserID = -1, kFPGuestUserID = 0 };
  176. enum { kFPSoftCreate = 0, kFPHardCreate = 0x80 };
  177. enum { kFPShortName = 1, kFPLongName = 2, kFPUTF8Name = 3 };
  178. // Define Server Flags
  179. enum {
  180. kSupportsCopyfile = 0x01,
  181. kSupportsChgPwd = 0x02,
  182. kDontAllowSavePwd = 0x04,
  183. kSupportsSrvrMsg = 0x08,
  184. kSrvrSig = 0x10,
  185. kSupportsTCP = 0x20,
  186. kSupportsSrvrNotify = 0x40,
  187. kSupportsReconnect = 0x80,
  188. kSupportsDirServices = 0x100,
  189. kSupportsSuperClient = 0x8000
  190. };
  191. // Define Volume Attributes
  192. enum {
  193. kReadOnly = 0x01,
  194. kHasVolumePassword = 0x02,
  195. kSupportsFileIDs = 0x04,
  196. kSupportsCatSearch = 0x08,
  197. kSupportsBlankAccessPrivs = 0x10,
  198. kSupportsUnixPrivs = 0x20,
  199. kSupportsUTF8Names = 0x40
  200. };
  201. // Volume bitmap
  202. enum {
  203. kFPBadVolPre22Bitmap = 0xFE00,
  204. kFPBadVolBitmap = 0xF000,
  205. kFPVolAttributeBit = 0x1,
  206. kFPVolSignatureBit = 0x2,
  207. kFPVolCreateDateBit = 0x4,
  208. kFPVolModDateBit = 0x8,
  209. kFPVolBackupDateBit = 0x10,
  210. kFPVolIDBit = 0x20,
  211. kFPVolBytesFreeBit = 0x40,
  212. kFPVolBytesTotalBit = 0x80,
  213. kFPVolNameBit = 0x100,
  214. kFPVolExtBytesFreeBit = 0x200,
  215. kFPVolExtBytesTotalBit = 0x400,
  216. kFPVolBlockSizeBit = 0x800
  217. };
  218. // FileDir bitmap
  219. enum {
  220. kFPAttributeBit = 0x1,
  221. kFPParentDirIDBit = 0x2,
  222. kFPCreateDateBit = 0x4,
  223. kFPModDateBit = 0x8,
  224. kFPBackupDateBit = 0x10,
  225. kFPFinderInfoBit = 0x20,
  226. kFPLongNameBit = 0x40,
  227. kFPShortNameBit = 0x80,
  228. kFPNodeIDBit = 0x100,
  229. kFPProDOSInfoBit = 0x2000, // for AFP version 2.2 and prior
  230. kFPUTF8NameBit = 0x2000, // for AFP version 3.0 and greater
  231. kFPUnixPrivsBit = 0x8000 // for AFP version 3.0 and greater
  232. };
  233. // struct returned when the kFPUnixPrivsBit is used
  234. struct FPUnixPrivs {
  235. unsigned long uid;
  236. unsigned long gid;
  237. unsigned long permissions;
  238. unsigned long ua_permissions;
  239. };
  240. // attribute bits
  241. enum {
  242. kFPInvisibleBit = 0x01,
  243. kFPMultiUserBit = 0x02,
  244. kFPSystemBit = 0x04,
  245. kFPDAlreadyOpenBit = 0x08,
  246. kFPRAlreadyOpenBit = 0x10,
  247. kFPWriteInhibitBit = 0x20,
  248. kFPBackUpNeededBit = 0x40,
  249. kFPRenameInhibitBit = 0x80,
  250. kFPDeleteInhibitBit = 0x100,
  251. kFPCopyProtectBit = 0x400,
  252. kFPSetClearBit = 0x8000
  253. };
  254. // unique to Fork and File bitmap
  255. enum {
  256. kFPDataForkLenBit = 0x0200,
  257. kFPRsrcForkLenBit = 0x0400,
  258. kFPExtDataForkLenBit = 0x0800, // for AFP version 3.0 and greater
  259. kFPLaunchLimitBit = 0x1000,
  260. kFPExtRsrcForkLenBit = 0x4000, // for AFP version 3.0 and greater
  261. kFPGet22FileParmsMask = 0x77ff,
  262. kFPSet22FileParmsMask = 0x303d,
  263. kFPGet22DataForkParmsMask = 0x23ff,
  264. kFPGet22ResForkParmsMask = 0x25ff,
  265. kFPGetExtFileParmsMask = 0xf7ff,
  266. kFPSetExtFileParmsMask = 0x103d,
  267. kFPGetFileParmsMask = 0x27ff,
  268. kFPSetFileParmsMask = 0x203d,
  269. kFPGetDataForkParmsMask = 0x63ff,
  270. kFPGetResForkParmsMask = 0xa5ff
  271. };
  272. // unique to Dir bitmap
  273. enum {
  274. kFPOffspringCountBit = 0x0200,
  275. kFPOwnerIDBit = 0x0400,
  276. kFPGroupIDBit = 0x0800,
  277. kFPAccessRightsBit = 0x1000,
  278. kFPGetDirParmsMask = 0x3fff,
  279. kFPSetDirParmsMask = 0x3c3d
  280. };
  281. enum {
  282. kFPBadFileBitmap = 0xd800,
  283. kFPBadDirBitmap = 0xc000
  284. };
  285. // specific to openfork
  286. enum {
  287. kBadDataBitmap = 0xdc00,
  288. kBadResBitmap = 0xda00,
  289. kBadAccessMode = 0xffcc
  290. };
  291. enum {
  292. kFPBadFileAttribute = 0x7a00,
  293. kFPBadDirAttribute = 0x7e1a // WriteInhibit bit - Whats the story with this?
  294. };
  295. // Related to CatSearch
  296. enum {
  297. kPartialName = 0x80000000,
  298. kBadRespBits = 0xffbd, // legal response info
  299. kBadDir = 0x7ffffd80, // legal request bitmaps
  300. kBadFile = 0x7ffff980,
  301. kBadDirFile = 0x7fffff81
  302. };
  303. enum { kSP = 1, kRP = 2, kWP = 4, kSA = 8, kWA = 16, kOwner = 128 };
  304. enum { kSearchPrivBit = 0, kReadPrivBit = 1, kWritePrivBit = 2 };
  305. // Read/Write and Deny bits for OpenFork
  306. enum {
  307. kAccessRead = 0x01,
  308. kAccessWrite = 0x02,
  309. kDenyRead = 0x10,
  310. kDenyWrite = 0x20,
  311. kAccessMask = 0x33
  312. };
  313. // Attention packet bits
  314. enum {
  315. kAttnDiscUser = 0x8000,
  316. kAttnServerCrash = 0x4000,
  317. kAttnServerMsg = 0x2000,
  318. kAttnDontReconnect = 0x1000
  319. };
  320. typedef unsigned char FPFunc;
  321. typedef unsigned short DTRef;
  322. typedef unsigned long DirID;
  323. typedef unsigned char PathType;
  324. typedef unsigned char IconType;
  325. typedef unsigned long IconTag;
  326. typedef unsigned short ForkRef;
  327. typedef unsigned short VolID;
  328. typedef unsigned short Bitmap;
  329. typedef unsigned long Date;
  330. typedef unsigned char FPFinfo[32];
  331. typedef unsigned char ProDOSInfo[6];
  332. typedef unsigned short Attributes;
  333. typedef unsigned short FSAttributes; // *** merge types
  334. typedef unsigned short VolAttributes; // *** merge types
  335. typedef unsigned long UserID;
  336. typedef unsigned long GroupID;
  337. typedef unsigned long AccessRights;
  338. typedef unsigned short AccessMode;
  339. typedef unsigned char FileDirTag;
  340. typedef unsigned char Flag;
  341. typedef unsigned long FileID;
  342. typedef unsigned long ApplTag;
  343. typedef unsigned char *Password;
  344. typedef unsigned short FPRights;
  345. typedef unsigned char CatPosition[16];
  346. struct FPUserAuthInfo {
  347. unsigned long keyHi;
  348. unsigned long keyLo;
  349. };
  350. struct FPCreateID {
  351. FPFunc funcCode;
  352. unsigned char pad;
  353. VolID volID;
  354. DirID dirID;
  355. PathType pathType;
  356. unsigned char pathName;
  357. };
  358. struct FPDeleteID {
  359. FPFunc funcCode;
  360. unsigned char pad;
  361. VolID volID;
  362. FileID fileID;
  363. };
  364. struct FPResolveID {
  365. FPFunc funcCode;
  366. unsigned char pad;
  367. VolID volID;
  368. FileID fileID;
  369. Bitmap bitmap;
  370. };
  371. struct FPExchangeFiles {
  372. FPFunc funcCode;
  373. unsigned char pad;
  374. VolID volID;
  375. DirID srcDirID;
  376. DirID destDirID;
  377. PathType srcPathType;
  378. unsigned char srcPathName;
  379. // PathType destPathType;
  380. // StringPtr destPathName;
  381. };
  382. struct FPAddAPPL {
  383. FPFunc funcCode;
  384. unsigned char pad;
  385. DTRef dtRefNum;
  386. DirID dirID;
  387. OSType creator;
  388. OSType applTag;
  389. PathType pathType;
  390. unsigned char pathName;
  391. };
  392. struct FPAddComment {
  393. FPFunc funcCode;
  394. unsigned char pad;
  395. DTRef dtRefNum;
  396. DirID dirID;
  397. PathType pathType;
  398. unsigned char pathName;
  399. // StringPtr comment;
  400. };
  401. struct FPAddIcon {
  402. FPFunc funcCode;
  403. unsigned char pad;
  404. DTRef dtRefNum;
  405. OSType fileCreator;
  406. OSType fileType;
  407. IconType iconType;
  408. unsigned char pad2;
  409. IconTag iconTag;
  410. short bitmapSize;
  411. };
  412. struct FPByteRangeLock {
  413. FPFunc funcCode;
  414. Flag flags;
  415. ForkRef forkRef;
  416. long offset;
  417. long length;
  418. };
  419. struct FPByteRangeLockExt {
  420. FPFunc funcCode;
  421. Flag flags;
  422. ForkRef forkRef;
  423. long long offset;
  424. long long length;
  425. };
  426. struct FPCatSearch {
  427. FPFunc funcCode;
  428. unsigned char pad;
  429. short volumeID;
  430. long reqMatches;
  431. long reserved;
  432. CatPosition catPos;
  433. short fileRsltBitmap;
  434. short dirRsltBitmap;
  435. long reqBitmap;
  436. unsigned char length;
  437. };
  438. struct FPCatSearchExt {
  439. FPFunc funcCode;
  440. unsigned char pad;
  441. short volumeID;
  442. long reqMatches;
  443. long reserved;
  444. CatPosition catPos;
  445. short fileRsltBitmap;
  446. short dirRsltBitmap;
  447. long reqBitmap;
  448. unsigned char length;
  449. };
  450. struct FPChangePassword {
  451. FPFunc funcCode;
  452. unsigned char pad;
  453. unsigned char uam;
  454. };
  455. struct FPCloseDir {
  456. FPFunc funcCode;
  457. unsigned char pad;
  458. VolID volID;
  459. DirID dirID;
  460. };
  461. struct FPCloseDT {
  462. FPFunc funcCode;
  463. unsigned char pad;
  464. DTRef dtRefNum;
  465. };
  466. struct FPCloseFork {
  467. FPFunc funcCode;
  468. unsigned char pad;
  469. ForkRef forkRef;
  470. };
  471. struct FPCloseVol {
  472. FPFunc funcCode;
  473. unsigned char pad;
  474. VolID volID;
  475. };
  476. struct FPCopyFile {
  477. FPFunc funcCode;
  478. unsigned char pad;
  479. VolID srcVolID;
  480. DirID srcDirID;
  481. VolID destVolID;
  482. DirID destDirID;
  483. PathType srcPathType;
  484. unsigned char srcPathName;
  485. // PathType destPathType;
  486. // StringPtr destPathName;
  487. // PathType newType;
  488. // StringPtr newName;
  489. };
  490. struct FPCreateDir {
  491. FPFunc funcCode;
  492. Flag flags;
  493. VolID volID;
  494. DirID dirID;
  495. PathType pathType;
  496. unsigned char pathName;
  497. };
  498. struct FPCreateFile {
  499. FPFunc funcCode;
  500. Flag createFlag;
  501. VolID volID;
  502. DirID dirID;
  503. PathType pathType;
  504. unsigned char pathName;
  505. };
  506. struct FPDelete {
  507. FPFunc funcCode;
  508. unsigned char pad;
  509. VolID volID;
  510. DirID dirID;
  511. PathType pathType;
  512. unsigned char pathName;
  513. };
  514. struct FPEnumerate {
  515. FPFunc funcCode;
  516. unsigned char pad;
  517. VolID volID;
  518. DirID dirID;
  519. Bitmap fileBitmap;
  520. Bitmap dirBitmap;
  521. short reqCount;
  522. short startIndex;
  523. short maxReplySize;
  524. PathType pathType;
  525. unsigned char pathName;
  526. };
  527. struct FPEnumerateExt {
  528. FPFunc funcCode;
  529. unsigned char pad;
  530. VolID volID;
  531. DirID dirID;
  532. Bitmap fileBitmap;
  533. Bitmap dirBitmap;
  534. short reqCount;
  535. short startIndex;
  536. short maxReplySize;
  537. PathType pathType;
  538. unsigned char pathName;
  539. };
  540. struct FPFlush {
  541. FPFunc funcCode;
  542. unsigned char pad;
  543. VolID volID;
  544. };
  545. struct FPFlushFork {
  546. FPFunc funcCode;
  547. unsigned char pad;
  548. ForkRef forkRefNum;
  549. };
  550. struct FPGetAPPL {
  551. FPFunc funcCode;
  552. unsigned char pad;
  553. DTRef dtRefNum;
  554. OSType creator;
  555. short index;
  556. Bitmap bitmap;
  557. };
  558. struct FPGetAuthMethods {
  559. FPFunc funcCode;
  560. unsigned char pad;
  561. unsigned short flags; /* none defined yet */
  562. PathType pathType;
  563. unsigned char pathName;
  564. };
  565. struct FPGetComment {
  566. FPFunc funcCode;
  567. unsigned char pad;
  568. DTRef dtRefNum;
  569. DirID dirID;
  570. PathType pathType;
  571. unsigned char pathName;
  572. };
  573. struct FPGetFileDirParms {
  574. FPFunc funcCode;
  575. unsigned char pad;
  576. VolID volID;
  577. DirID dirID;
  578. Bitmap fileBitmap;
  579. Bitmap dirBitmap;
  580. PathType pathType;
  581. unsigned char pathName;
  582. };
  583. struct FPGetForkParms {
  584. FPFunc funcCode;
  585. unsigned char pad;
  586. ForkRef forkRef;
  587. Bitmap bitmap;
  588. };
  589. struct FPGetIcon {
  590. FPFunc funcCode;
  591. unsigned char pad;
  592. DTRef dtRefNum;
  593. OSType creator;
  594. OSType type;
  595. IconType iconType;
  596. unsigned char pad2;
  597. short length;
  598. };
  599. struct FPGetIconInfo {
  600. FPFunc funcCode;
  601. unsigned char pad;
  602. DTRef dtRefNum;
  603. OSType fileCreator;
  604. short iconIndex;
  605. };
  606. struct FPGetSrvrInfo {
  607. FPFunc funcCode;
  608. unsigned char pad;
  609. };
  610. struct FPGetSrvrMsg {
  611. FPFunc funcCode;
  612. unsigned char pad;
  613. unsigned short msgType;
  614. Bitmap msgBitmap;
  615. };
  616. struct FPGetSrvrParms {
  617. FPFunc funcCode;
  618. unsigned char pad;
  619. };
  620. struct FPGetUserInfo {
  621. FPFunc funcCode;
  622. Flag flag;
  623. UserID theUserID;
  624. Bitmap bitmap;
  625. };
  626. struct FPGetVolParms {
  627. FPFunc funcCode;
  628. unsigned char pad;
  629. VolID volID;
  630. Bitmap bitmap;
  631. };
  632. struct FPLogin {
  633. FPFunc funcCode;
  634. unsigned char pad;
  635. };
  636. struct FPLoginCont {
  637. FPFunc funcCode;
  638. unsigned char pad;
  639. short idNumber;
  640. struct FPUserAuthInfo userAuthInfo;
  641. struct FPUserAuthInfo userRandNum;
  642. };
  643. struct FPLoginExt {
  644. FPFunc funcCode;
  645. unsigned char pad;
  646. unsigned short flags; /* none defined yet */
  647. unsigned char afpVersion;
  648. // unsigned char UAMString;
  649. // PathType userNamePathType;
  650. // StringPtr userName;
  651. // PathType dirNamePathType;
  652. // StringPtr dirName;
  653. // uchar pad; /* if needed to pad to even boundary */
  654. // uchar authInfo;
  655. };
  656. struct FPLogout {
  657. FPFunc funcCode;
  658. unsigned char pad;
  659. };
  660. struct FPMapID {
  661. FPFunc funcCode;
  662. Flag subFunction;
  663. union {
  664. GroupID groupID;
  665. UserID userID;
  666. } u;
  667. };
  668. struct FPMapName {
  669. FPFunc funcCode;
  670. Flag subFunction;
  671. unsigned char name;
  672. };
  673. struct FPMoveAndRename {
  674. FPFunc funcCode;
  675. unsigned char pad;
  676. VolID volID;
  677. DirID srcDirID;
  678. DirID destDirID;
  679. PathType srcPathType;
  680. unsigned char srcPathName;
  681. // PathType destPathType;
  682. // StringPtr destPathName;
  683. // PathType newType;
  684. // StringPtr newName;
  685. };
  686. struct FPOpenDir {
  687. FPFunc funcCode;
  688. unsigned char pad;
  689. VolID volID;
  690. DirID dirID;
  691. PathType pathType;
  692. unsigned char pathName;
  693. };
  694. struct FPOpenDT {
  695. FPFunc funcCode;
  696. unsigned char pad;
  697. VolID volID;
  698. };
  699. struct FPOpenFork {
  700. FPFunc funcCode;
  701. Flag forkFlag;
  702. VolID volID;
  703. DirID dirID;
  704. Bitmap bitmap;
  705. AccessMode accessMode;
  706. PathType pathType;
  707. unsigned char pathName;
  708. };
  709. struct FPOpenVol {
  710. FPFunc funcCode;
  711. unsigned char pad;
  712. Bitmap bitmap;
  713. unsigned char name;
  714. Password password;
  715. };
  716. struct FPRead {
  717. FPFunc funcCode;
  718. unsigned char pad;
  719. ForkRef forkRef;
  720. long offset;
  721. long reqCount;
  722. unsigned char newlineMask;
  723. unsigned char newlineChar;
  724. };
  725. struct FPReadExt {
  726. FPFunc funcCode;
  727. unsigned char pad;
  728. ForkRef forkRef;
  729. long long offset;
  730. long long reqCount;
  731. };
  732. struct FPRemoveAPPL {
  733. FPFunc funcCode;
  734. unsigned char pad;
  735. DTRef dtRefNum;
  736. DirID dirID;
  737. OSType creator;
  738. PathType pathType;
  739. unsigned char pathName;
  740. };
  741. struct FPRemoveComment {
  742. FPFunc funcCode;
  743. unsigned char pad;
  744. DTRef dtRefNum;
  745. DirID dirID;
  746. PathType pathType;
  747. unsigned char pathName;
  748. };
  749. struct FPRename {
  750. FPFunc funcCode;
  751. unsigned char pad;
  752. VolID volID;
  753. DirID dirID;
  754. PathType pathType;
  755. unsigned char pathName;
  756. // PathType newType;
  757. // StringPtr newName;
  758. };
  759. struct FPSetDirParms {
  760. FPFunc funcCode;
  761. unsigned char pad;
  762. VolID volID;
  763. DirID dirID;
  764. Bitmap bitmap;
  765. PathType pathType;
  766. unsigned char pathName;
  767. // struct FPDirParam dp;
  768. };
  769. struct FPSetFileDirParms {
  770. FPFunc funcCode;
  771. unsigned char pad;
  772. VolID volID;
  773. DirID dirID;
  774. Bitmap bitmap;
  775. PathType pathType;
  776. unsigned char pathName;
  777. // union {
  778. // struct FPDirParam dp;
  779. // struct FPFileParam fp;
  780. // } u;
  781. };
  782. struct FPSetFileParms {
  783. FPFunc funcCode;
  784. unsigned char pad;
  785. VolID volID;
  786. DirID dirID;
  787. Bitmap bitmap;
  788. PathType pathType;
  789. unsigned char pathName;
  790. // struct FPFileParam fp;
  791. };
  792. struct FPSetForkParms {
  793. FPFunc funcCode;
  794. unsigned char pad;
  795. ForkRef forkRef;
  796. Bitmap bitmap;
  797. unsigned long forkLen;
  798. };
  799. struct FPSetVolParms {
  800. FPFunc funcCode;
  801. unsigned char pad;
  802. VolID volID;
  803. Bitmap bitmap;
  804. Date backupDate;
  805. };
  806. struct FPWrite {
  807. FPFunc funcCode;
  808. Flag startEndFlag;
  809. ForkRef forkRef;
  810. long offset;
  811. long reqCount;
  812. };
  813. struct FPWriteExt {
  814. FPFunc funcCode;
  815. Flag startEndFlag;
  816. ForkRef forkRef;
  817. long long offset;
  818. long long reqCount;
  819. };
  820. struct FPZzzzz {
  821. FPFunc funcCode;
  822. unsigned char pad;
  823. unsigned long flag;
  824. };
  825. struct FPGetSessionToken {
  826. FPFunc funcCode;
  827. unsigned char pad;
  828. short type;
  829. };
  830. struct FPDisconnectOldSession {
  831. FPFunc funcCode;
  832. unsigned char pad;
  833. short type;
  834. unsigned long length;
  835. unsigned char data;
  836. };
  837. typedef union FPRequestParam FPRequestParam;
  838. union FPRequestParam {
  839. struct FPAddAPPL fpAddAPPLRequest;
  840. struct FPAddComment fpAddCommentRequest;
  841. struct FPAddIcon fpAddIconRequest;
  842. struct FPByteRangeLock fpByteRangeLockRequest;
  843. struct FPByteRangeLockExt fpByteRangeLockExtRequest;
  844. struct FPCatSearch fpCatSearchRequest;
  845. struct FPCatSearchExt fpCatSearchExtRequest;
  846. struct FPChangePassword fpChangePasswordRequest;
  847. struct FPCloseDir fpCloseDirRequest;
  848. struct FPCloseDT fpCloseDTRequest;
  849. struct FPCloseFork fpCloseForkRequest;
  850. struct FPCloseVol fpCloseVolRequest;
  851. struct FPCopyFile fpCopyFileRequest;
  852. struct FPCreateDir fpCreateDirRequest;
  853. struct FPCreateFile fpCreateFileRequest;
  854. struct FPCreateID fpCreateIDRequest;
  855. struct FPDelete fpDeleteRequest;
  856. struct FPDeleteID fpDeleteIDRequest;
  857. struct FPEnumerate fpEnumerateRequest;
  858. struct FPEnumerateExt fpEnumerateExtRequest;
  859. struct FPExchangeFiles fpExchangeFilesRequest;
  860. struct FPFlush fpFlushRequest;
  861. struct FPFlushFork fpFlushForkRequest;
  862. struct FPGetAPPL fpGetAPPLRequest;
  863. struct FPGetComment fpGetCommentRequest;
  864. struct FPGetFileDirParms fpGetFileDirParmsRequest;
  865. struct FPGetForkParms fpGetForkParmsRequest;
  866. struct FPGetIcon fpGetIconRequest;
  867. struct FPGetIconInfo fpGetIconInfoRequest;
  868. struct FPGetSrvrInfo fpGetSrvrInfoRequest;
  869. struct FPGetSrvrMsg fpGetSrvrMsgRequest;
  870. struct FPGetSrvrParms fpGetSrvrParmsRequest;
  871. struct FPGetUserInfo fpGetUserInfoRequest;
  872. struct FPGetVolParms fpGetVolParmsRequest;
  873. struct FPLogin fpLoginRequest;
  874. struct FPLoginCont fpLoginContRequest;
  875. struct FPLoginExt fpLoginExtRequest;
  876. struct FPLogout fpLogoutRequest;
  877. struct FPMapID fpMapIDRequest;
  878. struct FPMapName fpMapNameRequest;
  879. struct FPMoveAndRename fpMoveAndRenameRequest;
  880. struct FPOpenDir fpOpenDirRequest;
  881. struct FPOpenDT fpOpenDTRequest;
  882. struct FPOpenFork fpOpenForkRequest;
  883. struct FPOpenVol fpOpenVolRequest;
  884. struct FPRead fpReadRequest;
  885. struct FPReadExt fpReadExtRequest;
  886. struct FPRemoveAPPL fpRemoveAPPLRequest;
  887. struct FPRemoveComment fpRemoveCommentRequest;
  888. struct FPRename fpRenameRequest;
  889. struct FPResolveID fpResolveIDRequest;
  890. struct FPSetDirParms fpSetDirParmsRequest;
  891. struct FPSetFileDirParms fpSetFileDirParmsRequest;
  892. struct FPSetFileParms fpSetFileParmsRequest;
  893. struct FPSetForkParms fpSetForkParmsRequest;
  894. struct FPSetVolParms fpSetVolParmsRequest;
  895. struct FPWrite fpWriteRequest;
  896. struct FPWriteExt fpWriteExtRequest;
  897. struct FPZzzzz fpFPZzzzz;
  898. struct FPGetSessionToken fpGetSessionToken;
  899. struct FPDisconnectOldSession fpDisconnectOldSession;
  900. };
  901. #if PRAGMA_STRUCT_ALIGN
  902. #pragma options align=reset
  903. #elif PRAGMA_STRUCT_PACKPUSH
  904. #pragma pack(pop)
  905. #elif PRAGMA_STRUCT_PACK
  906. #pragma pack()
  907. #endif
  908. #endif