1193323Sed/*	$NetBSD: svc_dg.h,v 1.1 2000/06/02 23:11:16 fvdl Exp $	*/
2193323Sed/*	$FreeBSD$ */
3193323Sed
4193323Sed/*-
5193323Sed * Copyright (c) 2009, Sun Microsystems, Inc.
6193323Sed * All rights reserved.
7193323Sed *
8193323Sed * Redistribution and use in source and binary forms, with or without
9193323Sed * modification, are permitted provided that the following conditions are met:
10193323Sed * - Redistributions of source code must retain the above copyright notice,
11193323Sed *   this list of conditions and the following disclaimer.
12193323Sed * - Redistributions in binary form must reproduce the above copyright notice,
13193323Sed *   this list of conditions and the following disclaimer in the documentation
14193323Sed *   and/or other materials provided with the distribution.
15193323Sed * - Neither the name of Sun Microsystems, Inc. nor the names of its
16243830Sdim *   contributors may be used to endorse or promote products derived
17226633Sdim *   from this software without specific prior written permission.
18239462Sdim *
19239462Sdim * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20193323Sed * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21193323Sed * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22239462Sdim * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23239462Sdim * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24239462Sdim * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25239462Sdim * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26239462Sdim * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27239462Sdim * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28239462Sdim * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29239462Sdim * POSSIBILITY OF SUCH DAMAGE.
30239462Sdim */
31239462Sdim/*
32239462Sdim * XXX - this file exists only so that the rpcbind code can pull it in.
33239462Sdim * This should go away. It should only be include by svc_dg.c and
34239462Sdim * rpcb_svc_com.c in the rpcbind code.
35239462Sdim */
36239462Sdim
37195340Sed/*
38193323Sed * kept in xprt->xp_p2
39193323Sed */
40193323Sedstruct svc_dg_data {
41193323Sed	/* XXX: optbuf should be the first field, used by ti_opts.c code */
42193323Sed	size_t		su_iosz;		/* size of send.recv buffer */
43193323Sed	u_int32_t	su_xid;			/* transaction id */
44193323Sed	XDR		su_xdrs;			/* XDR handle */
45218893Sdim	char		su_verfbody[MAX_AUTH_BYTES];	/* verifier body */
46193323Sed	void		*su_cache;		/* cached data, NULL if none */
47218893Sdim	struct netbuf   su_srcaddr;		/* dst address of last msg */
48193323Sed};
49193323Sed
50193323Sed#define __rpcb_get_dg_xidp(x)	(&((struct svc_dg_data *)(x)->xp_p2)->su_xid)
51193323Sed