bind.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. };
  39. /*
  40. * Functions exported by the lockd module
  41. */
  42. extern struct nlm_host *nlmclnt_init(const struct nlmclnt_initdata *nlm_init);
  43. extern void nlmclnt_done(struct nlm_host *host);
  44. extern int nlmclnt_proc(struct nlm_host *host, int cmd,
  45. struct file_lock *fl);
  46. extern int lockd_up(void);
  47. extern void lockd_down(void);
  48. #endif /* LINUX_LOCKD_BIND_H */