Home | History | Annotate | Download | only in nfs
      1 /*
      2  * CDDL HEADER START
      3  *
      4  * The contents of this file are subject to the terms of the
      5  * Common Development and Distribution License (the "License").
      6  * You may not use this file except in compliance with the License.
      7  *
      8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9  * or http://www.opensolaris.org/os/licensing.
     10  * See the License for the specific language governing permissions
     11  * and limitations under the License.
     12  *
     13  * When distributing Covered Code, include this CDDL HEADER in each
     14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15  * If applicable, add the following below this CDDL HEADER, with the
     16  * fields enclosed by brackets "[]" replaced with your own identifying
     17  * information: Portions Copyright [yyyy] [name of copyright owner]
     18  *
     19  * CDDL HEADER END
     20  */
     21 /*
     22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
     23  * Use is subject to license terms.
     24  */
     25 
     26 #ifndef _DS_H
     27 #define	_DS_H
     28 
     29 #include <rpc/svc.h>
     30 
     31 #ifdef _KERNEL
     32 #include <nfs/nfs4_kprot.h>
     33 #else
     34 #include <rpcsvc/nfs41_prot.h>
     35 #endif
     36 
     37 #ifdef	__cplusplus
     38 extern "C" {
     39 #endif
     40 
     41 void ds_dispatch(struct svc_req *, SVCXPRT *xprt);
     42 
     43 /*
     44  * Protos for nfs4[1] XDR funcs which don't already
     45  * exist in nfs4[1]_xdr.c are extracted from the
     46  * header generated from rpcsvc/ds_nfs_com.x.  ds_nfs_com.h
     47  * isn't kept/used for building because it would redefine
     48  * several NFS4[1] types.  It is only generated to provide
     49  * xdr fn protos for NFS4[1] types defined in ds_nfs_com.x,
     50  * and these protos are placed in the dynamically generated
     51  * header ds_nfs_xdr.h.
     52  *
     53  * This trickery exists to allow for rpcgen to create all
     54  * XDR code for the control pcol.  The control pcol is problematic
     55  * because it uses some types defined by the NFS4[1] pcol, and
     56  * dedicated XDR encode/decode funcs do not exist for all
     57  * types defined by NFS4[1] -- especially the trivial types
     58  * (which are simply typedef'd scalars).  For these types,
     59  * the NFS4[1] XDR code invokes the XDR primitives directly
     60  * or does the XDR work inline.
     61  *
     62  * Since ds_prot.x no longer contains duplicate definitions
     63  * of the NFS4[1] types it needs, rpcgen will not create
     64  * all of the dedicated xdr encode/decode funcs for the
     65  * control pcol.  So, ds_nfs_com.x was created to hold definitions
     66  * for NFS4[1] types which do not have dedicated XDR encode/decode
     67  * funcs in nfs4[1]_xdr.c.  All NFS4[1] types referenced within
     68  * ds_prot.x which are not defined in ds_nfs_com.x must have
     69  * dedicated XDR encode/decode funcs in nfs4[1]_xdr.c because
     70  * rpcgen will generate fncalls for them within ds_xdr.c.
     71  */
     72 #include <nfs/ds_nfs_xdr.h>
     73 
     74 #ifdef	__cplusplus
     75 }
     76 #endif
     77 
     78 #include <nfs/ds_prot.h>
     79 #include <nfs/ds_filehandle.h>
     80 
     81 #endif /* _DS_H */
     82