1*404fbe5fSchristos /* $NetBSD: compat_pmap_rmtcall.c,v 1.2 2009/01/11 03:41:28 christos Exp $ */
2*404fbe5fSchristos
3*404fbe5fSchristos /*-
4*404fbe5fSchristos * Copyright (c) 2003 The NetBSD Foundation, Inc.
5*404fbe5fSchristos * All rights reserved.
6*404fbe5fSchristos *
7*404fbe5fSchristos * This code is derived from software contributed to The NetBSD Foundation
8*404fbe5fSchristos * by Christos Zoulas.
9*404fbe5fSchristos *
10*404fbe5fSchristos * Redistribution and use in source and binary forms, with or without
11*404fbe5fSchristos * modification, are permitted provided that the following conditions
12*404fbe5fSchristos * are met:
13*404fbe5fSchristos * 1. Redistributions of source code must retain the above copyright
14*404fbe5fSchristos * notice, this list of conditions and the following disclaimer.
15*404fbe5fSchristos * 2. Redistributions in binary form must reproduce the above copyright
16*404fbe5fSchristos * notice, this list of conditions and the following disclaimer in the
17*404fbe5fSchristos * documentation and/or other materials provided with the distribution.
18*404fbe5fSchristos * 3. All advertising materials mentioning features or use of this software
19*404fbe5fSchristos * must display the following acknowledgement:
20*404fbe5fSchristos * This product includes software developed by the NetBSD
21*404fbe5fSchristos * Foundation, Inc. and its contributors.
22*404fbe5fSchristos * 4. Neither the name of The NetBSD Foundation nor the names of its
23*404fbe5fSchristos * contributors may be used to endorse or promote products derived
24*404fbe5fSchristos * from this software without specific prior written permission.
25*404fbe5fSchristos *
26*404fbe5fSchristos * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27*404fbe5fSchristos * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28*404fbe5fSchristos * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29*404fbe5fSchristos * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30*404fbe5fSchristos * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31*404fbe5fSchristos * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32*404fbe5fSchristos * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33*404fbe5fSchristos * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34*404fbe5fSchristos * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35*404fbe5fSchristos * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36*404fbe5fSchristos * POSSIBILITY OF SUCH DAMAGE.
37*404fbe5fSchristos */
38*404fbe5fSchristos #include <sys/cdefs.h>
39*404fbe5fSchristos #if defined(LIBC_SCCS) && !defined(lint)
40*404fbe5fSchristos __RCSID("$NetBSD: compat_pmap_rmtcall.c,v 1.2 2009/01/11 03:41:28 christos Exp $");
41*404fbe5fSchristos #endif /* LIBC_SCCS and not lint */
42*404fbe5fSchristos
43*404fbe5fSchristos
44*404fbe5fSchristos #define __LIBC12_SOURCE__
45*404fbe5fSchristos
46*404fbe5fSchristos #include "namespace.h"
47*404fbe5fSchristos #include <sys/types.h>
48*404fbe5fSchristos #include <sys/time.h>
49*404fbe5fSchristos #include <compat/sys/time.h>
50*404fbe5fSchristos #include <rpc/rpc.h>
51*404fbe5fSchristos #include <compat/include/rpc/pmap_clnt.h>
52*404fbe5fSchristos
53*404fbe5fSchristos __warn_references(pmap_rmtcall,
54*404fbe5fSchristos "warning: reference to compatibility pmap_rmtcall(); include <rpc/pmap_clnt.h> to generate correct reference")
55*404fbe5fSchristos
56*404fbe5fSchristos #ifdef __weak_alias
__weak_alias(pmap_rmtcall,_pmap_rmtcall)57*404fbe5fSchristos __weak_alias(pmap_rmtcall, _pmap_rmtcall)
58*404fbe5fSchristos #endif
59*404fbe5fSchristos
60*404fbe5fSchristos enum clnt_stat
61*404fbe5fSchristos pmap_rmtcall(struct sockaddr_in *addr, u_long prognum, u_long versnum,
62*404fbe5fSchristos u_long procnum, xdrproc_t inproc, char *in, xdrproc_t outproc,
63*404fbe5fSchristos char *out, struct timeval50 tout50, u_long *portp)
64*404fbe5fSchristos {
65*404fbe5fSchristos struct timeval tout;
66*404fbe5fSchristos timeval50_to_timeval(&tout50, &tout);
67*404fbe5fSchristos return __pmap_rmtcall50(addr, prognum, versnum, procnum, inproc, in,
68*404fbe5fSchristos outproc, out, tout, portp);
69*404fbe5fSchristos }
70