bind.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. #ifndef LINUX_LOCKD_BIND_H
  9. #define LINUX_LOCKD_BIND_H
  10. #include <linux/lockd/nlm.h>
  11. /* need xdr-encoded error codes too, so... */
  12. #include <linux/lockd/xdr.h>
  13. #ifdef CONFIG_LOCKD_V4
  14. #include <linux/lockd/xdr4.h>
  15. #endif
  16. /* Dummy declarations */
  17. struct svc_rqst;
  18. /*
  19. * This is the set of functions for lockd->nfsd communication
  20. */
  21. struct nlmsvc_binding {
  22. __be32 (*fopen)(struct svc_rqst *,
  23. struct nfs_fh *,
  24. struct file **);
  25. void (*fclose)(struct file *);
  26. };
  27. extern struct nlmsvc_binding * nlmsvc_ops;
  28. /*
  29. * Similar to nfs_client_initdata, but without the NFS-specific
  30. * rpc_ops field.
  31. */
  32. struct nlmclnt_initdata {
  33. const char *hostname;
  34. const struct sockaddr *address;
  35. size_t addrlen;
  36. unsigned short protocol;
  37. u32 nfs_version;
  38. int noresvport;
  39. struct net *net;
  40. };
  41. /*
  42. * Functions exported by the lockd module
  43. */
  44. extern struct nlm_host *nlmclnt_init(const struct nlmclnt_initdata *nlm_init);
  45. extern void nlmclnt_done(struct nlm_host *host);
  46. extern int nlmclnt_proc(struct nlm_host *host, int cmd,
  47. struct file_lock *fl);
  48. extern int lockd_up(struct net *net);
  49. extern void lockd_down(struct net *net);
  50. #endif /* LINUX_LOCKD_BIND_H */