xref: /reactos/dll/3rdparty/libtirpc/tirpc/rpc/svc_dg.h (revision c2c66aff)
1*c2c66affSColin Finck /*	$NetBSD: svc_dg.h,v 1.1 2000/06/02 23:11:16 fvdl Exp $	*/
2*c2c66affSColin Finck /*	$FreeBSD: src/include/rpc/svc_dg.h,v 1.1 2001/03/19 12:49:47 alfred Exp $ */
3*c2c66affSColin Finck 
4*c2c66affSColin Finck /*
5*c2c66affSColin Finck  * Copyright (c) 2009, Sun Microsystems, Inc.
6*c2c66affSColin Finck  * All rights reserved.
7*c2c66affSColin Finck  *
8*c2c66affSColin Finck  * Redistribution and use in source and binary forms, with or without
9*c2c66affSColin Finck  * modification, are permitted provided that the following conditions are met:
10*c2c66affSColin Finck  * - Redistributions of source code must retain the above copyright notice,
11*c2c66affSColin Finck  *   this list of conditions and the following disclaimer.
12*c2c66affSColin Finck  * - Redistributions in binary form must reproduce the above copyright notice,
13*c2c66affSColin Finck  *   this list of conditions and the following disclaimer in the documentation
14*c2c66affSColin Finck  *   and/or other materials provided with the distribution.
15*c2c66affSColin Finck  * - Neither the name of Sun Microsystems, Inc. nor the names of its
16*c2c66affSColin Finck  *   contributors may be used to endorse or promote products derived
17*c2c66affSColin Finck  *   from this software without specific prior written permission.
18*c2c66affSColin Finck  *
19*c2c66affSColin Finck  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20*c2c66affSColin Finck  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21*c2c66affSColin Finck  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22*c2c66affSColin Finck  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23*c2c66affSColin Finck  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24*c2c66affSColin Finck  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25*c2c66affSColin Finck  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26*c2c66affSColin Finck  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27*c2c66affSColin Finck  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28*c2c66affSColin Finck  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29*c2c66affSColin Finck  * POSSIBILITY OF SUCH DAMAGE.
30*c2c66affSColin Finck  */
31*c2c66affSColin Finck 
32*c2c66affSColin Finck /*
33*c2c66affSColin Finck  * XXX - this file exists only so that the rpcbind code can pull it in.
34*c2c66affSColin Finck  * This should go away. It should only be include by svc_dg.c and
35*c2c66affSColin Finck  * rpcb_svc_com.c in the rpcbind code.
36*c2c66affSColin Finck  */
37*c2c66affSColin Finck 
38*c2c66affSColin Finck /*
39*c2c66affSColin Finck  * kept in xprt->xp_p2
40*c2c66affSColin Finck  */
41*c2c66affSColin Finck struct svc_dg_data {
42*c2c66affSColin Finck 	/* XXX: optbuf should be the first field, used by ti_opts.c code */
43*c2c66affSColin Finck 	size_t		su_iosz;		/* size of send.recv buffer */
44*c2c66affSColin Finck 	u_int32_t	su_xid;			/* transaction id */
45*c2c66affSColin Finck 	XDR		su_xdrs;			/* XDR handle */
46*c2c66affSColin Finck 	char		su_verfbody[MAX_AUTH_BYTES];	/* verifier body */
47*c2c66affSColin Finck 	void		*su_cache;		/* cached data, NULL if none */
48*c2c66affSColin Finck };
49*c2c66affSColin Finck 
50*c2c66affSColin Finck #define __rpcb_get_dg_xidp(x)	(&((struct svc_dg_data *)(x)->xp_p2)->su_xid)
51