1 4321 casper /* 2 4321 casper * CDDL HEADER START 3 4321 casper * 4 4321 casper * The contents of this file are subject to the terms of the 5 4321 casper * Common Development and Distribution License (the "License"). 6 4321 casper * You may not use this file except in compliance with the License. 7 4321 casper * 8 4321 casper * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 4321 casper * or http://www.opensolaris.org/os/licensing. 10 4321 casper * See the License for the specific language governing permissions 11 4321 casper * and limitations under the License. 12 4321 casper * 13 4321 casper * When distributing Covered Code, include this CDDL HEADER in each 14 4321 casper * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 4321 casper * If applicable, add the following below this CDDL HEADER, with the 16 4321 casper * fields enclosed by brackets "[]" replaced with your own identifying 17 4321 casper * information: Portions Copyright [yyyy] [name of copyright owner] 18 4321 casper * 19 4321 casper * CDDL HEADER END 20 4321 casper */ 21 4321 casper 22 4321 casper /* 23 11134 Casper * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 4321 casper * Use is subject to license terms. 25 4321 casper */ 26 4321 casper 27 4321 casper #ifndef _SVC_DG_PRIV_H 28 4321 casper #define _SVC_DG_PRIV_H 29 4321 casper 30 4321 casper /* 31 4321 casper * The svc_dg_data private datastructure shared by some services 32 4321 casper * for nefarious reasons. THIS IS NOT AN INTERFACE. DO NOT USE. 33 4321 casper */ 34 4321 casper 35 4321 casper #ifdef __cplusplus 36 4321 casper extern "C" { 37 4321 casper #endif 38 4321 casper 39 11134 Casper /* 40 11134 Casper * The size of the option header should include sufficient space for 41 11134 Casper * a ucred; we reserve 32 words as before we had ucreds and we allocate 42 11134 Casper * sizeof (svc_dg_data) + ucred_size(). Of course, opts must be declared 43 11134 Casper * last so it can use the additional memory. 44 11134 Casper */ 45 11134 Casper #define MAX_OPT_WORDS 32 46 4321 casper 47 4321 casper /* 48 4321 casper * kept in xprt->xp_p2 49 4321 casper */ 50 4321 casper struct svc_dg_data { 51 4321 casper /* Note: optbuf must be the first field, used by ti_opts.c code */ 52 4321 casper struct netbuf optbuf; /* netbuf for options */ 53 4321 casper uint_t su_iosz; /* size of send.recv buffer */ 54 4321 casper uint32_t su_xid; /* transaction id */ 55 4321 casper XDR su_xdrs; /* XDR handle */ 56 4321 casper char su_verfbody[MAX_AUTH_BYTES]; /* verifier body */ 57 4321 casper char *su_cache; /* cached data, NULL if none */ 58 4321 casper struct t_unitdata su_tudata; /* tu_data for recv */ 59 11134 Casper int opts[MAX_OPT_WORDS]; /* options: MUST BE LAST */ 60 4321 casper }; 61 4321 casper 62 4321 casper #define get_svc_dg_data(xprt) ((struct svc_dg_data *)((xprt)->xp_p2)) 63 4321 casper 64 4321 casper #ifdef __cplusplus 65 4321 casper } 66 4321 casper #endif 67 4321 casper 68 4321 casper #endif /* _SVC_DG_PRIV_H */ 69