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