2 * linux/include/linux/lockd/bind.h
4 * This is the part of lockd visible to nfsd and the nfs client.
6 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
9 #ifndef LINUX_LOCKD_BIND_H
10 #define LINUX_LOCKD_BIND_H
12 #include <linux/lockd/nlm.h>
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>
19 /* Dummy declarations */
23 * This is the set of functions for lockd->nfsd communication
25 struct nlmsvc_binding
{
26 __be32 (*fopen
)(struct svc_rqst
*,
29 void (*fclose
)(struct file
*);
30 unsigned long (*get_grace_period
)(void);
33 extern struct nlmsvc_binding
* nlmsvc_ops
;
36 * Similar to nfs_client_initdata, but without the NFS-specific
39 struct nlmclnt_initdata
{
41 const struct sockaddr
*address
;
43 unsigned short protocol
;
48 * Functions exported by the lockd module
51 extern struct nlm_host
*nlmclnt_init(const struct nlmclnt_initdata
*nlm_init
);
52 extern void nlmclnt_done(struct nlm_host
*host
);
54 extern int nlmclnt_proc(struct nlm_host
*host
, int cmd
,
55 struct file_lock
*fl
);
56 extern int lockd_up(int proto
);
57 extern void lockd_down(void);
59 unsigned long get_nfs_grace_period(void);
62 unsigned long get_nfs4_grace_period(void);
64 static inline unsigned long get_nfs4_grace_period(void) {return 0;}
67 #endif /* LINUX_LOCKD_BIND_H */