home *** CD-ROM | disk | FTP | other *** search
/ PDA Software Library / pdasoftwarelib.iso / PSION / COMMS / P3NFS / INCLUDE / NFS_PROT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-18  |  7.5 KB  |  400 lines

  1. #ifdef hpux
  2. #include <sys/time.h>
  3. #include <nfs/nfs.h>
  4. #endif
  5. #ifdef linux
  6. # include <sys/time.h>
  7. # include <linux/nfs.h>
  8. #endif
  9. #ifdef __sgi
  10. # include <rpc/types.h>
  11. # include <sys/fs/nfs.h>
  12. # include <sys/fs/nfs_clnt.h>
  13. #endif
  14.  
  15. /*
  16.  * Please do not edit this file.
  17.  * It was generated using rpcgen.
  18.  */
  19.  
  20. #include <rpc/types.h>
  21.  
  22. #define NFS_PORT 2049
  23. #define NFS_MAXDATA 8192
  24. #define NFS_MAXPATHLEN 1024
  25. #define NFS_MAXNAMLEN 255
  26. #define NFS_FHSIZE 32
  27. #define NFS_COOKIESIZE 4
  28. #ifndef NFS_FIFO_DEV
  29. #define NFS_FIFO_DEV -1
  30. #endif
  31. #define NFSMODE_FMT 0170000
  32. #define NFSMODE_DIR 0040000
  33. #define NFSMODE_CHR 0020000
  34. #define NFSMODE_BLK 0060000
  35. #define NFSMODE_REG 0100000
  36. #define NFSMODE_LNK 0120000
  37. #define NFSMODE_SOCK 0140000
  38. #define NFSMODE_FIFO 0010000
  39.  
  40. #if !defined(hpux) && !defined(linux) && !defined(__sgi)
  41. enum nfsstat {
  42.     NFS_OK = 0,
  43.     NFSERR_PERM = 1,
  44.     NFSERR_NOENT = 2,
  45.     NFSERR_IO = 5,
  46.     NFSERR_NXIO = 6,
  47.     NFSERR_ACCES = 13,
  48.     NFSERR_EXIST = 17,
  49.     NFSERR_NODEV = 19,
  50.     NFSERR_NOTDIR = 20,
  51.     NFSERR_ISDIR = 21,
  52.     NFSERR_FBIG = 27,
  53.     NFSERR_NOSPC = 28,
  54.     NFSERR_ROFS = 30,
  55.     NFSERR_NAMETOOLONG = 63,
  56.     NFSERR_NOTEMPTY = 66,
  57.     NFSERR_DQUOT = 69,
  58.     NFSERR_STALE = 70,
  59.     NFSERR_WFLUSH = 99
  60. };
  61. #endif /* !hpux, linux */
  62.  
  63. #ifdef linux
  64. typedef enum nfs_stat nfsstat;
  65. #else
  66. typedef enum nfsstat nfsstat;
  67. #endif
  68. bool_t xdr_nfsstat();
  69.  
  70. #if !defined(hpux) && !defined(linux) && !defined(__sgi)
  71. enum ftype {
  72.     NFNON = 0,
  73.     NFREG = 1,
  74.     NFDIR = 2,
  75.     NFBLK = 3,
  76.     NFCHR = 4,
  77.     NFLNK = 5,
  78.     NFSOCK = 6,
  79.     NFBAD = 7,
  80.     NFFIFO = 8
  81. };
  82. typedef enum ftype ftype;
  83. #endif /* !linux, hpux */
  84.  
  85. #ifdef __sgi
  86. typedef enum nfsftype ftype;
  87. #endif
  88.  
  89. #ifdef hpux
  90. typedef enum nfsftype ftype;
  91. #endif
  92. #ifdef linux
  93. typedef enum nfs_ftype ftype;
  94. #endif
  95.  
  96. bool_t xdr_ftype();
  97.  
  98. #ifndef linux
  99. struct nfs_fh {
  100.     char data[NFS_FHSIZE];
  101. };
  102. #endif
  103. typedef struct nfs_fh nfs_fh;
  104. bool_t xdr_nfs_fh();
  105.  
  106. struct nfstime {
  107.     u_int seconds;
  108.     u_int useconds;
  109. };
  110. typedef struct nfstime nfstime;
  111. bool_t xdr_nfstime();
  112.  
  113. struct fattr {
  114.     ftype type;
  115.     u_int mode;
  116.     u_int nlink;
  117.     u_int uid;
  118.     u_int gid;
  119.     u_int size;
  120.     u_int blocksize;
  121.     u_int rdev;
  122.     u_int blocks;
  123.     u_int fsid;
  124.     u_int fileid;
  125.     nfstime atime;
  126.     nfstime mtime;
  127.     nfstime ctime;
  128. };
  129. typedef struct fattr fattr;
  130. bool_t xdr_fattr();
  131.  
  132. struct sattr {
  133.     u_int mode;
  134.     u_int uid;
  135.     u_int gid;
  136.     u_int size;
  137.     nfstime atime;
  138.     nfstime mtime;
  139. };
  140. typedef struct sattr sattr;
  141. bool_t xdr_sattr();
  142.  
  143. typedef char *filename;
  144. bool_t xdr_filename();
  145.  
  146. typedef char *nfspath;
  147. bool_t xdr_nfspath();
  148.  
  149. struct attrstat {
  150.     nfsstat status;
  151.     union {
  152.         fattr attributes;
  153.     } attrstat_u;
  154. };
  155. typedef struct attrstat attrstat;
  156. bool_t xdr_attrstat();
  157.  
  158. struct sattrargs {
  159.     nfs_fh file;
  160.     sattr attributes;
  161. };
  162. typedef struct sattrargs sattrargs;
  163. bool_t xdr_sattrargs();
  164.  
  165. struct diropargs {
  166.     nfs_fh dir;
  167.     filename name;
  168. };
  169. typedef struct diropargs diropargs;
  170. bool_t xdr_diropargs();
  171.  
  172. struct diropokres {
  173.     nfs_fh file;
  174.     fattr attributes;
  175. };
  176. typedef struct diropokres diropokres;
  177. bool_t xdr_diropokres();
  178.  
  179. struct diropres {
  180.     nfsstat status;
  181.     union {
  182.         diropokres diropres;
  183.     } diropres_u;
  184. };
  185. typedef struct diropres diropres;
  186. bool_t xdr_diropres();
  187.  
  188. struct readlinkres {
  189.     nfsstat status;
  190.     union {
  191.         nfspath data;
  192.     } readlinkres_u;
  193. };
  194. typedef struct readlinkres readlinkres;
  195. bool_t xdr_readlinkres();
  196.  
  197. struct readargs {
  198.     nfs_fh file;
  199.     u_int offset;
  200.     u_int count;
  201.     u_int totalcount;
  202. };
  203. typedef struct readargs readargs;
  204. bool_t xdr_readargs();
  205.  
  206. struct readokres {
  207.     fattr attributes;
  208.     struct {
  209.         u_int data_len;
  210.         char *data_val;
  211.     } data;
  212. };
  213. typedef struct readokres readokres;
  214. bool_t xdr_readokres();
  215.  
  216. struct readres {
  217.     nfsstat status;
  218.     union {
  219.         readokres reply;
  220.     } readres_u;
  221. };
  222. typedef struct readres readres;
  223. bool_t xdr_readres();
  224.  
  225. struct writeargs {
  226.     nfs_fh file;
  227.     u_int beginoffset;
  228.     u_int offset;
  229.     u_int totalcount;
  230.     struct {
  231.         u_int data_len;
  232.         char *data_val;
  233.     } data;
  234. };
  235. typedef struct writeargs writeargs;
  236. bool_t xdr_writeargs();
  237.  
  238. struct createargs {
  239.     diropargs where;
  240.     sattr attributes;
  241. };
  242. typedef struct createargs createargs;
  243. bool_t xdr_createargs();
  244.  
  245. struct renameargs {
  246.     diropargs from;
  247.     diropargs to;
  248. };
  249. typedef struct renameargs renameargs;
  250. bool_t xdr_renameargs();
  251.  
  252. struct linkargs {
  253.     nfs_fh from;
  254.     diropargs to;
  255. };
  256. typedef struct linkargs linkargs;
  257. bool_t xdr_linkargs();
  258.  
  259. struct symlinkargs {
  260.     diropargs from;
  261.     nfspath to;
  262.     sattr attributes;
  263. };
  264. typedef struct symlinkargs symlinkargs;
  265. bool_t xdr_symlinkargs();
  266.  
  267. typedef char nfscookie[NFS_COOKIESIZE];
  268. bool_t xdr_nfscookie();
  269.  
  270. struct readdirargs {
  271.     nfs_fh dir;
  272.     nfscookie cookie;
  273.     u_int count;
  274. };
  275. typedef struct readdirargs readdirargs;
  276. bool_t xdr_readdirargs();
  277.  
  278. struct entry {
  279.     u_int fileid;
  280.     filename name;
  281.     nfscookie cookie;
  282.     struct entry *nextentry;
  283. };
  284. typedef struct entry entry;
  285. bool_t xdr_entry();
  286.  
  287. struct dirlist {
  288.     entry *entries;
  289.     bool_t eof;
  290. };
  291. typedef struct dirlist dirlist;
  292. bool_t xdr_dirlist();
  293.  
  294. struct readdirres {
  295.     nfsstat status;
  296.     union {
  297.         dirlist reply;
  298.     } readdirres_u;
  299. };
  300. typedef struct readdirres readdirres;
  301. bool_t xdr_readdirres();
  302.  
  303. struct statfsokres {
  304.     u_int tsize;
  305.     u_int bsize;
  306.     u_int blocks;
  307.     u_int bfree;
  308.     u_int bavail;
  309. };
  310. typedef struct statfsokres statfsokres;
  311. bool_t xdr_statfsokres();
  312.  
  313. struct statfsres {
  314.     nfsstat status;
  315.     union {
  316.         statfsokres reply;
  317.     } statfsres_u;
  318. };
  319. typedef struct statfsres statfsres;
  320. bool_t xdr_statfsres();
  321.  
  322. #ifndef NFS_PROGRAM
  323. #define NFS_PROGRAM ((u_long)100003)
  324. #endif
  325. #ifndef  NFS_VERSION
  326. #define NFS_VERSION ((u_long)2)
  327. #endif
  328. #ifndef  NFSPROC_NULL
  329. #define NFSPROC_NULL ((u_long)0)
  330. #endif
  331. extern void *nfsproc_null_2();
  332. #ifndef  NFSPROC_GETATTR
  333. #define NFSPROC_GETATTR ((u_long)1)
  334. #endif
  335. extern attrstat *nfsproc_getattr_2();
  336. #ifndef  NFSPROC_SETATTR
  337. #define NFSPROC_SETATTR ((u_long)2)
  338. #endif
  339. extern attrstat *nfsproc_setattr_2();
  340. #ifndef  NFSPROC_ROOT
  341. #define NFSPROC_ROOT ((u_long)3)
  342. #endif
  343. extern void *nfsproc_root_2();
  344. #ifndef  NFSPROC_LOOKUP
  345. #define NFSPROC_LOOKUP ((u_long)4)
  346. #endif
  347. extern diropres *nfsproc_lookup_2();
  348. #ifndef  NFSPROC_READLINK
  349. #define NFSPROC_READLINK ((u_long)5)
  350. #endif
  351. extern readlinkres *nfsproc_readlink_2();
  352. #ifndef  NFSPROC_READ
  353. #define NFSPROC_READ ((u_long)6)
  354. #endif
  355. extern readres *nfsproc_read_2();
  356. #ifndef  NFSPROC_WRITECACHE
  357. #define NFSPROC_WRITECACHE ((u_long)7)
  358. #endif
  359. extern void *nfsproc_writecache_2();
  360. #ifndef  NFSPROC_WRITE
  361. #define NFSPROC_WRITE ((u_long)8)
  362. #endif
  363. extern attrstat *nfsproc_write_2();
  364. #ifndef  NFSPROC_CREATE
  365. #define NFSPROC_CREATE ((u_long)9)
  366. #endif
  367. extern diropres *nfsproc_create_2();
  368. #ifndef  NFSPROC_REMOVE
  369. #define NFSPROC_REMOVE ((u_long)10)
  370. #endif
  371. extern nfsstat *nfsproc_remove_2();
  372. #ifndef  NFSPROC_RENAME
  373. #define NFSPROC_RENAME ((u_long)11)
  374. #endif
  375. extern nfsstat *nfsproc_rename_2();
  376. #ifndef  NFSPROC_LINK
  377. #define NFSPROC_LINK ((u_long)12)
  378. #endif
  379. extern nfsstat *nfsproc_link_2();
  380. #ifndef  NFSPROC_SYMLINK
  381. #define NFSPROC_SYMLINK ((u_long)13)
  382. #endif
  383. extern nfsstat *nfsproc_symlink_2();
  384. #ifndef  NFSPROC_MKDIR
  385. #define NFSPROC_MKDIR ((u_long)14)
  386. #endif
  387. extern diropres *nfsproc_mkdir_2();
  388. #ifndef  NFSPROC_RMDIR
  389. #define NFSPROC_RMDIR ((u_long)15)
  390. #endif
  391. extern nfsstat *nfsproc_rmdir_2();
  392. #ifndef  NFSPROC_READDIR
  393. #define NFSPROC_READDIR ((u_long)16)
  394. #endif
  395. extern readdirres *nfsproc_readdir_2();
  396. #ifndef  NFSPROC_STATFS
  397. #define NFSPROC_STATFS ((u_long)17)
  398. #endif
  399. extern statfsres *nfsproc_statfs_2();
  400.