2 * include/linux/nfsd/syscall.h
4 * This file holds all declarations for the knfsd syscall interface.
6 * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de>
10 #define NFSD_SYSCALL_H
12 #include <asm/types.h>
13 #include <linux/posix_types.h>
14 #include <linux/nfsd/const.h>
15 #include <linux/nfsd/export.h>
16 #include <linux/nfsd/nfsfh.h>
17 #include <linux/nfsd/auth.h>
20 * Version of the syscall interface
22 #define NFSCTL_VERSION 0x0201
25 * These are the commands understood by nfsctl().
27 #define NFSCTL_SVC 0 /* This is a server process. */
28 #define NFSCTL_ADDCLIENT 1 /* Add an NFS client. */
29 #define NFSCTL_DELCLIENT 2 /* Remove an NFS client. */
30 #define NFSCTL_EXPORT 3 /* export a file system. */
31 #define NFSCTL_UNEXPORT 4 /* unexport a file system. */
32 /*#define NFSCTL_UGIDUPDATE 5 / * update a client's uid/gid map. DISCARDED */
33 /*#define NFSCTL_GETFH 6 / * get an fh by ino DISCARDED */
34 #define NFSCTL_GETFD 7 /* get an fh by path (used by mountd) */
35 #define NFSCTL_GETFS 8 /* get an fh by path with max FH len */
39 unsigned short svc_port;
43 /* ADDCLIENT/DELCLIENT */
44 struct nfsctl_client {
45 char cl_ident[NFSCLNT_IDMAX+1];
47 struct in_addr cl_addrlist[NFSCLNT_ADDRMAX];
50 unsigned char cl_fhkey[NFSCLNT_KEYMAX];
54 struct nfsctl_export {
55 char ex_client[NFSCLNT_IDMAX+1];
56 char ex_path[NFS_MAXPATHLEN+1];
57 __kernel_old_dev_t ex_dev;
58 __kernel_ino_t ex_ino;
60 __kernel_uid_t ex_anon_uid;
61 __kernel_gid_t ex_anon_gid;
65 struct nfsctl_fdparm {
66 struct sockaddr gd_addr;
67 char gd_path[NFS_MAXPATHLEN+1];
71 /* GETFS - GET Filehandle with Size */
72 struct nfsctl_fsparm {
73 struct sockaddr gd_addr;
74 char gd_path[NFS_MAXPATHLEN+1];
79 * This is the argument union.
82 int ca_version; /* safeguard */
84 struct nfsctl_svc u_svc;
85 struct nfsctl_client u_client;
86 struct nfsctl_export u_export;
87 struct nfsctl_fdparm u_getfd;
88 struct nfsctl_fsparm u_getfs;
90 * The following dummy member is needed to preserve binary compatibility
91 * on platforms where alignof(void*)>alignof(int). It's needed because
92 * this union used to contain a member (u_umap) which contained a
97 #define ca_svc u.u_svc
98 #define ca_client u.u_client
99 #define ca_export u.u_export
100 #define ca_getfd u.u_getfd
101 #define ca_getfs u.u_getfs
105 __u8 cr_getfh[NFS_FHSIZE];
106 struct knfsd_fh cr_getfs;
110 #endif /* NFSD_SYSCALL_H */