1/*	$NetBSD: lockd_lock.h,v 1.2 2000/06/09 14:00:54 fvdl Exp $	*/
2
3/* Headers and function declarations for file-locking utilities */
4
5struct nlm4_holder *	testlock(struct nlm4_lock *lock, bool_t exclusive,
6    int flags);
7enum nlm_stats	getlock(nlm4_lockargs *lckarg, struct svc_req *rqstp,
8    const int flags);
9enum nlm_stats	unlock(nlm4_lock *lock, const int flags);
10int	lock_answer(int pid, netobj *netcookie, int result, int *pid_p,
11    int version);
12
13void notify(const char *hostname, const int state);
14
15/* flags for testlock, getlock & unlock */
16#define LOCK_ASYNC	0x01 /* async version (getlock only) */
17#define LOCK_V4 	0x02 /* v4 version */
18#define LOCK_MON 	0x04 /* monitored lock (getlock only) */
19#define LOCK_CANCEL 0x08 /* cancel, not unlock request (unlock only) */
20
21/* callbacks from lock_proc.c */
22void	transmit_result(int, nlm_res *, struct sockaddr *);
23void	transmit4_result(int, nlm4_res *, struct sockaddr *);
24CLIENT  *get_client(struct sockaddr *, rpcvers_t);
25