174462Salfred/*	$NetBSD: svc_dg.h,v 1.1 2000/06/02 23:11:16 fvdl Exp $	*/
274462Salfred/*	$FreeBSD$ */
374462Salfred
4261046Smav/*-
5261046Smav * Copyright (c) 2009, Sun Microsystems, Inc.
6261046Smav * All rights reserved.
7261046Smav *
8261046Smav * Redistribution and use in source and binary forms, with or without
9261046Smav * modification, are permitted provided that the following conditions are met:
10261046Smav * - Redistributions of source code must retain the above copyright notice,
11261046Smav *   this list of conditions and the following disclaimer.
12261046Smav * - Redistributions in binary form must reproduce the above copyright notice,
13261046Smav *   this list of conditions and the following disclaimer in the documentation
14261046Smav *   and/or other materials provided with the distribution.
15261046Smav * - Neither the name of Sun Microsystems, Inc. nor the names of its
16261046Smav *   contributors may be used to endorse or promote products derived
17261046Smav *   from this software without specific prior written permission.
18261046Smav *
19261046Smav * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20261046Smav * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21261046Smav * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22261046Smav * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23261046Smav * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24261046Smav * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25261046Smav * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26261046Smav * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27261046Smav * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28261046Smav * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29261046Smav * POSSIBILITY OF SUCH DAMAGE.
3074462Salfred */
3174462Salfred/*
3274462Salfred * XXX - this file exists only so that the rpcbind code can pull it in.
3374462Salfred * This should go away. It should only be include by svc_dg.c and
3474462Salfred * rpcb_svc_com.c in the rpcbind code.
3574462Salfred */
3674462Salfred
3774462Salfred/*
3874462Salfred * kept in xprt->xp_p2
3974462Salfred */
4074462Salfredstruct svc_dg_data {
4174462Salfred	/* XXX: optbuf should be the first field, used by ti_opts.c code */
4274462Salfred	size_t		su_iosz;		/* size of send.recv buffer */
4374462Salfred	u_int32_t	su_xid;			/* transaction id */
4474462Salfred	XDR		su_xdrs;			/* XDR handle */
4574462Salfred	char		su_verfbody[MAX_AUTH_BYTES];	/* verifier body */
4674462Salfred	void		*su_cache;		/* cached data, NULL if none */
47194448Skan	struct netbuf   su_srcaddr;		/* dst address of last msg */
4874462Salfred};
4974462Salfred
5074462Salfred#define __rpcb_get_dg_xidp(x)	(&((struct svc_dg_data *)(x)->xp_p2)->su_xid)
51