diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/nfsd/syscall.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/linux/nfsd/syscall.h')
-rw-r--r-- | include/linux/nfsd/syscall.h | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/include/linux/nfsd/syscall.h b/include/linux/nfsd/syscall.h new file mode 100644 index 000000000000..e65c9db6d13f --- /dev/null +++ b/include/linux/nfsd/syscall.h | |||
@@ -0,0 +1,125 @@ | |||
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 <asm/types.h> | ||
13 | #ifdef __KERNEL__ | ||
14 | # include <linux/config.h> | ||
15 | # include <linux/types.h> | ||
16 | # include <linux/in.h> | ||
17 | #endif | ||
18 | #include <linux/posix_types.h> | ||
19 | #include <linux/nfsd/const.h> | ||
20 | #include <linux/nfsd/export.h> | ||
21 | #include <linux/nfsd/nfsfh.h> | ||
22 | #include <linux/nfsd/auth.h> | ||
23 | |||
24 | /* | ||
25 | * Version of the syscall interface | ||
26 | */ | ||
27 | #define NFSCTL_VERSION 0x0201 | ||
28 | |||
29 | /* | ||
30 | * These are the commands understood by nfsctl(). | ||
31 | */ | ||
32 | #define NFSCTL_SVC 0 /* This is a server process. */ | ||
33 | #define NFSCTL_ADDCLIENT 1 /* Add an NFS client. */ | ||
34 | #define NFSCTL_DELCLIENT 2 /* Remove an NFS client. */ | ||
35 | #define NFSCTL_EXPORT 3 /* export a file system. */ | ||
36 | #define NFSCTL_UNEXPORT 4 /* unexport a file system. */ | ||
37 | /*#define NFSCTL_UGIDUPDATE 5 / * update a client's uid/gid map. DISCARDED */ | ||
38 | /*#define NFSCTL_GETFH 6 / * get an fh by ino DISCARDED */ | ||
39 | #define NFSCTL_GETFD 7 /* get an fh by path (used by mountd) */ | ||
40 | #define NFSCTL_GETFS 8 /* get an fh by path with max FH len */ | ||
41 | |||
42 | /* SVC */ | ||
43 | struct nfsctl_svc { | ||
44 | unsigned short svc_port; | ||
45 | int svc_nthreads; | ||
46 | }; | ||
47 | |||
48 | /* ADDCLIENT/DELCLIENT */ | ||
49 | struct nfsctl_client { | ||
50 | char cl_ident[NFSCLNT_IDMAX+1]; | ||
51 | int cl_naddr; | ||
52 | struct in_addr cl_addrlist[NFSCLNT_ADDRMAX]; | ||
53 | int cl_fhkeytype; | ||
54 | int cl_fhkeylen; | ||
55 | unsigned char cl_fhkey[NFSCLNT_KEYMAX]; | ||
56 | }; | ||
57 | |||
58 | /* EXPORT/UNEXPORT */ | ||
59 | struct nfsctl_export { | ||
60 | char ex_client[NFSCLNT_IDMAX+1]; | ||
61 | char ex_path[NFS_MAXPATHLEN+1]; | ||
62 | __kernel_old_dev_t ex_dev; | ||
63 | __kernel_ino_t ex_ino; | ||
64 | int ex_flags; | ||
65 | __kernel_uid_t ex_anon_uid; | ||
66 | __kernel_gid_t ex_anon_gid; | ||
67 | }; | ||
68 | |||
69 | /* GETFD */ | ||
70 | struct nfsctl_fdparm { | ||
71 | struct sockaddr gd_addr; | ||
72 | char gd_path[NFS_MAXPATHLEN+1]; | ||
73 | int gd_version; | ||
74 | }; | ||
75 | |||
76 | /* GETFS - GET Filehandle with Size */ | ||
77 | struct nfsctl_fsparm { | ||
78 | struct sockaddr gd_addr; | ||
79 | char gd_path[NFS_MAXPATHLEN+1]; | ||
80 | int gd_maxlen; | ||
81 | }; | ||
82 | |||
83 | /* | ||
84 | * This is the argument union. | ||
85 | */ | ||
86 | struct nfsctl_arg { | ||
87 | int ca_version; /* safeguard */ | ||
88 | union { | ||
89 | struct nfsctl_svc u_svc; | ||
90 | struct nfsctl_client u_client; | ||
91 | struct nfsctl_export u_export; | ||
92 | struct nfsctl_fdparm u_getfd; | ||
93 | struct nfsctl_fsparm u_getfs; | ||
94 | /* | ||
95 | * The following dummy member is needed to preserve binary compatibility | ||
96 | * on platforms where alignof(void*)>alignof(int). It's needed because | ||
97 | * this union used to contain a member (u_umap) which contained a | ||
98 | * pointer. | ||
99 | */ | ||
100 | void *u_ptr; | ||
101 | } u; | ||
102 | #define ca_svc u.u_svc | ||
103 | #define ca_client u.u_client | ||
104 | #define ca_export u.u_export | ||
105 | #define ca_getfd u.u_getfd | ||
106 | #define ca_getfs u.u_getfs | ||
107 | }; | ||
108 | |||
109 | union nfsctl_res { | ||
110 | __u8 cr_getfh[NFS_FHSIZE]; | ||
111 | struct knfsd_fh cr_getfs; | ||
112 | }; | ||
113 | |||
114 | #ifdef __KERNEL__ | ||
115 | /* | ||
116 | * Kernel syscall implementation. | ||
117 | */ | ||
118 | extern int exp_addclient(struct nfsctl_client *ncp); | ||
119 | extern int exp_delclient(struct nfsctl_client *ncp); | ||
120 | extern int exp_export(struct nfsctl_export *nxp); | ||
121 | extern int exp_unexport(struct nfsctl_export *nxp); | ||
122 | |||
123 | #endif /* __KERNEL__ */ | ||
124 | |||
125 | #endif /* NFSD_SYSCALL_H */ | ||