0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef LINUX_LOCKD_BIND_H
0011 #define LINUX_LOCKD_BIND_H
0012
0013 #include <linux/lockd/nlm.h>
0014
0015 #include <linux/lockd/xdr.h>
0016 #ifdef CONFIG_LOCKD_V4
0017 #include <linux/lockd/xdr4.h>
0018 #endif
0019
0020
0021 struct svc_rqst;
0022 struct rpc_task;
0023
0024
0025
0026
0027 struct nlmsvc_binding {
0028 __be32 (*fopen)(struct svc_rqst *,
0029 struct nfs_fh *,
0030 struct file **,
0031 int mode);
0032 void (*fclose)(struct file *);
0033 };
0034
0035 extern const struct nlmsvc_binding *nlmsvc_ops;
0036
0037
0038
0039
0040
0041 struct nlmclnt_initdata {
0042 const char *hostname;
0043 const struct sockaddr *address;
0044 size_t addrlen;
0045 unsigned short protocol;
0046 u32 nfs_version;
0047 int noresvport;
0048 struct net *net;
0049 const struct nlmclnt_operations *nlmclnt_ops;
0050 const struct cred *cred;
0051 };
0052
0053
0054
0055
0056
0057 extern struct nlm_host *nlmclnt_init(const struct nlmclnt_initdata *nlm_init);
0058 extern void nlmclnt_done(struct nlm_host *host);
0059
0060
0061
0062
0063
0064
0065 struct nlmclnt_operations {
0066
0067
0068 void (*nlmclnt_alloc_call)(void *);
0069
0070
0071
0072
0073 bool (*nlmclnt_unlock_prepare)(struct rpc_task*, void *);
0074
0075
0076 void (*nlmclnt_release_call)(void *);
0077 };
0078
0079 extern int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl, void *data);
0080 extern int lockd_up(struct net *net, const struct cred *cred);
0081 extern void lockd_down(struct net *net);
0082
0083 #endif