~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/nfsd/syscall.h

Version: ~ [ linux-6.0-rc6 ] ~ [ linux-5.19.10 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.69 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.144 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.214 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.259 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.294 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.329 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.302 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * include/linux/nfsd/syscall.h
  3  *
  4  * This file holds all declarations for the knfsd syscall interface.
  5  *
  6  * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de>
  7  */
  8 
  9 #ifndef NFSD_SYSCALL_H
 10 #define NFSD_SYSCALL_H
 11 
 12 # include <linux/types.h>
 13 #ifdef __KERNEL__
 14 # include <linux/in.h>
 15 #endif 
 16 #include <linux/posix_types.h>
 17 #include <linux/nfsd/const.h>
 18 #include <linux/nfsd/export.h>
 19 #include <linux/nfsd/nfsfh.h>
 20 
 21 /*
 22  * Version of the syscall interface
 23  */
 24 #define NFSCTL_VERSION          0x0201
 25 
 26 /*
 27  * These are the commands understood by nfsctl().
 28  */
 29 #define NFSCTL_SVC              0       /* This is a server process. */
 30 #define NFSCTL_ADDCLIENT        1       /* Add an NFS client. */
 31 #define NFSCTL_DELCLIENT        2       /* Remove an NFS client. */
 32 #define NFSCTL_EXPORT           3       /* export a file system. */
 33 #define NFSCTL_UNEXPORT         4       /* unexport a file system. */
 34 /*#define NFSCTL_UGIDUPDATE     5       / * update a client's uid/gid map. DISCARDED */
 35 /*#define NFSCTL_GETFH          6       / * get an fh by ino DISCARDED */
 36 #define NFSCTL_GETFD            7       /* get an fh by path (used by mountd) */
 37 #define NFSCTL_GETFS            8       /* get an fh by path with max FH len */
 38 
 39 /* SVC */
 40 struct nfsctl_svc {
 41         unsigned short          svc_port;
 42         int                     svc_nthreads;
 43 };
 44 
 45 /* ADDCLIENT/DELCLIENT */
 46 struct nfsctl_client {
 47         char                    cl_ident[NFSCLNT_IDMAX+1];
 48         int                     cl_naddr;
 49         struct in_addr          cl_addrlist[NFSCLNT_ADDRMAX];
 50         int                     cl_fhkeytype;
 51         int                     cl_fhkeylen;
 52         unsigned char           cl_fhkey[NFSCLNT_KEYMAX];
 53 };
 54 
 55 /* EXPORT/UNEXPORT */
 56 struct nfsctl_export {
 57         char                    ex_client[NFSCLNT_IDMAX+1];
 58         char                    ex_path[NFS_MAXPATHLEN+1];
 59         __kernel_old_dev_t      ex_dev;
 60         __kernel_ino_t          ex_ino;
 61         int                     ex_flags;
 62         __kernel_uid_t          ex_anon_uid;
 63         __kernel_gid_t          ex_anon_gid;
 64 };
 65 
 66 /* GETFD */
 67 struct nfsctl_fdparm {
 68         struct sockaddr         gd_addr;
 69         char                    gd_path[NFS_MAXPATHLEN+1];
 70         int                     gd_version;
 71 };
 72 
 73 /* GETFS - GET Filehandle with Size */
 74 struct nfsctl_fsparm {
 75         struct sockaddr         gd_addr;
 76         char                    gd_path[NFS_MAXPATHLEN+1];
 77         int                     gd_maxlen;
 78 };
 79 
 80 /*
 81  * This is the argument union.
 82  */
 83 struct nfsctl_arg {
 84         int                     ca_version;     /* safeguard */
 85         union {
 86                 struct nfsctl_svc       u_svc;
 87                 struct nfsctl_client    u_client;
 88                 struct nfsctl_export    u_export;
 89                 struct nfsctl_fdparm    u_getfd;
 90                 struct nfsctl_fsparm    u_getfs;
 91                 /*
 92                  * The following dummy member is needed to preserve binary compatibility
 93                  * on platforms where alignof(void*)>alignof(int).  It's needed because
 94                  * this union used to contain a member (u_umap) which contained a
 95                  * pointer.
 96                  */
 97                 void *u_ptr;
 98         } u;
 99 #define ca_svc          u.u_svc
100 #define ca_client       u.u_client
101 #define ca_export       u.u_export
102 #define ca_getfd        u.u_getfd
103 #define ca_getfs        u.u_getfs
104 };
105 
106 union nfsctl_res {
107         __u8                    cr_getfh[NFS_FHSIZE];
108         struct knfsd_fh         cr_getfs;
109 };
110 
111 #ifdef __KERNEL__
112 /*
113  * Kernel syscall implementation.
114  */
115 extern int              exp_addclient(struct nfsctl_client *ncp);
116 extern int              exp_delclient(struct nfsctl_client *ncp);
117 extern int              exp_export(struct nfsctl_export *nxp);
118 extern int              exp_unexport(struct nfsctl_export *nxp);
119 
120 #endif /* __KERNEL__ */
121 
122 #endif /* NFSD_SYSCALL_H */
123 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp