18360efbdSAlfred Perlstein /* $NetBSD: svc_dg.h,v 1.1 2000/06/02 23:11:16 fvdl Exp $ */ 28360efbdSAlfred Perlstein /* $FreeBSD$ */ 38360efbdSAlfred Perlstein 42e322d37SHiroki Sato /*- 5*2321c474SPedro F. Giffuni * SPDX-License-Identifier: BSD-3-Clause 6*2321c474SPedro F. Giffuni * 72e322d37SHiroki Sato * Copyright (c) 2009, Sun Microsystems, Inc. 82e322d37SHiroki Sato * All rights reserved. 98360efbdSAlfred Perlstein * 102e322d37SHiroki Sato * Redistribution and use in source and binary forms, with or without 112e322d37SHiroki Sato * modification, are permitted provided that the following conditions are met: 122e322d37SHiroki Sato * - Redistributions of source code must retain the above copyright notice, 132e322d37SHiroki Sato * this list of conditions and the following disclaimer. 142e322d37SHiroki Sato * - Redistributions in binary form must reproduce the above copyright notice, 152e322d37SHiroki Sato * this list of conditions and the following disclaimer in the documentation 162e322d37SHiroki Sato * and/or other materials provided with the distribution. 172e322d37SHiroki Sato * - Neither the name of Sun Microsystems, Inc. nor the names of its 182e322d37SHiroki Sato * contributors may be used to endorse or promote products derived 192e322d37SHiroki Sato * from this software without specific prior written permission. 208360efbdSAlfred Perlstein * 212e322d37SHiroki Sato * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 222e322d37SHiroki Sato * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 232e322d37SHiroki Sato * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 242e322d37SHiroki Sato * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 252e322d37SHiroki Sato * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 262e322d37SHiroki Sato * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 272e322d37SHiroki Sato * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 282e322d37SHiroki Sato * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 292e322d37SHiroki Sato * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 302e322d37SHiroki Sato * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 312e322d37SHiroki Sato * POSSIBILITY OF SUCH DAMAGE. 328360efbdSAlfred Perlstein */ 338360efbdSAlfred Perlstein /* 348360efbdSAlfred Perlstein * XXX - this file exists only so that the rpcbind code can pull it in. 358360efbdSAlfred Perlstein * This should go away. It should only be include by svc_dg.c and 368360efbdSAlfred Perlstein * rpcb_svc_com.c in the rpcbind code. 378360efbdSAlfred Perlstein */ 388360efbdSAlfred Perlstein 398360efbdSAlfred Perlstein /* 408360efbdSAlfred Perlstein * kept in xprt->xp_p2 418360efbdSAlfred Perlstein */ 428360efbdSAlfred Perlstein struct svc_dg_data { 438360efbdSAlfred Perlstein /* XXX: optbuf should be the first field, used by ti_opts.c code */ 448360efbdSAlfred Perlstein size_t su_iosz; /* size of send.recv buffer */ 458360efbdSAlfred Perlstein u_int32_t su_xid; /* transaction id */ 468360efbdSAlfred Perlstein XDR su_xdrs; /* XDR handle */ 478360efbdSAlfred Perlstein char su_verfbody[MAX_AUTH_BYTES]; /* verifier body */ 488360efbdSAlfred Perlstein void *su_cache; /* cached data, NULL if none */ 49e7733ffaSAlexander Kabaev struct netbuf su_srcaddr; /* dst address of last msg */ 508360efbdSAlfred Perlstein }; 518360efbdSAlfred Perlstein 528360efbdSAlfred Perlstein #define __rpcb_get_dg_xidp(x) (&((struct svc_dg_data *)(x)->xp_p2)->su_xid) 53