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
17 * status of a call to the lock manager
22 nlm_denied_nolocks = 2,
24 nlm_denied_grace_period = 4
35 union nlm_testrply switch (nlm_stats stat) {
37 struct nlm_holder holder;
57 string caller_name<LM_MAXSTRLEN>;
58 netobj fh; /* identify a file */
59 netobj oh; /* identify owner of a lock */
60 int svid; /* generated from pid for svid */
69 struct nlm_lock alock;
70 bool reclaim; /* used for recovering locks */
71 int state; /* specify local status monitor state */
78 struct nlm_lock alock;
84 struct nlm_lock alock;
87 struct nlm_unlockargs {
89 struct nlm_lock alock;
95 % * The following enums are actually bit encoded for efficient
96 % * boolean algebra.... DON'T change them.....
100 fsm_DN = 0, /* deny none */
101 fsm_DR = 1, /* deny read */
102 fsm_DW = 2, /* deny write */
103 fsm_DRW = 3 /* deny read/write */
107 fsa_NONE = 0, /* for completeness */
108 fsa_R = 1, /* read only */
109 fsa_W = 2, /* write only */
110 fsa_RW = 3 /* read/write */
114 string caller_name<LM_MAXSTRLEN>;
121 struct nlm_shareargs {
127 struct nlm_shareres {
134 string name<MAXNAMELEN>;
139 * Over-the-wire protocol used between the network lock managers
145 nlm_testres NLM_TEST(struct nlm_testargs) = 1;
147 nlm_res NLM_LOCK(struct nlm_lockargs) = 2;
149 nlm_res NLM_CANCEL(struct nlm_cancargs) = 3;
150 nlm_res NLM_UNLOCK(struct nlm_unlockargs) = 4;
153 * remote lock manager call-back to grant lock
155 nlm_res NLM_GRANTED(struct nlm_testargs)= 5;
157 * message passing style of requesting lock
159 void NLM_TEST_MSG(struct nlm_testargs) = 6;
160 void NLM_LOCK_MSG(struct nlm_lockargs) = 7;
161 void NLM_CANCEL_MSG(struct nlm_cancargs) =8;
162 void NLM_UNLOCK_MSG(struct nlm_unlockargs) = 9;
163 void NLM_GRANTED_MSG(struct nlm_testargs) = 10;
164 void NLM_TEST_RES(nlm_testres) = 11;
165 void NLM_LOCK_RES(nlm_res) = 12;
166 void NLM_CANCEL_RES(nlm_res) = 13;
167 void NLM_UNLOCK_RES(nlm_res) = 14;
168 void NLM_GRANTED_RES(nlm_res) = 15;
172 nlm_shareres NLM_SHARE(nlm_shareargs) = 20;
173 nlm_shareres NLM_UNSHARE(nlm_shareargs) = 21;
174 nlm_res NLM_NM_LOCK(nlm_lockargs) = 22;
175 void NLM_FREE_ALL(nlm_notify) = 23;