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