1
2
3
4
5
6
7
8
9
10 #ifndef LINUX_LOCKD_BIND_H
11 #define LINUX_LOCKD_BIND_H
12
13 #include <linux/lockd/nlm.h>
14
15 #include <linux/lockd/xdr.h>
16 #ifdef CONFIG_LOCKD_V4
17 #include <linux/lockd/xdr4.h>
18 #endif
19
20
21 struct svc_rqst;
22 struct rpc_task;
23
24
25
26
27 struct nlmsvc_binding {
28 __be32 (*fopen)(struct svc_rqst *,
29 struct nfs_fh *,
30 struct file **);
31 void (*fclose)(struct file *);
32 };
33
34 extern const struct nlmsvc_binding *nlmsvc_ops;
35
36
37
38
39
40 struct nlmclnt_initdata {
41 const char *hostname;
42 const struct sockaddr *address;
43 size_t addrlen;
44 unsigned short protocol;
45 u32 nfs_version;
46 int noresvport;
47 struct net *net;
48 const struct nlmclnt_operations *nlmclnt_ops;
49 const struct cred *cred;
50 };
51
52
53
54
55
56 extern struct nlm_host *nlmclnt_init(const struct nlmclnt_initdata *nlm_init);
57 extern void nlmclnt_done(struct nlm_host *host);
58
59
60
61
62
63
64 struct nlmclnt_operations {
65
66
67 void (*nlmclnt_alloc_call)(void *);
68
69
70
71
72 bool (*nlmclnt_unlock_prepare)(struct rpc_task*, void *);
73
74
75 void (*nlmclnt_release_call)(void *);
76 };
77
78 extern int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl, void *data);
79 extern int lockd_up(struct net *net, const struct cred *cred);
80 extern void lockd_down(struct net *net);
81
82 #endif