xref: /onnv-gate/usr/src/head/rpcsvc/nlm_prot.x (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * CDDL HEADER START
3*0Sstevel@tonic-gate  *
4*0Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate  * with the License.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate  * and limitations under the License.
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate  *
20*0Sstevel@tonic-gate  * CDDL HEADER END
21*0Sstevel@tonic-gate  */
22*0Sstevel@tonic-gate /*
23*0Sstevel@tonic-gate  * Network lock manager protocol definition
24*0Sstevel@tonic-gate  * Copyright (C) 1986, 1992, 1993, 1997, 1999 by Sun Microsystems, Inc.
25*0Sstevel@tonic-gate  * All rights reserved.
26*0Sstevel@tonic-gate  *
27*0Sstevel@tonic-gate  * Protocol used between local lock manager and remote lock manager.
28*0Sstevel@tonic-gate  *
29*0Sstevel@tonic-gate  * There are currently 3 versions of the protocol in use.  Versions 1
30*0Sstevel@tonic-gate  * and 3 are used with NFS version 2.  Version 4 is used with NFS
31*0Sstevel@tonic-gate  * version 3.
32*0Sstevel@tonic-gate  *
33*0Sstevel@tonic-gate  * (Note: there is also a version 2, but it defines an orthogonal set of
34*0Sstevel@tonic-gate  * procedures that the status monitor uses to notify the lock manager of
35*0Sstevel@tonic-gate  * changes in monitored systems.)
36*0Sstevel@tonic-gate  */
37*0Sstevel@tonic-gate 
38*0Sstevel@tonic-gate %#pragma ident	"%Z%%M%	%I%	%E% SMI"
39*0Sstevel@tonic-gate 
40*0Sstevel@tonic-gate #if RPC_HDR
41*0Sstevel@tonic-gate %
42*0Sstevel@tonic-gate %#include <rpc/rpc_sztypes.h>
43*0Sstevel@tonic-gate %
44*0Sstevel@tonic-gate #endif
45*0Sstevel@tonic-gate 
46*0Sstevel@tonic-gate #ifdef RPC_HDR
47*0Sstevel@tonic-gate %#define LM_MAXSTRLEN	1024
48*0Sstevel@tonic-gate %#define LM_MAXNAMELEN	(LM_MAXSTRLEN + 1)
49*0Sstevel@tonic-gate #endif
50*0Sstevel@tonic-gate 
51*0Sstevel@tonic-gate /*
52*0Sstevel@tonic-gate  * Types for versions 1 and 3.
53*0Sstevel@tonic-gate  */
54*0Sstevel@tonic-gate 
55*0Sstevel@tonic-gate /*
56*0Sstevel@tonic-gate  * Status of a call to the lock manager.  The lower case enums violate the
57*0Sstevel@tonic-gate  * current style guide, but we're stuck with 'em.
58*0Sstevel@tonic-gate  */
59*0Sstevel@tonic-gate 
60*0Sstevel@tonic-gate enum nlm_stats {
61*0Sstevel@tonic-gate 	nlm_granted = 0,
62*0Sstevel@tonic-gate 	nlm_denied = 1,
63*0Sstevel@tonic-gate 	nlm_denied_nolocks = 2,
64*0Sstevel@tonic-gate 	nlm_blocked = 3,
65*0Sstevel@tonic-gate 	nlm_denied_grace_period = 4,
66*0Sstevel@tonic-gate 	nlm_deadlck = 5
67*0Sstevel@tonic-gate };
68*0Sstevel@tonic-gate 
69*0Sstevel@tonic-gate /*
70*0Sstevel@tonic-gate  * The holder of a conflicting lock.
71*0Sstevel@tonic-gate  */
72*0Sstevel@tonic-gate 
73*0Sstevel@tonic-gate struct nlm_holder {
74*0Sstevel@tonic-gate 	bool exclusive;
75*0Sstevel@tonic-gate 	int svid;
76*0Sstevel@tonic-gate 	netobj oh;
77*0Sstevel@tonic-gate 	unsigned l_offset;
78*0Sstevel@tonic-gate 	unsigned l_len;
79*0Sstevel@tonic-gate };
80*0Sstevel@tonic-gate 
81*0Sstevel@tonic-gate union nlm_testrply switch (nlm_stats stat) {
82*0Sstevel@tonic-gate 	case nlm_denied:
83*0Sstevel@tonic-gate 		struct nlm_holder holder;
84*0Sstevel@tonic-gate 	default:
85*0Sstevel@tonic-gate 		void;
86*0Sstevel@tonic-gate };
87*0Sstevel@tonic-gate 
88*0Sstevel@tonic-gate struct nlm_stat {
89*0Sstevel@tonic-gate 	nlm_stats stat;
90*0Sstevel@tonic-gate };
91*0Sstevel@tonic-gate 
92*0Sstevel@tonic-gate struct nlm_res {
93*0Sstevel@tonic-gate 	netobj cookie;
94*0Sstevel@tonic-gate 	nlm_stat stat;
95*0Sstevel@tonic-gate };
96*0Sstevel@tonic-gate 
97*0Sstevel@tonic-gate struct nlm_testres {
98*0Sstevel@tonic-gate 	netobj cookie;
99*0Sstevel@tonic-gate 	nlm_testrply stat;
100*0Sstevel@tonic-gate };
101*0Sstevel@tonic-gate 
102*0Sstevel@tonic-gate struct nlm_lock {
103*0Sstevel@tonic-gate 	string caller_name<LM_MAXSTRLEN>;
104*0Sstevel@tonic-gate 	netobj fh;		/* identify a file */
105*0Sstevel@tonic-gate 	netobj oh;		/* identify owner of a lock */
106*0Sstevel@tonic-gate 	int svid;		/* generated from pid for svid */
107*0Sstevel@tonic-gate 	unsigned l_offset;
108*0Sstevel@tonic-gate 	unsigned l_len;
109*0Sstevel@tonic-gate };
110*0Sstevel@tonic-gate 
111*0Sstevel@tonic-gate struct nlm_lockargs {
112*0Sstevel@tonic-gate 	netobj cookie;
113*0Sstevel@tonic-gate 	bool block;
114*0Sstevel@tonic-gate 	bool exclusive;
115*0Sstevel@tonic-gate 	struct nlm_lock alock;
116*0Sstevel@tonic-gate 	bool reclaim;		/* used for recovering locks */
117*0Sstevel@tonic-gate 	int state;		/* specify local status monitor state */
118*0Sstevel@tonic-gate };
119*0Sstevel@tonic-gate 
120*0Sstevel@tonic-gate struct nlm_cancargs {
121*0Sstevel@tonic-gate 	netobj cookie;
122*0Sstevel@tonic-gate 	bool block;
123*0Sstevel@tonic-gate 	bool exclusive;
124*0Sstevel@tonic-gate 	struct nlm_lock alock;
125*0Sstevel@tonic-gate };
126*0Sstevel@tonic-gate 
127*0Sstevel@tonic-gate struct nlm_testargs {
128*0Sstevel@tonic-gate 	netobj cookie;
129*0Sstevel@tonic-gate 	bool exclusive;
130*0Sstevel@tonic-gate 	struct nlm_lock alock;
131*0Sstevel@tonic-gate };
132*0Sstevel@tonic-gate 
133*0Sstevel@tonic-gate struct nlm_unlockargs {
134*0Sstevel@tonic-gate 	netobj cookie;
135*0Sstevel@tonic-gate 	struct nlm_lock alock;
136*0Sstevel@tonic-gate };
137*0Sstevel@tonic-gate 
138*0Sstevel@tonic-gate #ifdef RPC_HDR
139*0Sstevel@tonic-gate %/*
140*0Sstevel@tonic-gate % * The following enums are actually bit encoded for efficient
141*0Sstevel@tonic-gate % * boolean algebra.... DON'T change them.....
142*0Sstevel@tonic-gate % * The mixed-case enums violate the present style guide, but we're
143*0Sstevel@tonic-gate % * stuck with 'em.
144*0Sstevel@tonic-gate % */
145*0Sstevel@tonic-gate #endif
146*0Sstevel@tonic-gate 
147*0Sstevel@tonic-gate enum	fsh_mode {
148*0Sstevel@tonic-gate 	fsm_DN  = 0,	/* deny none */
149*0Sstevel@tonic-gate 	fsm_DR  = 1,	/* deny read */
150*0Sstevel@tonic-gate 	fsm_DW  = 2,	/* deny write */
151*0Sstevel@tonic-gate 	fsm_DRW = 3	/* deny read/write */
152*0Sstevel@tonic-gate };
153*0Sstevel@tonic-gate 
154*0Sstevel@tonic-gate enum	fsh_access {
155*0Sstevel@tonic-gate 	fsa_NONE = 0,	/* for completeness */
156*0Sstevel@tonic-gate 	fsa_R    = 1,	/* read only */
157*0Sstevel@tonic-gate 	fsa_W    = 2,	/* write only */
158*0Sstevel@tonic-gate 	fsa_RW   = 3	/* read/write */
159*0Sstevel@tonic-gate };
160*0Sstevel@tonic-gate 
161*0Sstevel@tonic-gate struct	nlm_share {
162*0Sstevel@tonic-gate 	string caller_name<LM_MAXSTRLEN>;
163*0Sstevel@tonic-gate 	netobj	fh;
164*0Sstevel@tonic-gate 	netobj	oh;
165*0Sstevel@tonic-gate 	fsh_mode	mode;
166*0Sstevel@tonic-gate 	fsh_access	access;
167*0Sstevel@tonic-gate };
168*0Sstevel@tonic-gate 
169*0Sstevel@tonic-gate struct	nlm_shareargs {
170*0Sstevel@tonic-gate 	netobj	cookie;
171*0Sstevel@tonic-gate 	nlm_share	share;
172*0Sstevel@tonic-gate 	bool	reclaim;
173*0Sstevel@tonic-gate };
174*0Sstevel@tonic-gate 
175*0Sstevel@tonic-gate struct	nlm_shareres {
176*0Sstevel@tonic-gate 	netobj	cookie;
177*0Sstevel@tonic-gate 	nlm_stats	stat;
178*0Sstevel@tonic-gate 	int	sequence;
179*0Sstevel@tonic-gate };
180*0Sstevel@tonic-gate 
181*0Sstevel@tonic-gate struct	nlm_notify {
182*0Sstevel@tonic-gate 	string name<LM_MAXNAMELEN>;
183*0Sstevel@tonic-gate 	int state;
184*0Sstevel@tonic-gate };
185*0Sstevel@tonic-gate 
186*0Sstevel@tonic-gate /*
187*0Sstevel@tonic-gate  * Types for version 4.
188*0Sstevel@tonic-gate  *
189*0Sstevel@tonic-gate  * This revision is designed to work with NFS V3.  The main changes from
190*0Sstevel@tonic-gate  * NFS V2 to V3 that affect the NLM protocol are that all file offsets
191*0Sstevel@tonic-gate  * and sizes are now unsigned 64-bit ints, and file handles are now
192*0Sstevel@tonic-gate  * variable length.  In NLM V1 and V3, the fixed-length V2 file handle
193*0Sstevel@tonic-gate  * was encoded as a 'netobj', which is a count followed by the data
194*0Sstevel@tonic-gate  * bytes.  For NLM 4, the file handle is already a count followed by
195*0Sstevel@tonic-gate  * data bytes, so the handle is copied directly into the netobj, rather
196*0Sstevel@tonic-gate  * than being encoded with an additional byte count.
197*0Sstevel@tonic-gate  */
198*0Sstevel@tonic-gate 
199*0Sstevel@tonic-gate /*
200*0Sstevel@tonic-gate  * Status of a call to the lock manager.
201*0Sstevel@tonic-gate  */
202*0Sstevel@tonic-gate 
203*0Sstevel@tonic-gate enum nlm4_stats {
204*0Sstevel@tonic-gate 	NLM4_GRANTED = 0,		/* lock was granted */
205*0Sstevel@tonic-gate 	NLM4_DENIED = 1,		/* lock was not granted, usually */
206*0Sstevel@tonic-gate 					/* due to conflicting lock */
207*0Sstevel@tonic-gate 	NLM4_DENIED_NOLOCKS = 2,	/* not granted: out of resources */
208*0Sstevel@tonic-gate 	NLM4_BLOCKED = 3,		/* not granted: expect callback */
209*0Sstevel@tonic-gate 					/* when granted */
210*0Sstevel@tonic-gate 	NLM4_DENIED_GRACE_PERIOD = 4,	/* not granted: server is */
211*0Sstevel@tonic-gate 					/* reestablishing old locks */
212*0Sstevel@tonic-gate 	NLM4_DEADLCK = 5,		/* not granted: deadlock detected */
213*0Sstevel@tonic-gate 	NLM4_ROFS = 6,			/* not granted: read-only filesystem */
214*0Sstevel@tonic-gate 	NLM4_STALE_FH = 7,		/* not granted: stale file handle */
215*0Sstevel@tonic-gate 	NLM4_FBIG = 8,			/* not granted: offset or length */
216*0Sstevel@tonic-gate 					/* too big */
217*0Sstevel@tonic-gate 	NLM4_FAILED = 9			/* not granted: some other error */
218*0Sstevel@tonic-gate };
219*0Sstevel@tonic-gate 
220*0Sstevel@tonic-gate /*
221*0Sstevel@tonic-gate  * The holder of a conflicting lock.
222*0Sstevel@tonic-gate  */
223*0Sstevel@tonic-gate 
224*0Sstevel@tonic-gate struct nlm4_holder {
225*0Sstevel@tonic-gate 	bool exclusive;
226*0Sstevel@tonic-gate 	int32 svid;
227*0Sstevel@tonic-gate 	netobj oh;
228*0Sstevel@tonic-gate 	uint64 l_offset;
229*0Sstevel@tonic-gate 	uint64 l_len;
230*0Sstevel@tonic-gate };
231*0Sstevel@tonic-gate 
232*0Sstevel@tonic-gate union nlm4_testrply switch (nlm4_stats stat) {
233*0Sstevel@tonic-gate 	case NLM4_DENIED:
234*0Sstevel@tonic-gate 		struct nlm4_holder holder;
235*0Sstevel@tonic-gate 	default:
236*0Sstevel@tonic-gate 		void;
237*0Sstevel@tonic-gate };
238*0Sstevel@tonic-gate 
239*0Sstevel@tonic-gate struct nlm4_stat {
240*0Sstevel@tonic-gate 	nlm4_stats stat;
241*0Sstevel@tonic-gate };
242*0Sstevel@tonic-gate 
243*0Sstevel@tonic-gate struct nlm4_res {
244*0Sstevel@tonic-gate 	netobj cookie;
245*0Sstevel@tonic-gate 	nlm4_stat stat;
246*0Sstevel@tonic-gate };
247*0Sstevel@tonic-gate 
248*0Sstevel@tonic-gate struct nlm4_testres {
249*0Sstevel@tonic-gate 	netobj cookie;
250*0Sstevel@tonic-gate 	nlm4_testrply stat;
251*0Sstevel@tonic-gate };
252*0Sstevel@tonic-gate 
253*0Sstevel@tonic-gate struct nlm4_lock {
254*0Sstevel@tonic-gate 	string caller_name<LM_MAXSTRLEN>;
255*0Sstevel@tonic-gate 	netobj fh;		/* identify a file */
256*0Sstevel@tonic-gate 	netobj oh;		/* identify owner of a lock */
257*0Sstevel@tonic-gate 	int32 svid;		/* generated from pid for svid */
258*0Sstevel@tonic-gate 	uint64 l_offset;
259*0Sstevel@tonic-gate 	uint64 l_len;
260*0Sstevel@tonic-gate };
261*0Sstevel@tonic-gate 
262*0Sstevel@tonic-gate struct nlm4_lockargs {
263*0Sstevel@tonic-gate 	netobj cookie;
264*0Sstevel@tonic-gate 	bool block;
265*0Sstevel@tonic-gate 	bool exclusive;
266*0Sstevel@tonic-gate 	struct nlm4_lock alock;
267*0Sstevel@tonic-gate 	bool reclaim;		/* used for recovering locks */
268*0Sstevel@tonic-gate 	int32 state;		/* specify local status monitor state */
269*0Sstevel@tonic-gate };
270*0Sstevel@tonic-gate 
271*0Sstevel@tonic-gate struct nlm4_cancargs {
272*0Sstevel@tonic-gate 	netobj cookie;
273*0Sstevel@tonic-gate 	bool block;
274*0Sstevel@tonic-gate 	bool exclusive;
275*0Sstevel@tonic-gate 	struct nlm4_lock alock;
276*0Sstevel@tonic-gate };
277*0Sstevel@tonic-gate 
278*0Sstevel@tonic-gate struct nlm4_testargs {
279*0Sstevel@tonic-gate 	netobj cookie;
280*0Sstevel@tonic-gate 	bool exclusive;
281*0Sstevel@tonic-gate 	struct nlm4_lock alock;
282*0Sstevel@tonic-gate };
283*0Sstevel@tonic-gate 
284*0Sstevel@tonic-gate struct nlm4_unlockargs {
285*0Sstevel@tonic-gate 	netobj cookie;
286*0Sstevel@tonic-gate 	struct nlm4_lock alock;
287*0Sstevel@tonic-gate };
288*0Sstevel@tonic-gate 
289*0Sstevel@tonic-gate #ifdef RPC_HDR
290*0Sstevel@tonic-gate %/*
291*0Sstevel@tonic-gate % * The following enums are actually bit encoded for efficient
292*0Sstevel@tonic-gate % * boolean algebra.... DON'T change them.....
293*0Sstevel@tonic-gate % */
294*0Sstevel@tonic-gate #endif
295*0Sstevel@tonic-gate 
296*0Sstevel@tonic-gate enum	fsh4_mode {
297*0Sstevel@tonic-gate 	FSM_DN  = 0,	/* deny none */
298*0Sstevel@tonic-gate 	FSM_DR  = 1,	/* deny read */
299*0Sstevel@tonic-gate 	FSM_DW  = 2,	/* deny write */
300*0Sstevel@tonic-gate 	FSM_DRW = 3	/* deny read/write */
301*0Sstevel@tonic-gate };
302*0Sstevel@tonic-gate 
303*0Sstevel@tonic-gate enum	fsh4_access {
304*0Sstevel@tonic-gate 	FSA_NONE = 0,	/* for completeness */
305*0Sstevel@tonic-gate 	FSA_R    = 1,	/* read only */
306*0Sstevel@tonic-gate 	FSA_W    = 2,	/* write only */
307*0Sstevel@tonic-gate 	FSA_RW   = 3	/* read/write */
308*0Sstevel@tonic-gate };
309*0Sstevel@tonic-gate 
310*0Sstevel@tonic-gate struct	nlm4_share {
311*0Sstevel@tonic-gate 	string caller_name<LM_MAXSTRLEN>;
312*0Sstevel@tonic-gate 	netobj	fh;
313*0Sstevel@tonic-gate 	netobj	oh;
314*0Sstevel@tonic-gate 	fsh4_mode	mode;
315*0Sstevel@tonic-gate 	fsh4_access	access;
316*0Sstevel@tonic-gate };
317*0Sstevel@tonic-gate 
318*0Sstevel@tonic-gate struct	nlm4_shareargs {
319*0Sstevel@tonic-gate 	netobj	cookie;
320*0Sstevel@tonic-gate 	nlm4_share	share;
321*0Sstevel@tonic-gate 	bool	reclaim;
322*0Sstevel@tonic-gate };
323*0Sstevel@tonic-gate 
324*0Sstevel@tonic-gate struct	nlm4_shareres {
325*0Sstevel@tonic-gate 	netobj	cookie;
326*0Sstevel@tonic-gate 	nlm4_stats	stat;
327*0Sstevel@tonic-gate 	int32	sequence;
328*0Sstevel@tonic-gate };
329*0Sstevel@tonic-gate 
330*0Sstevel@tonic-gate struct	nlm4_notify {
331*0Sstevel@tonic-gate 	string name<LM_MAXNAMELEN>;
332*0Sstevel@tonic-gate 	int32 state;
333*0Sstevel@tonic-gate };
334*0Sstevel@tonic-gate 
335*0Sstevel@tonic-gate /*
336*0Sstevel@tonic-gate  * Over-the-wire protocol used between the network lock managers
337*0Sstevel@tonic-gate  */
338*0Sstevel@tonic-gate 
339*0Sstevel@tonic-gate program NLM_PROG {
340*0Sstevel@tonic-gate 	version NLM_VERS {
341*0Sstevel@tonic-gate 
342*0Sstevel@tonic-gate 		nlm_testres
343*0Sstevel@tonic-gate 			NLM_TEST(nlm_testargs) =		1;
344*0Sstevel@tonic-gate 
345*0Sstevel@tonic-gate 		nlm_res
346*0Sstevel@tonic-gate 			NLM_LOCK(nlm_lockargs) =		2;
347*0Sstevel@tonic-gate 
348*0Sstevel@tonic-gate 		nlm_res
349*0Sstevel@tonic-gate 			NLM_CANCEL(nlm_cancargs) =		3;
350*0Sstevel@tonic-gate 
351*0Sstevel@tonic-gate 		nlm_res
352*0Sstevel@tonic-gate 			NLM_UNLOCK(nlm_unlockargs) =		4;
353*0Sstevel@tonic-gate 		/*
354*0Sstevel@tonic-gate 		 * remote lock manager call-back to grant lock
355*0Sstevel@tonic-gate 		 */
356*0Sstevel@tonic-gate 		nlm_res
357*0Sstevel@tonic-gate 			NLM_GRANTED(nlm_testargs) =		5;
358*0Sstevel@tonic-gate 
359*0Sstevel@tonic-gate 		/*
360*0Sstevel@tonic-gate 		 * message passing style of requesting lock
361*0Sstevel@tonic-gate 		 */
362*0Sstevel@tonic-gate 
363*0Sstevel@tonic-gate 		void
364*0Sstevel@tonic-gate 			NLM_TEST_MSG(nlm_testargs) =		6;
365*0Sstevel@tonic-gate 		void
366*0Sstevel@tonic-gate 			NLM_LOCK_MSG(nlm_lockargs) =		7;
367*0Sstevel@tonic-gate 		void
368*0Sstevel@tonic-gate 			NLM_CANCEL_MSG(nlm_cancargs) =		8;
369*0Sstevel@tonic-gate 		void
370*0Sstevel@tonic-gate 			NLM_UNLOCK_MSG(nlm_unlockargs) =	9;
371*0Sstevel@tonic-gate 		void
372*0Sstevel@tonic-gate 			NLM_GRANTED_MSG(nlm_testargs) =		10;
373*0Sstevel@tonic-gate 		void
374*0Sstevel@tonic-gate 			NLM_TEST_RES(nlm_testres) =		11;
375*0Sstevel@tonic-gate 		void
376*0Sstevel@tonic-gate 			NLM_LOCK_RES(nlm_res) =			12;
377*0Sstevel@tonic-gate 		void
378*0Sstevel@tonic-gate 			NLM_CANCEL_RES(nlm_res) =		13;
379*0Sstevel@tonic-gate 		void
380*0Sstevel@tonic-gate 			NLM_UNLOCK_RES(nlm_res) =		14;
381*0Sstevel@tonic-gate 		void
382*0Sstevel@tonic-gate 			NLM_GRANTED_RES(nlm_res) =		15;
383*0Sstevel@tonic-gate 	} = 1;
384*0Sstevel@tonic-gate 
385*0Sstevel@tonic-gate 	version NLM_VERSX {
386*0Sstevel@tonic-gate 		nlm_shareres
387*0Sstevel@tonic-gate 			NLM_SHARE(nlm_shareargs) =		20;
388*0Sstevel@tonic-gate 		nlm_shareres
389*0Sstevel@tonic-gate 			NLM_UNSHARE(nlm_shareargs) =		21;
390*0Sstevel@tonic-gate 		nlm_res
391*0Sstevel@tonic-gate 			NLM_NM_LOCK(nlm_lockargs) =		22;
392*0Sstevel@tonic-gate 		void
393*0Sstevel@tonic-gate 			NLM_FREE_ALL(nlm_notify) =		23;
394*0Sstevel@tonic-gate 	} = 3;
395*0Sstevel@tonic-gate 
396*0Sstevel@tonic-gate 	version NLM4_VERS {
397*0Sstevel@tonic-gate 		void
398*0Sstevel@tonic-gate 			NLMPROC4_NULL(void) =			0;
399*0Sstevel@tonic-gate 		nlm4_testres
400*0Sstevel@tonic-gate 			NLMPROC4_TEST(nlm4_testargs) =		1;
401*0Sstevel@tonic-gate 		nlm4_res
402*0Sstevel@tonic-gate 			NLMPROC4_LOCK(nlm4_lockargs) =		2;
403*0Sstevel@tonic-gate 		nlm4_res
404*0Sstevel@tonic-gate 			NLMPROC4_CANCEL(nlm4_cancargs) =	3;
405*0Sstevel@tonic-gate 		nlm4_res
406*0Sstevel@tonic-gate 			NLMPROC4_UNLOCK(nlm4_unlockargs) =	4;
407*0Sstevel@tonic-gate 		/*
408*0Sstevel@tonic-gate 		 * remote lock manager call-back to grant lock
409*0Sstevel@tonic-gate 		 */
410*0Sstevel@tonic-gate 		nlm4_res
411*0Sstevel@tonic-gate 			NLMPROC4_GRANTED(nlm4_testargs) =	5;
412*0Sstevel@tonic-gate 
413*0Sstevel@tonic-gate 		/*
414*0Sstevel@tonic-gate 		 * message passing style of requesting lock
415*0Sstevel@tonic-gate 		 */
416*0Sstevel@tonic-gate 
417*0Sstevel@tonic-gate 		void
418*0Sstevel@tonic-gate 			NLMPROC4_TEST_MSG(nlm4_testargs) =	6;
419*0Sstevel@tonic-gate 		void
420*0Sstevel@tonic-gate 			NLMPROC4_LOCK_MSG(nlm4_lockargs) =	7;
421*0Sstevel@tonic-gate 		void
422*0Sstevel@tonic-gate 			NLMPROC4_CANCEL_MSG(nlm4_cancargs) =	8;
423*0Sstevel@tonic-gate 		void
424*0Sstevel@tonic-gate 			NLMPROC4_UNLOCK_MSG(nlm4_unlockargs) =	9;
425*0Sstevel@tonic-gate 		void
426*0Sstevel@tonic-gate 			NLMPROC4_GRANTED_MSG(nlm4_testargs) =	10;
427*0Sstevel@tonic-gate 		void
428*0Sstevel@tonic-gate 			NLMPROC4_TEST_RES(nlm4_testres) =	11;
429*0Sstevel@tonic-gate 		void
430*0Sstevel@tonic-gate 			NLMPROC4_LOCK_RES(nlm4_res) =		12;
431*0Sstevel@tonic-gate 		void
432*0Sstevel@tonic-gate 			NLMPROC4_CANCEL_RES(nlm4_res) =		13;
433*0Sstevel@tonic-gate 		void
434*0Sstevel@tonic-gate 			NLMPROC4_UNLOCK_RES(nlm4_res) =		14;
435*0Sstevel@tonic-gate 		void
436*0Sstevel@tonic-gate 			NLMPROC4_GRANTED_RES(nlm4_res) =	15;
437*0Sstevel@tonic-gate 
438*0Sstevel@tonic-gate 		/*
439*0Sstevel@tonic-gate 		 * DOS-style file sharing
440*0Sstevel@tonic-gate 		 */
441*0Sstevel@tonic-gate 
442*0Sstevel@tonic-gate 		nlm4_shareres
443*0Sstevel@tonic-gate 			NLMPROC4_SHARE(nlm4_shareargs) =	20;
444*0Sstevel@tonic-gate 		nlm4_shareres
445*0Sstevel@tonic-gate 			NLMPROC4_UNSHARE(nlm4_shareargs) =	21;
446*0Sstevel@tonic-gate 		nlm4_res
447*0Sstevel@tonic-gate 			NLMPROC4_NM_LOCK(nlm4_lockargs) =	22;
448*0Sstevel@tonic-gate 		void
449*0Sstevel@tonic-gate 			NLMPROC4_FREE_ALL(nlm4_notify) =	23;
450*0Sstevel@tonic-gate 	} = 4;
451*0Sstevel@tonic-gate 
452*0Sstevel@tonic-gate } = 100021;
453