home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / n / tcpip / netkit-a.06 / netkit-a / NetKit-A-0.06 / nfs-server-2.0 / nfsd.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-27  |  2.2 KB  |  92 lines

  1. /*
  2.  * nfsd.h    This program implements a user-space NFS server.
  3.  *
  4.  * Authors:    Mark A. Shand, May 1988
  5.  *        Rick Sladkey, <jrs@world.std.com>
  6.  *        Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  7.  *
  8.  *        Copyright 1988 Mark A. Shand
  9.  *        This software maybe be used for any purpose provided
  10.  *        the above copyright notice is retained.  It is supplied
  11.  *        as is, with no warranty expressed or implied.
  12.  */
  13.  
  14. #include "system.h"
  15.  
  16. #include "mount.h"
  17. #include "nfs_prot.h"
  18.  
  19. union argument_types {
  20.     nfs_fh            nfsproc_getattr_2_arg;
  21.     sattrargs        nfsproc_setattr_2_arg;
  22.     diropargs        nfsproc_lookup_2_arg;
  23.     nfs_fh            nfsproc_readlink_2_arg;
  24.     readargs        nfsproc_read_2_arg;
  25.     writeargs        nfsproc_write_2_arg;
  26.     createargs        nfsproc_create_2_arg;
  27.     diropargs        nfsproc_remove_2_arg;
  28.     renameargs        nfsproc_rename_2_arg;
  29.     linkargs        nfsproc_link_2_arg;
  30.     symlinkargs        nfsproc_symlink_2_arg;
  31.     createargs        nfsproc_mkdir_2_arg;
  32.     diropargs        nfsproc_rmdir_2_arg;
  33.     readdirargs        nfsproc_readdir_2_arg;
  34.     nfs_fh            nfsproc_statfs_2_arg;
  35. };
  36.  
  37. union result_types {
  38.     attrstat        attrstat;
  39.     diropres        diropres;
  40.     readlinkres        readlinkres;
  41.     readres            readres;
  42.     nfsstat            nfsstat;
  43.     readdirres        readdirres;
  44.     statfsres        statfsres;
  45. };
  46.  
  47. typedef struct options {
  48.     enum {map_daemon, identity}
  49.                 uidmap;        /* uid/gid mapping functions */
  50.     int            root_squash;
  51.     int            secure_port;    /* client options */
  52.     int            read_only;
  53.     int            link_relative;
  54. } options;
  55.  
  56. typedef struct clnt_param {
  57.     struct clnt_param    *next;
  58.     struct in_addr        clnt_addr;
  59.     char            *clnt_name;
  60.     char            *mount_point;
  61.     options            o;
  62. } clnt_param;
  63.  
  64. /* Global variables. */
  65. extern union argument_types    argument;
  66. extern union result_types    result;
  67.  
  68. /* Include the other module definitions. */
  69. #ifdef __STDC__
  70. #   define _PRO(f, a)    f a
  71. #else
  72. #   define _PRO(f, a)    f ()
  73. #endif
  74. #include "auth.h"
  75. #include "fh.h"
  76. #include "logging.h"
  77.  
  78. /* Global Function prototypes. */
  79. extern _PRO( void mallocfailed, (void)                    );
  80. extern _PRO( nfsstat getattr, (nfs_fh *fh, fattr *attr,            \
  81.                    struct stat *stat_optimize)        );
  82.  
  83. #ifndef HAVE_REALPATH
  84. extern _PRO( char *realpath, (const char *path, char *resolved_path)    );
  85. #endif /* HAVE_REALPATH */
  86.  
  87. #ifndef HAVE_STRERROR
  88. extern _PRO( char *strerror, (int errnum)                );
  89. #endif /* HAVE_STRERROR */
  90.  
  91. /* End of nfsd.h. */
  92.