~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/lockd/bind.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * linux/include/linux/lockd/bind.h
  4  *
  5  * This is the part of lockd visible to nfsd and the nfs client.
  6  *
  7  * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
  8  */
  9 
 10 #ifndef LINUX_LOCKD_BIND_H
 11 #define LINUX_LOCKD_BIND_H
 12 
 13 #include <linux/lockd/nlm.h>
 14 /* need xdr-encoded error codes too, so... */
 15 #include <linux/lockd/xdr.h>
 16 #ifdef CONFIG_LOCKD_V4
 17 #include <linux/lockd/xdr4.h>
 18 #endif
 19 
 20 /* Dummy declarations */
 21 struct svc_rqst;
 22 struct rpc_task;
 23 struct rpc_clnt;
 24 
 25 /*
 26  * This is the set of functions for lockd->nfsd communication
 27  */
 28 struct nlmsvc_binding {
 29         __be32                  (*fopen)(struct svc_rqst *,
 30                                                 struct nfs_fh *,
 31                                                 struct file **,
 32                                                 int mode);
 33         void                    (*fclose)(struct file *);
 34 };
 35 
 36 extern const struct nlmsvc_binding *nlmsvc_ops;
 37 
 38 /*
 39  * Similar to nfs_client_initdata, but without the NFS-specific
 40  * rpc_ops field.
 41  */
 42 struct nlmclnt_initdata {
 43         const char              *hostname;
 44         const struct sockaddr   *address;
 45         size_t                  addrlen;
 46         unsigned short          protocol;
 47         u32                     nfs_version;
 48         int                     noresvport;
 49         struct net              *net;
 50         const struct nlmclnt_operations *nlmclnt_ops;
 51         const struct cred       *cred;
 52 };
 53 
 54 /*
 55  * Functions exported by the lockd module
 56  */
 57 
 58 extern struct nlm_host *nlmclnt_init(const struct nlmclnt_initdata *nlm_init);
 59 extern void     nlmclnt_done(struct nlm_host *host);
 60 extern struct rpc_clnt *nlmclnt_rpc_clnt(struct nlm_host *host);
 61 
 62 /*
 63  * NLM client operations provide a means to modify RPC processing of NLM
 64  * requests.  Callbacks receive a pointer to data passed into the call to
 65  * nlmclnt_proc().
 66  */
 67 struct nlmclnt_operations {
 68         /* Called on successful allocation of nlm_rqst, use for allocation or
 69          * reference counting. */
 70         void (*nlmclnt_alloc_call)(void *);
 71 
 72         /* Called in rpc_task_prepare for unlock.  A return value of true
 73          * indicates the callback has put the task to sleep on a waitqueue
 74          * and NLM should not call rpc_call_start(). */
 75         bool (*nlmclnt_unlock_prepare)(struct rpc_task*, void *);
 76 
 77         /* Called when the nlm_rqst is freed, callbacks should clean up here */
 78         void (*nlmclnt_release_call)(void *);
 79 };
 80 
 81 extern int      nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl, void *data);
 82 extern int      lockd_up(struct net *net, const struct cred *cred);
 83 extern void     lockd_down(struct net *net);
 84 
 85 #endif /* LINUX_LOCKD_BIND_H */
 86 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php