xref: /onnv-gate/usr/src/uts/common/nfs/nfs_dispatch.h (revision 74:524df0e4e452)
1*74Srg137905 /*
2*74Srg137905  * CDDL HEADER START
3*74Srg137905  *
4*74Srg137905  * The contents of this file are subject to the terms of the
5*74Srg137905  * Common Development and Distribution License, Version 1.0 only
6*74Srg137905  * (the "License").  You may not use this file except in compliance
7*74Srg137905  * with the License.
8*74Srg137905  *
9*74Srg137905  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*74Srg137905  * or http://www.opensolaris.org/os/licensing.
11*74Srg137905  * See the License for the specific language governing permissions
12*74Srg137905  * and limitations under the License.
13*74Srg137905  *
14*74Srg137905  * When distributing Covered Code, include this CDDL HEADER in each
15*74Srg137905  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*74Srg137905  * If applicable, add the following below this CDDL HEADER, with the
17*74Srg137905  * fields enclosed by brackets "[]" replaced with your own identifying
18*74Srg137905  * information: Portions Copyright [yyyy] [name of copyright owner]
19*74Srg137905  *
20*74Srg137905  * CDDL HEADER END
21*74Srg137905  */
22*74Srg137905 
23*74Srg137905 /*
24*74Srg137905  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
25*74Srg137905  * Use is subject to license terms.
26*74Srg137905  */
27*74Srg137905 
28*74Srg137905 /*
29*74Srg137905  *	Copyright (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
30*74Srg137905  *	All rights reserved.
31*74Srg137905  *	Use is subject to license terms.
32*74Srg137905  */
33*74Srg137905 
34*74Srg137905 
35*74Srg137905 #ifndef _NFS_DISPATCH_H
36*74Srg137905 #define	_NFS_DISPATCH_H
37*74Srg137905 
38*74Srg137905 #pragma ident	"%Z%%M%	%I%	%E% SMI"
39*74Srg137905 
40*74Srg137905 #ifdef	__cplusplus
41*74Srg137905 extern "C" {
42*74Srg137905 #endif
43*74Srg137905 
44*74Srg137905 /*
45*74Srg137905  * RPC dispatch table
46*74Srg137905  * Indexed by version, proc
47*74Srg137905  */
48*74Srg137905 
49*74Srg137905 struct rpcdisp {
50*74Srg137905 	void	  (*dis_proc)();	/* proc to call */
51*74Srg137905 	xdrproc_t dis_xdrargs;		/* xdr routine to get args */
52*74Srg137905 	xdrproc_t dis_fastxdrargs;	/* `fast' xdr routine to get args */
53*74Srg137905 	int	  dis_argsz;		/* sizeof args */
54*74Srg137905 	xdrproc_t dis_xdrres;		/* xdr routine to put results */
55*74Srg137905 	xdrproc_t dis_fastxdrres;	/* `fast' xdr routine to put results */
56*74Srg137905 	int	  dis_ressz;		/* size of results */
57*74Srg137905 	void	  (*dis_resfree)();	/* frees space allocated by proc */
58*74Srg137905 	int	  dis_flags;		/* flags, see below */
59*74Srg137905 	fhandle_t *(*dis_getfh)();	/* returns the fhandle for the req */
60*74Srg137905 };
61*74Srg137905 
62*74Srg137905 #define	RPC_IDEMPOTENT	0x1	/* idempotent or not */
63*74Srg137905 /*
64*74Srg137905  * Be very careful about which NFS procedures get the RPC_ALLOWANON bit.
65*74Srg137905  * Right now, it this bit is on, we ignore the results of per NFS request
66*74Srg137905  * access control.
67*74Srg137905  */
68*74Srg137905 #define	RPC_ALLOWANON	0x2	/* allow anonymous access */
69*74Srg137905 #define	RPC_MAPRESP	0x4	/* use mapped response buffer */
70*74Srg137905 #define	RPC_AVOIDWORK	0x8	/* do work avoidance for dups */
71*74Srg137905 #define	RPC_PUBLICFH_OK	0x10	/* allow use of public filehandle */
72*74Srg137905 
73*74Srg137905 struct rpc_disptable {
74*74Srg137905 	int dis_nprocs;
75*74Srg137905 	char **dis_procnames;
76*74Srg137905 	kstat_named_t **dis_proccntp;
77*74Srg137905 	struct rpcdisp *dis_table;
78*74Srg137905 };
79*74Srg137905 
80*74Srg137905 void	rpc_null(caddr_t *, caddr_t *);
81*74Srg137905 
82*74Srg137905 #ifdef	__cplusplus
83*74Srg137905 }
84*74Srg137905 #endif
85*74Srg137905 
86*74Srg137905 #endif /* _NFS_DISPATCH_H */
87