]> git.saurik.com Git - apple/network_cmds.git/blame - rpc_lockd.tproj/lockd_lock.h
network_cmds-176.tar.gz
[apple/network_cmds.git] / rpc_lockd.tproj / lockd_lock.h
CommitLineData
ac2f15b3
A
1/* $NetBSD: lockd_lock.h,v 1.2 2000/06/09 14:00:54 fvdl Exp $ */
2/* $FreeBSD: src/usr.sbin/rpc.lockd/lockd_lock.h,v 1.4 2002/03/21 22:52:45 alfred Exp $ */
3
4/* Headers and function declarations for file-locking utilities */
5
6struct nlm4_holder * testlock(struct nlm4_lock *lock, bool_t exclusive, int flags);
7enum nlm_stats getlock(nlm4_lockargs *lckarg, struct svc_req *rqstp, const int flags);
8enum nlm_stats unlock(nlm4_lock *lock, const int flags);
9int lock_answer(int pid, netobj *netcookie, int result, int version,
10 int *pid_p, off_t l_start, off_t l_len);
11enum nlm_stats getshare(nlm_shareargs *shrarg, struct svc_req *rqstp, const int flags);
12enum nlm_stats unshare(nlm_shareargs *shrarg, struct svc_req *rqstp);
13void do_free_all(const char *hostname);
14
15void notify(const char *hostname, const int state);
16
17/* flags for testlock, getlock & unlock */
18#define LOCK_ASYNC 0x01 /* async version (getlock only) */
19#define LOCK_V4 0x02 /* v4 version */
20#define LOCK_MON 0x04 /* monitored lock (getlock only) */
21#define LOCK_CANCEL 0x08 /* cancel, not unlock request (unlock only) */
22
23/* callbacks from lock_proc.c */
24void transmit_result(int, nlm_res *, struct sockaddr *);
25void transmit4_result(int, nlm4_res *, struct sockaddr *);
26CLIENT *get_client(struct sockaddr *, rpcvers_t);