dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / ypcmd / ypserv_resolv_common.h
blob1bc7ab17768e603d2483dff25c800be34b0f1369
1 /*
2 * CDDL HEADER START
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]
19 * CDDL HEADER END
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"
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
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.
40 #define YPDNSPROC4 1L
41 #define YPDNSPROC6 2L
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;
48 struct svc_dg_data {
49 uint_t su_iosz;
50 ulong_t su_xid;
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>
61 #define MAX_UADDR 25
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 {
71 char *map;
72 datum keydat;
73 unsigned long xid;
74 unsigned long ip;
75 unsigned short port;
78 struct ypfwdreq_key6 {
79 char *map;
80 datum keydat;
81 unsigned long xid;
82 uint32_t *addr;
83 in_port_t port;
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 *);
90 #ifdef __cplusplus
92 #endif
94 #endif /* _RESOLV_COMMON_H */