home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 13 / MA_Cover_13.bin / source / c / nfsd / src / nfs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-11-24  |  1.4 KB  |  88 lines

  1. /*  Headers for an implementation of the NFS protocol
  2.  
  3.     ©1999 Joseph Walton
  4.  
  5.     This software is distributed under the terms of the GNU General Public
  6.     License; either version 2 of the License, or (at your option) any
  7.     later version.
  8. */
  9.  
  10. #ifndef NFSD_NFS_H
  11. #define NFSD_NFS_H
  12.  
  13. #include "rpc.h"
  14. #include "nfs_prot.h"
  15.  
  16. typedef struct {
  17.     BYTE data[NFS_FHSIZE];
  18. } nfs_fh;
  19.  
  20. /*
  21.  * Timeval
  22.  */
  23. struct nfstime {
  24.         u_int seconds;
  25.         u_int useconds;
  26. };
  27.  
  28. //typedef struct nfstime nfstime;
  29.  
  30. /*
  31.  * Arguments for directory operations
  32.  */
  33. struct diropargs {
  34.         nfs_fh *dir_handle;    /* directory file handle */
  35.         char filename[NFS_MAXNAMELEN + 1];          /* name (up to NFS_MAXNAMLEN bytes) */
  36. };
  37.  
  38. //typedef struct diropargs diropargs;
  39.  
  40. struct sattr {
  41.     u_int mode;
  42.     u_int uid;
  43.     u_int gid;
  44.     u_int size;
  45.     struct nfstime atime;
  46.     struct nfstime mtime;
  47. };
  48.  
  49. struct sattrargs {
  50.     nfs_fh *handle;
  51.     struct sattr sattr;
  52. };
  53.  
  54. struct createargs {
  55.     struct diropargs where;
  56.     struct sattr sattr;
  57. };
  58.  
  59. struct renameargs {
  60.     struct diropargs from;
  61.     struct diropargs to;
  62. };
  63.  
  64. struct readargs {
  65.     nfs_fh *handle;
  66.     u_int offset;
  67.     u_int count;
  68. };
  69.  
  70. struct writeargs {
  71.     nfs_fh *handle;
  72.     u_int offset;
  73.     u_int count;
  74.     BYTE *data;
  75. };
  76.  
  77. struct readdirargs {
  78.     nfs_fh *dir_handle;
  79.     ULONG cookie;
  80.     u_int count;
  81. };
  82.  
  83. int nfs_procedure(struct Call *call, int32 *ptr, int32 *limit,
  84.     int32 *rptr, int32 *rlimit);
  85.  
  86. #endif
  87.  
  88.