1
0

nfs.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. */
  9. /*
  10. * Please do not edit this file.
  11. * It was generated using rpcgen.
  12. */
  13. #ifndef _NFS_H_RPCGEN
  14. #define _NFS_H_RPCGEN
  15. #include <rpc/rpc.h>
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /* This file is copied from RFC1813
  20. * Copyright 1995 Sun Micrososystems (I assume)
  21. */
  22. #define NFS3_FHSIZE 64
  23. #define NFS3_COOKIEVERFSIZE 8
  24. #define NFS3_CREATEVERFSIZE 8
  25. #define NFS3_WRITEVERFSIZE 8
  26. #define ACCESS3_READ 0x0001
  27. #define ACCESS3_LOOKUP 0x0002
  28. #define ACCESS3_MODIFY 0x0004
  29. #define ACCESS3_EXTEND 0x0008
  30. #define ACCESS3_DELETE 0x0010
  31. #define ACCESS3_EXECUTE 0x0020
  32. #define FSF3_LINK 0x0001
  33. #define FSF3_SYMLINK 0x0002
  34. #define FSF3_HOMOGENEOUS 0x0008
  35. #define FSF3_CANSETTIME 0x0010
  36. typedef unsigned long long uint64;
  37. typedef long long int64;
  38. typedef u_long uint32;
  39. typedef long int32;
  40. typedef char *filename3;
  41. typedef char *nfspath3;
  42. typedef uint64 fileid3;
  43. typedef uint64 cookie3;
  44. typedef char cookieverf3[NFS3_COOKIEVERFSIZE];
  45. typedef char createverf3[NFS3_CREATEVERFSIZE];
  46. typedef char writeverf3[NFS3_WRITEVERFSIZE];
  47. typedef uint32 uid3;
  48. typedef uint32 gid3;
  49. typedef uint64 size3;
  50. typedef uint64 offset3;
  51. typedef uint32 mode3;
  52. typedef uint32 count3;
  53. enum nfsstat3 {
  54. NFS3_OK = 0,
  55. NFS3ERR_PERM = 1,
  56. NFS3ERR_NOENT = 2,
  57. NFS3ERR_IO = 5,
  58. NFS3ERR_NXIO = 6,
  59. NFS3ERR_ACCES = 13,
  60. NFS3ERR_EXIST = 17,
  61. NFS3ERR_XDEV = 18,
  62. NFS3ERR_NODEV = 19,
  63. NFS3ERR_NOTDIR = 20,
  64. NFS3ERR_ISDIR = 21,
  65. NFS3ERR_INVAL = 22,
  66. NFS3ERR_FBIG = 27,
  67. NFS3ERR_NOSPC = 28,
  68. NFS3ERR_ROFS = 30,
  69. NFS3ERR_MLINK = 31,
  70. NFS3ERR_NAMETOOLONG = 63,
  71. NFS3ERR_NOTEMPTY = 66,
  72. NFS3ERR_DQUOT = 69,
  73. NFS3ERR_STALE = 70,
  74. NFS3ERR_REMOTE = 71,
  75. NFS3ERR_BADHANDLE = 10001,
  76. NFS3ERR_NOT_SYNC = 10002,
  77. NFS3ERR_BAD_COOKIE = 10003,
  78. NFS3ERR_NOTSUPP = 10004,
  79. NFS3ERR_TOOSMALL = 10005,
  80. NFS3ERR_SERVERFAULT = 10006,
  81. NFS3ERR_BADTYPE = 10007,
  82. NFS3ERR_JUKEBOX = 10008
  83. };
  84. typedef enum nfsstat3 nfsstat3;
  85. enum ftype3 {
  86. NFS3REG = 1,
  87. NFS3DIR = 2,
  88. NFS3BLK = 3,
  89. NFS3CHR = 4,
  90. NFS3LNK = 5,
  91. NFS3SOCK = 6,
  92. NFS3FIFO = 7
  93. };
  94. typedef enum ftype3 ftype3;
  95. enum stable_how {
  96. UNSTABLE = 0,
  97. DATA_SYNC = 1,
  98. FILE_SYNC = 2
  99. };
  100. typedef enum stable_how stable_how;
  101. enum createmode3 {
  102. UNCHECKED = 0,
  103. GUARDED = 1,
  104. EXCLUSIVE = 2
  105. };
  106. typedef enum createmode3 createmode3;
  107. struct specdata3 {
  108. uint32 specdata1;
  109. uint32 specdata2;
  110. };
  111. typedef struct specdata3 specdata3;
  112. struct nfs_fh3 {
  113. struct {
  114. unsigned int data_len;
  115. char *data_val;
  116. } data;
  117. };
  118. typedef struct nfs_fh3 nfs_fh3;
  119. struct nfstime3 {
  120. uint32 seconds;
  121. uint32 nseconds;
  122. };
  123. typedef struct nfstime3 nfstime3;
  124. struct fattr3 {
  125. ftype3 type;
  126. mode3 mode;
  127. uint32 nlink;
  128. uid3 uid;
  129. gid3 gid;
  130. size3 size;
  131. size3 used;
  132. specdata3 rdev;
  133. uint64 fsid;
  134. fileid3 fileid;
  135. nfstime3 atime;
  136. nfstime3 mtime;
  137. nfstime3 ctime;
  138. };
  139. typedef struct fattr3 fattr3;
  140. struct post_op_attr {
  141. bool_t attributes_follow;
  142. union {
  143. fattr3 attributes;
  144. } post_op_attr_u;
  145. };
  146. typedef struct post_op_attr post_op_attr;
  147. struct wcc_attr {
  148. size3 size;
  149. nfstime3 mtime;
  150. nfstime3 ctime;
  151. };
  152. typedef struct wcc_attr wcc_attr;
  153. struct pre_op_attr {
  154. bool_t attributes_follow;
  155. union {
  156. wcc_attr attributes;
  157. } pre_op_attr_u;
  158. };
  159. typedef struct pre_op_attr pre_op_attr;
  160. struct wcc_data {
  161. pre_op_attr before;
  162. post_op_attr after;
  163. };
  164. typedef struct wcc_data wcc_data;
  165. struct post_op_fh3 {
  166. bool_t handle_follows;
  167. union {
  168. nfs_fh3 handle;
  169. } post_op_fh3_u;
  170. };
  171. typedef struct post_op_fh3 post_op_fh3;
  172. enum time_how {
  173. DONT_CHANGE = 0,
  174. SET_TO_SERVER_TIME = 1,
  175. SET_TO_CLIENT_TIME = 2
  176. };
  177. typedef enum time_how time_how;
  178. struct set_mode3 {
  179. bool_t set_it;
  180. union {
  181. mode3 mode;
  182. } set_mode3_u;
  183. };
  184. typedef struct set_mode3 set_mode3;
  185. struct set_uid3 {
  186. bool_t set_it;
  187. union {
  188. uid3 uid;
  189. } set_uid3_u;
  190. };
  191. typedef struct set_uid3 set_uid3;
  192. struct set_gid3 {
  193. bool_t set_it;
  194. union {
  195. gid3 gid;
  196. } set_gid3_u;
  197. };
  198. typedef struct set_gid3 set_gid3;
  199. struct set_size3 {
  200. bool_t set_it;
  201. union {
  202. size3 size;
  203. } set_size3_u;
  204. };
  205. typedef struct set_size3 set_size3;
  206. struct set_atime {
  207. time_how set_it;
  208. union {
  209. nfstime3 atime;
  210. } set_atime_u;
  211. };
  212. typedef struct set_atime set_atime;
  213. struct set_mtime {
  214. time_how set_it;
  215. union {
  216. nfstime3 mtime;
  217. } set_mtime_u;
  218. };
  219. typedef struct set_mtime set_mtime;
  220. struct sattr3 {
  221. set_mode3 mode;
  222. set_uid3 uid;
  223. set_gid3 gid;
  224. set_size3 size;
  225. set_atime atime;
  226. set_mtime mtime;
  227. };
  228. typedef struct sattr3 sattr3;
  229. struct diropargs3 {
  230. nfs_fh3 dir;
  231. filename3 name;
  232. };
  233. typedef struct diropargs3 diropargs3;
  234. struct GETATTR3args {
  235. nfs_fh3 object;
  236. };
  237. typedef struct GETATTR3args GETATTR3args;
  238. struct GETATTR3resok {
  239. fattr3 obj_attributes;
  240. };
  241. typedef struct GETATTR3resok GETATTR3resok;
  242. struct GETATTR3res {
  243. nfsstat3 status;
  244. union {
  245. GETATTR3resok resok;
  246. } GETATTR3res_u;
  247. };
  248. typedef struct GETATTR3res GETATTR3res;
  249. struct sattrguard3 {
  250. bool_t check;
  251. union {
  252. nfstime3 obj_ctime;
  253. } sattrguard3_u;
  254. };
  255. typedef struct sattrguard3 sattrguard3;
  256. struct SETATTR3args {
  257. nfs_fh3 object;
  258. sattr3 new_attributes;
  259. sattrguard3 guard;
  260. };
  261. typedef struct SETATTR3args SETATTR3args;
  262. struct SETATTR3resok {
  263. wcc_data obj_wcc;
  264. };
  265. typedef struct SETATTR3resok SETATTR3resok;
  266. struct SETATTR3resfail {
  267. wcc_data obj_wcc;
  268. };
  269. typedef struct SETATTR3resfail SETATTR3resfail;
  270. struct SETATTR3res {
  271. nfsstat3 status;
  272. union {
  273. SETATTR3resok resok;
  274. SETATTR3resfail resfail;
  275. } SETATTR3res_u;
  276. };
  277. typedef struct SETATTR3res SETATTR3res;
  278. struct LOOKUP3args {
  279. diropargs3 what;
  280. };
  281. typedef struct LOOKUP3args LOOKUP3args;
  282. struct LOOKUP3resok {
  283. nfs_fh3 object;
  284. post_op_attr obj_attributes;
  285. post_op_attr dir_attributes;
  286. };
  287. typedef struct LOOKUP3resok LOOKUP3resok;
  288. struct LOOKUP3resfail {
  289. post_op_attr dir_attributes;
  290. };
  291. typedef struct LOOKUP3resfail LOOKUP3resfail;
  292. struct LOOKUP3res {
  293. nfsstat3 status;
  294. union {
  295. LOOKUP3resok resok;
  296. LOOKUP3resfail resfail;
  297. } LOOKUP3res_u;
  298. };
  299. typedef struct LOOKUP3res LOOKUP3res;
  300. struct ACCESS3args {
  301. nfs_fh3 object;
  302. uint32 access;
  303. };
  304. typedef struct ACCESS3args ACCESS3args;
  305. struct ACCESS3resok {
  306. post_op_attr obj_attributes;
  307. uint32 access;
  308. };
  309. typedef struct ACCESS3resok ACCESS3resok;
  310. struct ACCESS3resfail {
  311. post_op_attr obj_attributes;
  312. };
  313. typedef struct ACCESS3resfail ACCESS3resfail;
  314. struct ACCESS3res {
  315. nfsstat3 status;
  316. union {
  317. ACCESS3resok resok;
  318. ACCESS3resfail resfail;
  319. } ACCESS3res_u;
  320. };
  321. typedef struct ACCESS3res ACCESS3res;
  322. struct READLINK3args {
  323. nfs_fh3 symlink;
  324. };
  325. typedef struct READLINK3args READLINK3args;
  326. struct READLINK3resok {
  327. post_op_attr symlink_attributes;
  328. nfspath3 data;
  329. };
  330. typedef struct READLINK3resok READLINK3resok;
  331. struct READLINK3resfail {
  332. post_op_attr symlink_attributes;
  333. };
  334. typedef struct READLINK3resfail READLINK3resfail;
  335. struct READLINK3res {
  336. nfsstat3 status;
  337. union {
  338. READLINK3resok resok;
  339. READLINK3resfail resfail;
  340. } READLINK3res_u;
  341. };
  342. typedef struct READLINK3res READLINK3res;
  343. struct READ3args {
  344. nfs_fh3 file;
  345. offset3 offset;
  346. count3 count;
  347. };
  348. typedef struct READ3args READ3args;
  349. struct READ3resok {
  350. post_op_attr file_attributes;
  351. count3 count;
  352. bool_t eof;
  353. struct {
  354. unsigned int data_len;
  355. char *data_val;
  356. } data;
  357. };
  358. typedef struct READ3resok READ3resok;
  359. struct READ3resfail {
  360. post_op_attr file_attributes;
  361. };
  362. typedef struct READ3resfail READ3resfail;
  363. struct READ3res {
  364. nfsstat3 status;
  365. union {
  366. READ3resok resok;
  367. READ3resfail resfail;
  368. } READ3res_u;
  369. };
  370. typedef struct READ3res READ3res;
  371. struct WRITE3args {
  372. nfs_fh3 file;
  373. offset3 offset;
  374. count3 count;
  375. stable_how stable;
  376. struct {
  377. unsigned int data_len;
  378. char *data_val;
  379. } data;
  380. };
  381. typedef struct WRITE3args WRITE3args;
  382. struct WRITE3resok {
  383. wcc_data file_wcc;
  384. count3 count;
  385. stable_how committed;
  386. writeverf3 verf;
  387. };
  388. typedef struct WRITE3resok WRITE3resok;
  389. struct WRITE3resfail {
  390. wcc_data file_wcc;
  391. };
  392. typedef struct WRITE3resfail WRITE3resfail;
  393. struct WRITE3res {
  394. nfsstat3 status;
  395. union {
  396. WRITE3resok resok;
  397. WRITE3resfail resfail;
  398. } WRITE3res_u;
  399. };
  400. typedef struct WRITE3res WRITE3res;
  401. struct createhow3 {
  402. createmode3 mode;
  403. union {
  404. sattr3 obj_attributes;
  405. createverf3 verf;
  406. } createhow3_u;
  407. };
  408. typedef struct createhow3 createhow3;
  409. struct CREATE3args {
  410. diropargs3 where;
  411. createhow3 how;
  412. };
  413. typedef struct CREATE3args CREATE3args;
  414. struct CREATE3resok {
  415. post_op_fh3 obj;
  416. post_op_attr obj_attributes;
  417. wcc_data dir_wcc;
  418. };
  419. typedef struct CREATE3resok CREATE3resok;
  420. struct CREATE3resfail {
  421. wcc_data dir_wcc;
  422. };
  423. typedef struct CREATE3resfail CREATE3resfail;
  424. struct CREATE3res {
  425. nfsstat3 status;
  426. union {
  427. CREATE3resok resok;
  428. CREATE3resfail resfail;
  429. } CREATE3res_u;
  430. };
  431. typedef struct CREATE3res CREATE3res;
  432. struct MKDIR3args {
  433. diropargs3 where;
  434. sattr3 attributes;
  435. };
  436. typedef struct MKDIR3args MKDIR3args;
  437. struct MKDIR3resok {
  438. post_op_fh3 obj;
  439. post_op_attr obj_attributes;
  440. wcc_data dir_wcc;
  441. };
  442. typedef struct MKDIR3resok MKDIR3resok;
  443. struct MKDIR3resfail {
  444. wcc_data dir_wcc;
  445. };
  446. typedef struct MKDIR3resfail MKDIR3resfail;
  447. struct MKDIR3res {
  448. nfsstat3 status;
  449. union {
  450. MKDIR3resok resok;
  451. MKDIR3resfail resfail;
  452. } MKDIR3res_u;
  453. };
  454. typedef struct MKDIR3res MKDIR3res;
  455. struct symlinkdata3 {
  456. sattr3 symlink_attributes;
  457. nfspath3 symlink_data;
  458. };
  459. typedef struct symlinkdata3 symlinkdata3;
  460. struct SYMLINK3args {
  461. diropargs3 where;
  462. symlinkdata3 symlink;
  463. };
  464. typedef struct SYMLINK3args SYMLINK3args;
  465. struct SYMLINK3resok {
  466. post_op_fh3 obj;
  467. post_op_attr obj_attributes;
  468. wcc_data dir_wcc;
  469. };
  470. typedef struct SYMLINK3resok SYMLINK3resok;
  471. struct SYMLINK3resfail {
  472. wcc_data dir_wcc;
  473. };
  474. typedef struct SYMLINK3resfail SYMLINK3resfail;
  475. struct SYMLINK3res {
  476. nfsstat3 status;
  477. union {
  478. SYMLINK3resok resok;
  479. SYMLINK3resfail resfail;
  480. } SYMLINK3res_u;
  481. };
  482. typedef struct SYMLINK3res SYMLINK3res;
  483. struct devicedata3 {
  484. sattr3 dev_attributes;
  485. specdata3 spec;
  486. };
  487. typedef struct devicedata3 devicedata3;
  488. struct mknoddata3 {
  489. ftype3 type;
  490. union {
  491. devicedata3 device;
  492. sattr3 pipe_attributes;
  493. } mknoddata3_u;
  494. };
  495. typedef struct mknoddata3 mknoddata3;
  496. struct MKNOD3args {
  497. diropargs3 where;
  498. mknoddata3 what;
  499. };
  500. typedef struct MKNOD3args MKNOD3args;
  501. struct MKNOD3resok {
  502. post_op_fh3 obj;
  503. post_op_attr obj_attributes;
  504. wcc_data dir_wcc;
  505. };
  506. typedef struct MKNOD3resok MKNOD3resok;
  507. struct MKNOD3resfail {
  508. wcc_data dir_wcc;
  509. };
  510. typedef struct MKNOD3resfail MKNOD3resfail;
  511. struct MKNOD3res {
  512. nfsstat3 status;
  513. union {
  514. MKNOD3resok resok;
  515. MKNOD3resfail resfail;
  516. } MKNOD3res_u;
  517. };
  518. typedef struct MKNOD3res MKNOD3res;
  519. struct REMOVE3args {
  520. diropargs3 object;
  521. };
  522. typedef struct REMOVE3args REMOVE3args;
  523. struct REMOVE3resok {
  524. wcc_data dir_wcc;
  525. };
  526. typedef struct REMOVE3resok REMOVE3resok;
  527. struct REMOVE3resfail {
  528. wcc_data dir_wcc;
  529. };
  530. typedef struct REMOVE3resfail REMOVE3resfail;
  531. struct REMOVE3res {
  532. nfsstat3 status;
  533. union {
  534. REMOVE3resok resok;
  535. REMOVE3resfail resfail;
  536. } REMOVE3res_u;
  537. };
  538. typedef struct REMOVE3res REMOVE3res;
  539. struct RMDIR3args {
  540. diropargs3 object;
  541. };
  542. typedef struct RMDIR3args RMDIR3args;
  543. struct RMDIR3resok {
  544. wcc_data dir_wcc;
  545. };
  546. typedef struct RMDIR3resok RMDIR3resok;
  547. struct RMDIR3resfail {
  548. wcc_data dir_wcc;
  549. };
  550. typedef struct RMDIR3resfail RMDIR3resfail;
  551. struct RMDIR3res {
  552. nfsstat3 status;
  553. union {
  554. RMDIR3resok resok;
  555. RMDIR3resfail resfail;
  556. } RMDIR3res_u;
  557. };
  558. typedef struct RMDIR3res RMDIR3res;
  559. struct RENAME3args {
  560. diropargs3 from;
  561. diropargs3 to;
  562. };
  563. typedef struct RENAME3args RENAME3args;
  564. struct RENAME3resok {
  565. wcc_data fromdir_wcc;
  566. wcc_data todir_wcc;
  567. };
  568. typedef struct RENAME3resok RENAME3resok;
  569. struct RENAME3resfail {
  570. wcc_data fromdir_wcc;
  571. wcc_data todir_wcc;
  572. };
  573. typedef struct RENAME3resfail RENAME3resfail;
  574. struct RENAME3res {
  575. nfsstat3 status;
  576. union {
  577. RENAME3resok resok;
  578. RENAME3resfail resfail;
  579. } RENAME3res_u;
  580. };
  581. typedef struct RENAME3res RENAME3res;
  582. struct LINK3args {
  583. nfs_fh3 file;
  584. diropargs3 link;
  585. };
  586. typedef struct LINK3args LINK3args;
  587. struct LINK3resok {
  588. post_op_attr file_attributes;
  589. wcc_data linkdir_wcc;
  590. };
  591. typedef struct LINK3resok LINK3resok;
  592. struct LINK3resfail {
  593. post_op_attr file_attributes;
  594. wcc_data linkdir_wcc;
  595. };
  596. typedef struct LINK3resfail LINK3resfail;
  597. struct LINK3res {
  598. nfsstat3 status;
  599. union {
  600. LINK3resok resok;
  601. LINK3resfail resfail;
  602. } LINK3res_u;
  603. };
  604. typedef struct LINK3res LINK3res;
  605. struct READDIR3args {
  606. nfs_fh3 dir;
  607. cookie3 cookie;
  608. cookieverf3 cookieverf;
  609. count3 count;
  610. };
  611. typedef struct READDIR3args READDIR3args;
  612. struct entry3 {
  613. fileid3 fileid;
  614. filename3 name;
  615. cookie3 cookie;
  616. struct entry3 *nextentry;
  617. };
  618. typedef struct entry3 entry3;
  619. struct dirlist3 {
  620. entry3 *entries;
  621. bool_t eof;
  622. };
  623. typedef struct dirlist3 dirlist3;
  624. struct READDIR3resok {
  625. post_op_attr dir_attributes;
  626. cookieverf3 cookieverf;
  627. dirlist3 reply;
  628. };
  629. typedef struct READDIR3resok READDIR3resok;
  630. struct READDIR3resfail {
  631. post_op_attr dir_attributes;
  632. };
  633. typedef struct READDIR3resfail READDIR3resfail;
  634. struct READDIR3res {
  635. nfsstat3 status;
  636. union {
  637. READDIR3resok resok;
  638. READDIR3resfail resfail;
  639. } READDIR3res_u;
  640. };
  641. typedef struct READDIR3res READDIR3res;
  642. struct READDIRPLUS3args {
  643. nfs_fh3 dir;
  644. cookie3 cookie;
  645. cookieverf3 cookieverf;
  646. count3 dircount;
  647. count3 maxcount;
  648. };
  649. typedef struct READDIRPLUS3args READDIRPLUS3args;
  650. struct entryplus3 {
  651. fileid3 fileid;
  652. filename3 name;
  653. cookie3 cookie;
  654. post_op_attr name_attributes;
  655. post_op_fh3 name_handle;
  656. struct entryplus3 *nextentry;
  657. };
  658. typedef struct entryplus3 entryplus3;
  659. struct dirlistplus3 {
  660. entryplus3 *entries;
  661. bool_t eof;
  662. };
  663. typedef struct dirlistplus3 dirlistplus3;
  664. struct READDIRPLUS3resok {
  665. post_op_attr dir_attributes;
  666. cookieverf3 cookieverf;
  667. dirlistplus3 reply;
  668. };
  669. typedef struct READDIRPLUS3resok READDIRPLUS3resok;
  670. struct READDIRPLUS3resfail {
  671. post_op_attr dir_attributes;
  672. };
  673. typedef struct READDIRPLUS3resfail READDIRPLUS3resfail;
  674. struct READDIRPLUS3res {
  675. nfsstat3 status;
  676. union {
  677. READDIRPLUS3resok resok;
  678. READDIRPLUS3resfail resfail;
  679. } READDIRPLUS3res_u;
  680. };
  681. typedef struct READDIRPLUS3res READDIRPLUS3res;
  682. struct FSSTAT3args {
  683. nfs_fh3 fsroot;
  684. };
  685. typedef struct FSSTAT3args FSSTAT3args;
  686. struct FSSTAT3resok {
  687. post_op_attr obj_attributes;
  688. size3 tbytes;
  689. size3 fbytes;
  690. size3 abytes;
  691. size3 tfiles;
  692. size3 ffiles;
  693. size3 afiles;
  694. uint32 invarsec;
  695. };
  696. typedef struct FSSTAT3resok FSSTAT3resok;
  697. struct FSSTAT3resfail {
  698. post_op_attr obj_attributes;
  699. };
  700. typedef struct FSSTAT3resfail FSSTAT3resfail;
  701. struct FSSTAT3res {
  702. nfsstat3 status;
  703. union {
  704. FSSTAT3resok resok;
  705. FSSTAT3resfail resfail;
  706. } FSSTAT3res_u;
  707. };
  708. typedef struct FSSTAT3res FSSTAT3res;
  709. struct FSINFO3args {
  710. nfs_fh3 fsroot;
  711. };
  712. typedef struct FSINFO3args FSINFO3args;
  713. struct FSINFO3resok {
  714. post_op_attr obj_attributes;
  715. uint32 rtmax;
  716. uint32 rtpref;
  717. uint32 rtmult;
  718. uint32 wtmax;
  719. uint32 wtpref;
  720. uint32 wtmult;
  721. uint32 dtpref;
  722. size3 maxfilesize;
  723. nfstime3 time_delta;
  724. uint32 properties;
  725. };
  726. typedef struct FSINFO3resok FSINFO3resok;
  727. struct FSINFO3resfail {
  728. post_op_attr obj_attributes;
  729. };
  730. typedef struct FSINFO3resfail FSINFO3resfail;
  731. struct FSINFO3res {
  732. nfsstat3 status;
  733. union {
  734. FSINFO3resok resok;
  735. FSINFO3resfail resfail;
  736. } FSINFO3res_u;
  737. };
  738. typedef struct FSINFO3res FSINFO3res;
  739. struct PATHCONF3args {
  740. nfs_fh3 object;
  741. };
  742. typedef struct PATHCONF3args PATHCONF3args;
  743. struct PATHCONF3resok {
  744. post_op_attr obj_attributes;
  745. uint32 linkmax;
  746. uint32 name_max;
  747. bool_t no_trunc;
  748. bool_t chown_restricted;
  749. bool_t case_insensitive;
  750. bool_t case_preserving;
  751. };
  752. typedef struct PATHCONF3resok PATHCONF3resok;
  753. struct PATHCONF3resfail {
  754. post_op_attr obj_attributes;
  755. };
  756. typedef struct PATHCONF3resfail PATHCONF3resfail;
  757. struct PATHCONF3res {
  758. nfsstat3 status;
  759. union {
  760. PATHCONF3resok resok;
  761. PATHCONF3resfail resfail;
  762. } PATHCONF3res_u;
  763. };
  764. typedef struct PATHCONF3res PATHCONF3res;
  765. struct COMMIT3args {
  766. nfs_fh3 file;
  767. offset3 offset;
  768. count3 count;
  769. };
  770. typedef struct COMMIT3args COMMIT3args;
  771. struct COMMIT3resok {
  772. wcc_data file_wcc;
  773. writeverf3 verf;
  774. };
  775. typedef struct COMMIT3resok COMMIT3resok;
  776. struct COMMIT3resfail {
  777. wcc_data file_wcc;
  778. };
  779. typedef struct COMMIT3resfail COMMIT3resfail;
  780. struct COMMIT3res {
  781. nfsstat3 status;
  782. union {
  783. COMMIT3resok resok;
  784. COMMIT3resfail resfail;
  785. } COMMIT3res_u;
  786. };
  787. typedef struct COMMIT3res COMMIT3res;
  788. #define NFS_PROGRAM 100003
  789. #define NFS_V3 3
  790. #define NFSPROC3_NULL 0
  791. extern enum clnt_stat nfsproc3_null_3(void *, CLIENT *);
  792. #define NFSPROC3_GETATTR 1
  793. extern enum clnt_stat nfsproc3_getattr_3(GETATTR3args , GETATTR3res *, CLIENT *);
  794. #define NFSPROC3_SETATTR 2
  795. extern enum clnt_stat nfsproc3_setattr_3(SETATTR3args , SETATTR3res *, CLIENT *);
  796. #define NFSPROC3_LOOKUP 3
  797. extern enum clnt_stat nfsproc3_lookup_3(LOOKUP3args , LOOKUP3res *, CLIENT *);
  798. #define NFSPROC3_ACCESS 4
  799. extern enum clnt_stat nfsproc3_access_3(ACCESS3args , ACCESS3res *, CLIENT *);
  800. #define NFSPROC3_READLINK 5
  801. extern enum clnt_stat nfsproc3_readlink_3(READLINK3args , READLINK3res *, CLIENT *);
  802. #define NFSPROC3_READ 6
  803. extern enum clnt_stat nfsproc3_read_3(READ3args , READ3res *, CLIENT *);
  804. #define NFSPROC3_WRITE 7
  805. extern enum clnt_stat nfsproc3_write_3(WRITE3args , WRITE3res *, CLIENT *);
  806. #define NFSPROC3_CREATE 8
  807. extern enum clnt_stat nfsproc3_create_3(CREATE3args , CREATE3res *, CLIENT *);
  808. #define NFSPROC3_MKDIR 9
  809. extern enum clnt_stat nfsproc3_mkdir_3(MKDIR3args , MKDIR3res *, CLIENT *);
  810. #define NFSPROC3_SYMLINK 10
  811. extern enum clnt_stat nfsproc3_symlink_3(SYMLINK3args , SYMLINK3res *, CLIENT *);
  812. #define NFSPROC3_MKNOD 11
  813. extern enum clnt_stat nfsproc3_mknod_3(MKNOD3args , MKNOD3res *, CLIENT *);
  814. #define NFSPROC3_REMOVE 12
  815. extern enum clnt_stat nfsproc3_remove_3(REMOVE3args , REMOVE3res *, CLIENT *);
  816. #define NFSPROC3_RMDIR 13
  817. extern enum clnt_stat nfsproc3_rmdir_3(RMDIR3args , RMDIR3res *, CLIENT *);
  818. #define NFSPROC3_RENAME 14
  819. extern enum clnt_stat nfsproc3_rename_3(RENAME3args , RENAME3res *, CLIENT *);
  820. #define NFSPROC3_LINK 15
  821. extern enum clnt_stat nfsproc3_link_3(LINK3args , LINK3res *, CLIENT *);
  822. #define NFSPROC3_READDIR 16
  823. extern enum clnt_stat nfsproc3_readdir_3(READDIR3args , READDIR3res *, CLIENT *);
  824. #define NFSPROC3_READDIRPLUS 17
  825. extern enum clnt_stat nfsproc3_readdirplus_3(READDIRPLUS3args , READDIRPLUS3res *, CLIENT *);
  826. #define NFSPROC3_FSSTAT 18
  827. extern enum clnt_stat nfsproc3_fsstat_3(FSSTAT3args , FSSTAT3res *, CLIENT *);
  828. #define NFSPROC3_FSINFO 19
  829. extern enum clnt_stat nfsproc3_fsinfo_3(FSINFO3args , FSINFO3res *, CLIENT *);
  830. #define NFSPROC3_PATHCONF 20
  831. extern enum clnt_stat nfsproc3_pathconf_3(PATHCONF3args , PATHCONF3res *, CLIENT *);
  832. #define NFSPROC3_COMMIT 21
  833. extern enum clnt_stat nfsproc3_commit_3(COMMIT3args , COMMIT3res *, CLIENT *);
  834. /* the xdr functions */
  835. extern bool_t xdr_uint64(XDR *, uint64*);
  836. extern bool_t xdr_int64(XDR *, int64*);
  837. extern bool_t xdr_uint32(XDR *, uint32*);
  838. extern bool_t xdr_int32(XDR *, int32*);
  839. extern bool_t xdr_filename3(XDR *, filename3*);
  840. extern bool_t xdr_nfspath3(XDR *, nfspath3*);
  841. extern bool_t xdr_fileid3(XDR *, fileid3*);
  842. extern bool_t xdr_cookie3(XDR *, cookie3*);
  843. extern bool_t xdr_cookieverf3(XDR *, cookieverf3);
  844. extern bool_t xdr_createverf3(XDR *, createverf3);
  845. extern bool_t xdr_writeverf3(XDR *, writeverf3);
  846. extern bool_t xdr_uid3(XDR *, uid3*);
  847. extern bool_t xdr_gid3(XDR *, gid3*);
  848. extern bool_t xdr_size3(XDR *, size3*);
  849. extern bool_t xdr_offset3(XDR *, offset3*);
  850. extern bool_t xdr_mode3(XDR *, mode3*);
  851. extern bool_t xdr_count3(XDR *, count3*);
  852. extern bool_t xdr_nfsstat3(XDR *, nfsstat3*);
  853. extern bool_t xdr_ftype3(XDR *, ftype3*);
  854. extern bool_t xdr_stable_how(XDR *, stable_how*);
  855. extern bool_t xdr_createmode3(XDR *, createmode3*);
  856. extern bool_t xdr_specdata3(XDR *, specdata3*);
  857. extern bool_t xdr_nfs_fh3(XDR *, nfs_fh3*);
  858. extern bool_t xdr_nfstime3(XDR *, nfstime3*);
  859. extern bool_t xdr_fattr3(XDR *, fattr3*);
  860. extern bool_t xdr_post_op_attr(XDR *, post_op_attr*);
  861. extern bool_t xdr_wcc_attr(XDR *, wcc_attr*);
  862. extern bool_t xdr_pre_op_attr(XDR *, pre_op_attr*);
  863. extern bool_t xdr_wcc_data(XDR *, wcc_data*);
  864. extern bool_t xdr_post_op_fh3(XDR *, post_op_fh3*);
  865. extern bool_t xdr_time_how(XDR *, time_how*);
  866. extern bool_t xdr_set_mode3(XDR *, set_mode3*);
  867. extern bool_t xdr_set_uid3(XDR *, set_uid3*);
  868. extern bool_t xdr_set_gid3(XDR *, set_gid3*);
  869. extern bool_t xdr_set_size3(XDR *, set_size3*);
  870. extern bool_t xdr_set_atime(XDR *, set_atime*);
  871. extern bool_t xdr_set_mtime(XDR *, set_mtime*);
  872. extern bool_t xdr_sattr3(XDR *, sattr3*);
  873. extern bool_t xdr_diropargs3(XDR *, diropargs3*);
  874. extern bool_t xdr_GETATTR3args(XDR *, GETATTR3args*);
  875. extern bool_t xdr_GETATTR3resok(XDR *, GETATTR3resok*);
  876. extern bool_t xdr_GETATTR3res(XDR *, GETATTR3res*);
  877. extern bool_t xdr_sattrguard3(XDR *, sattrguard3*);
  878. extern bool_t xdr_SETATTR3args(XDR *, SETATTR3args*);
  879. extern bool_t xdr_SETATTR3resok(XDR *, SETATTR3resok*);
  880. extern bool_t xdr_SETATTR3resfail(XDR *, SETATTR3resfail*);
  881. extern bool_t xdr_SETATTR3res(XDR *, SETATTR3res*);
  882. extern bool_t xdr_LOOKUP3args(XDR *, LOOKUP3args*);
  883. extern bool_t xdr_LOOKUP3resok(XDR *, LOOKUP3resok*);
  884. extern bool_t xdr_LOOKUP3resfail(XDR *, LOOKUP3resfail*);
  885. extern bool_t xdr_LOOKUP3res(XDR *, LOOKUP3res*);
  886. extern bool_t xdr_ACCESS3args(XDR *, ACCESS3args*);
  887. extern bool_t xdr_ACCESS3resok(XDR *, ACCESS3resok*);
  888. extern bool_t xdr_ACCESS3resfail(XDR *, ACCESS3resfail*);
  889. extern bool_t xdr_ACCESS3res(XDR *, ACCESS3res*);
  890. extern bool_t xdr_READLINK3args(XDR *, READLINK3args*);
  891. extern bool_t xdr_READLINK3resok(XDR *, READLINK3resok*);
  892. extern bool_t xdr_READLINK3resfail(XDR *, READLINK3resfail*);
  893. extern bool_t xdr_READLINK3res(XDR *, READLINK3res*);
  894. extern bool_t xdr_READ3args(XDR *, READ3args*);
  895. extern bool_t xdr_READ3resok(XDR *, READ3resok*);
  896. extern bool_t xdr_READ3resfail(XDR *, READ3resfail*);
  897. extern bool_t xdr_READ3res(XDR *, READ3res*);
  898. extern bool_t xdr_WRITE3args(XDR *, WRITE3args*);
  899. extern bool_t xdr_WRITE3resok(XDR *, WRITE3resok*);
  900. extern bool_t xdr_WRITE3resfail(XDR *, WRITE3resfail*);
  901. extern bool_t xdr_WRITE3res(XDR *, WRITE3res*);
  902. extern bool_t xdr_createhow3(XDR *, createhow3*);
  903. extern bool_t xdr_CREATE3args(XDR *, CREATE3args*);
  904. extern bool_t xdr_CREATE3resok(XDR *, CREATE3resok*);
  905. extern bool_t xdr_CREATE3resfail(XDR *, CREATE3resfail*);
  906. extern bool_t xdr_CREATE3res(XDR *, CREATE3res*);
  907. extern bool_t xdr_MKDIR3args(XDR *, MKDIR3args*);
  908. extern bool_t xdr_MKDIR3resok(XDR *, MKDIR3resok*);
  909. extern bool_t xdr_MKDIR3resfail(XDR *, MKDIR3resfail*);
  910. extern bool_t xdr_MKDIR3res(XDR *, MKDIR3res*);
  911. extern bool_t xdr_symlinkdata3(XDR *, symlinkdata3*);
  912. extern bool_t xdr_SYMLINK3args(XDR *, SYMLINK3args*);
  913. extern bool_t xdr_SYMLINK3resok(XDR *, SYMLINK3resok*);
  914. extern bool_t xdr_SYMLINK3resfail(XDR *, SYMLINK3resfail*);
  915. extern bool_t xdr_SYMLINK3res(XDR *, SYMLINK3res*);
  916. extern bool_t xdr_devicedata3(XDR *, devicedata3*);
  917. extern bool_t xdr_mknoddata3(XDR *, mknoddata3*);
  918. extern bool_t xdr_MKNOD3args(XDR *, MKNOD3args*);
  919. extern bool_t xdr_MKNOD3resok(XDR *, MKNOD3resok*);
  920. extern bool_t xdr_MKNOD3resfail(XDR *, MKNOD3resfail*);
  921. extern bool_t xdr_MKNOD3res(XDR *, MKNOD3res*);
  922. extern bool_t xdr_REMOVE3args(XDR *, REMOVE3args*);
  923. extern bool_t xdr_REMOVE3resok(XDR *, REMOVE3resok*);
  924. extern bool_t xdr_REMOVE3resfail(XDR *, REMOVE3resfail*);
  925. extern bool_t xdr_REMOVE3res(XDR *, REMOVE3res*);
  926. extern bool_t xdr_RMDIR3args(XDR *, RMDIR3args*);
  927. extern bool_t xdr_RMDIR3resok(XDR *, RMDIR3resok*);
  928. extern bool_t xdr_RMDIR3resfail(XDR *, RMDIR3resfail*);
  929. extern bool_t xdr_RMDIR3res(XDR *, RMDIR3res*);
  930. extern bool_t xdr_RENAME3args(XDR *, RENAME3args*);
  931. extern bool_t xdr_RENAME3resok(XDR *, RENAME3resok*);
  932. extern bool_t xdr_RENAME3resfail(XDR *, RENAME3resfail*);
  933. extern bool_t xdr_RENAME3res(XDR *, RENAME3res*);
  934. extern bool_t xdr_LINK3args(XDR *, LINK3args*);
  935. extern bool_t xdr_LINK3resok(XDR *, LINK3resok*);
  936. extern bool_t xdr_LINK3resfail(XDR *, LINK3resfail*);
  937. extern bool_t xdr_LINK3res(XDR *, LINK3res*);
  938. extern bool_t xdr_READDIR3args(XDR *, READDIR3args*);
  939. extern bool_t xdr_entry3(XDR *, entry3*);
  940. extern bool_t xdr_dirlist3(XDR *, dirlist3*);
  941. extern bool_t xdr_READDIR3resok(XDR *, READDIR3resok*);
  942. extern bool_t xdr_READDIR3resfail(XDR *, READDIR3resfail*);
  943. extern bool_t xdr_READDIR3res(XDR *, READDIR3res*);
  944. extern bool_t xdr_READDIRPLUS3args(XDR *, READDIRPLUS3args*);
  945. extern bool_t xdr_entryplus3(XDR *, entryplus3*);
  946. extern bool_t xdr_dirlistplus3(XDR *, dirlistplus3*);
  947. extern bool_t xdr_READDIRPLUS3resok(XDR *, READDIRPLUS3resok*);
  948. extern bool_t xdr_READDIRPLUS3resfail(XDR *, READDIRPLUS3resfail*);
  949. extern bool_t xdr_READDIRPLUS3res(XDR *, READDIRPLUS3res*);
  950. extern bool_t xdr_FSSTAT3args(XDR *, FSSTAT3args*);
  951. extern bool_t xdr_FSSTAT3resok(XDR *, FSSTAT3resok*);
  952. extern bool_t xdr_FSSTAT3resfail(XDR *, FSSTAT3resfail*);
  953. extern bool_t xdr_FSSTAT3res(XDR *, FSSTAT3res*);
  954. extern bool_t xdr_FSINFO3args(XDR *, FSINFO3args*);
  955. extern bool_t xdr_FSINFO3resok(XDR *, FSINFO3resok*);
  956. extern bool_t xdr_FSINFO3resfail(XDR *, FSINFO3resfail*);
  957. extern bool_t xdr_FSINFO3res(XDR *, FSINFO3res*);
  958. extern bool_t xdr_PATHCONF3args(XDR *, PATHCONF3args*);
  959. extern bool_t xdr_PATHCONF3resok(XDR *, PATHCONF3resok*);
  960. extern bool_t xdr_PATHCONF3resfail(XDR *, PATHCONF3resfail*);
  961. extern bool_t xdr_PATHCONF3res(XDR *, PATHCONF3res*);
  962. extern bool_t xdr_COMMIT3args(XDR *, COMMIT3args*);
  963. extern bool_t xdr_COMMIT3resok(XDR *, COMMIT3resok*);
  964. extern bool_t xdr_COMMIT3resfail(XDR *, COMMIT3resfail*);
  965. extern bool_t xdr_COMMIT3res(XDR *, COMMIT3res*);
  966. #ifdef __cplusplus
  967. }
  968. #endif
  969. #endif /* !_NFS_H_RPCGEN */