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