usr/src/uts/common/nfs/nfs_dispatch.h
changeset 1610 3436e82414c8
parent 74 524df0e4e452
equal deleted inserted replaced
1609:849e31419354 1610:3436e82414c8
     1 /*
     1 /*
     2  * CDDL HEADER START
     2  * CDDL HEADER START
     3  *
     3  *
     4  * The contents of this file are subject to the terms of the
     4  * The contents of this file are subject to the terms of the
     5  * Common Development and Distribution License, Version 1.0 only
     5  * Common Development and Distribution License (the "License").
     6  * (the "License").  You may not use this file except in compliance
     6  * You may not use this file except in compliance with the License.
     7  * with the License.
       
     8  *
     7  *
     9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
     8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
    10  * or http://www.opensolaris.org/os/licensing.
     9  * or http://www.opensolaris.org/os/licensing.
    11  * See the License for the specific language governing permissions
    10  * See the License for the specific language governing permissions
    12  * and limitations under the License.
    11  * and limitations under the License.
    19  *
    18  *
    20  * CDDL HEADER END
    19  * CDDL HEADER END
    21  */
    20  */
    22 
    21 
    23 /*
    22 /*
    24  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
    23  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
    25  * Use is subject to license terms.
    24  * Use is subject to license terms.
    26  */
    25  */
    27 
    26 
    28 /*
    27 /*
    29  *	Copyright (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
    28  *	Copyright (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
    44 /*
    43 /*
    45  * RPC dispatch table
    44  * RPC dispatch table
    46  * Indexed by version, proc
    45  * Indexed by version, proc
    47  */
    46  */
    48 
    47 
    49 struct rpcdisp {
    48 typedef struct rpcdisp {
    50 	void	  (*dis_proc)();	/* proc to call */
    49 	void	  (*dis_proc)();	/* proc to call */
    51 	xdrproc_t dis_xdrargs;		/* xdr routine to get args */
    50 	xdrproc_t dis_xdrargs;		/* xdr routine to get args */
    52 	xdrproc_t dis_fastxdrargs;	/* `fast' xdr routine to get args */
    51 	xdrproc_t dis_fastxdrargs;	/* `fast' xdr routine to get args */
    53 	int	  dis_argsz;		/* sizeof args */
    52 	int	  dis_argsz;		/* sizeof args */
    54 	xdrproc_t dis_xdrres;		/* xdr routine to put results */
    53 	xdrproc_t dis_xdrres;		/* xdr routine to put results */
    55 	xdrproc_t dis_fastxdrres;	/* `fast' xdr routine to put results */
    54 	xdrproc_t dis_fastxdrres;	/* `fast' xdr routine to put results */
    56 	int	  dis_ressz;		/* size of results */
    55 	int	  dis_ressz;		/* size of results */
    57 	void	  (*dis_resfree)();	/* frees space allocated by proc */
    56 	void	  (*dis_resfree)();	/* frees space allocated by proc */
    58 	int	  dis_flags;		/* flags, see below */
    57 	int	  dis_flags;		/* flags, see below */
    59 	fhandle_t *(*dis_getfh)();	/* returns the fhandle for the req */
    58 	void	  *(*dis_getfh)();	/* returns the fhandle for the req */
    60 };
    59 } rpcdisp_t;
    61 
    60 
    62 #define	RPC_IDEMPOTENT	0x1	/* idempotent or not */
    61 #define	RPC_IDEMPOTENT	0x1	/* idempotent or not */
    63 /*
    62 /*
    64  * Be very careful about which NFS procedures get the RPC_ALLOWANON bit.
    63  * Be very careful about which NFS procedures get the RPC_ALLOWANON bit.
    65  * Right now, it this bit is on, we ignore the results of per NFS request
    64  * Right now, it this bit is on, we ignore the results of per NFS request
    68 #define	RPC_ALLOWANON	0x2	/* allow anonymous access */
    67 #define	RPC_ALLOWANON	0x2	/* allow anonymous access */
    69 #define	RPC_MAPRESP	0x4	/* use mapped response buffer */
    68 #define	RPC_MAPRESP	0x4	/* use mapped response buffer */
    70 #define	RPC_AVOIDWORK	0x8	/* do work avoidance for dups */
    69 #define	RPC_AVOIDWORK	0x8	/* do work avoidance for dups */
    71 #define	RPC_PUBLICFH_OK	0x10	/* allow use of public filehandle */
    70 #define	RPC_PUBLICFH_OK	0x10	/* allow use of public filehandle */
    72 
    71 
    73 struct rpc_disptable {
    72 typedef struct rpc_disptable {
    74 	int dis_nprocs;
    73 	int dis_nprocs;
    75 	char **dis_procnames;
    74 	char **dis_procnames;
    76 	kstat_named_t **dis_proccntp;
    75 	kstat_named_t **dis_proccntp;
    77 	struct rpcdisp *dis_table;
    76 	struct rpcdisp *dis_table;
    78 };
    77 } rpc_disptable_t;
    79 
    78 
    80 void	rpc_null(caddr_t *, caddr_t *);
    79 void	rpc_null(caddr_t *, caddr_t *);
    81 
    80 
    82 #ifdef	__cplusplus
    81 #ifdef	__cplusplus
    83 }
    82 }