1 /* @(#)nlm_prot.x 2.1 88/08/01 4.0 RPCSRC */
2 /* @(#)nlm_prot.x 1.8 87/09/21 Copyr 1987 Sun Micro */
5 * Network lock manager protocol definition
6 * Copyright (C) 1986 Sun Microsystems, Inc.
8 * protocol used between local lock manager and remote lock manager
12 %#define LM_MAXSTRLEN 1024
13 %#define MAXNAMELEN LM_MAXSTRLEN+1
16 %static const char rcsid[] =
18 %#endif /* not lint */
22 * status of a call to the lock manager
27 nlm_denied_nolocks = 2,
29 nlm_denied_grace_period = 4
40 union nlm_testrply switch (nlm_stats stat) {
42 struct nlm_holder holder;
62 string caller_name<LM_MAXSTRLEN>;
63 netobj fh; /* identify a file */
64 netobj oh; /* identify owner of a lock */
65 int svid; /* generated from pid for svid */
74 struct nlm_lock alock;
75 bool reclaim; /* used for recovering locks */
76 int state; /* specify local status monitor state */
83 struct nlm_lock alock;
89 struct nlm_lock alock;
92 struct nlm_unlockargs {
94 struct nlm_lock alock;
100 % * The following enums are actually bit encoded for efficient
101 % * boolean algebra.... DON'T change them.....
105 fsm_DN = 0, /* deny none */
106 fsm_DR = 1, /* deny read */
107 fsm_DW = 2, /* deny write */
108 fsm_DRW = 3 /* deny read/write */
112 fsa_NONE = 0, /* for completeness */
113 fsa_R = 1, /* read only */
114 fsa_W = 2, /* write only */
115 fsa_RW = 3 /* read/write */
119 string caller_name<LM_MAXSTRLEN>;
126 struct nlm_shareargs {
132 struct nlm_shareres {
139 string name<MAXNAMELEN>;
144 * Over-the-wire protocol used between the network lock managers
150 nlm_testres NLM_TEST(struct nlm_testargs) = 1;
152 nlm_res NLM_LOCK(struct nlm_lockargs) = 2;
154 nlm_res NLM_CANCEL(struct nlm_cancargs) = 3;
155 nlm_res NLM_UNLOCK(struct nlm_unlockargs) = 4;
158 * remote lock manager call-back to grant lock
160 nlm_res NLM_GRANTED(struct nlm_testargs)= 5;
162 * message passing style of requesting lock
164 void NLM_TEST_MSG(struct nlm_testargs) = 6;
165 void NLM_LOCK_MSG(struct nlm_lockargs) = 7;
166 void NLM_CANCEL_MSG(struct nlm_cancargs) =8;
167 void NLM_UNLOCK_MSG(struct nlm_unlockargs) = 9;
168 void NLM_GRANTED_MSG(struct nlm_testargs) = 10;
169 void NLM_TEST_RES(nlm_testres) = 11;
170 void NLM_LOCK_RES(nlm_res) = 12;
171 void NLM_CANCEL_RES(nlm_res) = 13;
172 void NLM_UNLOCK_RES(nlm_res) = 14;
173 void NLM_GRANTED_RES(nlm_res) = 15;
177 nlm_shareres NLM_SHARE(nlm_shareargs) = 20;
178 nlm_shareres NLM_UNSHARE(nlm_shareargs) = 21;
179 nlm_res NLM_NM_LOCK(nlm_lockargs) = 22;
180 void NLM_FREE_ALL(nlm_notify) = 23;