4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _RESOLV_COMMON_H
27 #define _RESOLV_COMMON_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
36 * Definitions common to ypserv, rpc.nisd_resolv and rpc.resolv code.
37 * Stolen from rpcbind and is used to access xprt->xp_p2 fields.
43 #ifdef TDRPC /* ****** 4.1 ******** */
45 #define xdrproc_t bool
46 #define GETCALLER(xprt) svc_getcaller(xprt)
47 #define SETCALLER(xprt, addrp) *(svc_getcaller(xprt)) = *addrp;
51 XDR su_xdrs
; /* XDR handle */
52 char su_verfbody
[MAX_AUTH_BYTES
]; /* verifier body */
53 char *su_cache
; /* cached data, NULL if no cache */
55 #define get_svc_dg_data(xprt) ((struct svc_dg_data *)(xprt->xp_p2))
57 #else /* ****** 5.x ******** */
59 #include <rpcsvc/svc_dg_priv.h>
62 #define GETCALLER(xprt) svc_getrpccaller(xprt)
63 #define SETCALLER(xprt, nbufp) xprt->xp_rtaddr.len = nbufp->len; \
64 (void) memcpy(xprt->xp_rtaddr.buf, nbufp->buf, nbufp->len);
65 #define RPC_BUF_MAX 32768
67 #endif /* ****** end ******** */
70 struct ypfwdreq_key4
{
78 struct ypfwdreq_key6
{
86 extern ulong_t
svc_getxid(SVCXPRT
*xprt
);
87 extern bool_t
xdr_ypfwdreq_key4(XDR
*, struct ypfwdreq_key4
*);
88 extern bool_t
xdr_ypfwdreq_key6(XDR
*, struct ypfwdreq_key6
*);
94 #endif /* _RESOLV_COMMON_H */