mcp23s08 spi gpio expander support
[linux-2.6-block.git] / include / linux / lockd / bind.h
CommitLineData
1da177e4
LT
1/*
2 * linux/include/linux/lockd/bind.h
3 *
4 * This is the part of lockd visible to nfsd and the nfs client.
5 *
6 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
7 */
8
9#ifndef LINUX_LOCKD_BIND_H
10#define LINUX_LOCKD_BIND_H
11
12#include <linux/lockd/nlm.h>
d343fce1
N
13/* need xdr-encoded error codes too, so... */
14#include <linux/lockd/xdr.h>
15#ifdef CONFIG_LOCKD_V4
16#include <linux/lockd/xdr4.h>
17#endif
1da177e4
LT
18
19/* Dummy declarations */
20struct svc_rqst;
21
22/*
23 * This is the set of functions for lockd->nfsd communication
24 */
25struct nlmsvc_binding {
e8c5c045 26 __be32 (*fopen)(struct svc_rqst *,
1da177e4
LT
27 struct nfs_fh *,
28 struct file **);
29 void (*fclose)(struct file *);
9a8db97e 30 unsigned long (*get_grace_period)(void);
1da177e4
LT
31};
32
33extern struct nlmsvc_binding * nlmsvc_ops;
34
883bb163
CL
35/*
36 * Similar to nfs_client_initdata, but without the NFS-specific
37 * rpc_ops field.
38 */
39struct nlmclnt_initdata {
40 const char *hostname;
41 const struct sockaddr *address;
42 size_t addrlen;
43 unsigned short protocol;
44 u32 nfs_version;
45};
46
1da177e4
LT
47/*
48 * Functions exported by the lockd module
49 */
883bb163
CL
50
51extern struct nlm_host *nlmclnt_init(const struct nlmclnt_initdata *nlm_init);
52c4044d
CL
52extern void nlmclnt_done(struct nlm_host *host);
53
1093a60e
CL
54extern int nlmclnt_proc(struct nlm_host *host, int cmd,
55 struct file_lock *fl);
24e36663 56extern int lockd_up(int proto);
1da177e4
LT
57extern void lockd_down(void);
58
9a8db97e
ME
59unsigned long get_nfs_grace_period(void);
60
61#ifdef CONFIG_NFSD_V4
62unsigned long get_nfs4_grace_period(void);
63#else
64static inline unsigned long get_nfs4_grace_period(void) {return 0;}
65#endif
66
1da177e4 67#endif /* LINUX_LOCKD_BIND_H */