174462Salfred/* $NetBSD: rpc_com.h,v 1.3 2000/12/10 04:10:08 christos Exp $ */ 274462Salfred 3261046Smav/*- 4261046Smav * Copyright (c) 2009, Sun Microsystems, Inc. 5261046Smav * All rights reserved. 6261046Smav * 7261046Smav * Redistribution and use in source and binary forms, with or without 8261046Smav * modification, are permitted provided that the following conditions are met: 9261046Smav * - Redistributions of source code must retain the above copyright notice, 10261046Smav * this list of conditions and the following disclaimer. 11261046Smav * - Redistributions in binary form must reproduce the above copyright notice, 12261046Smav * this list of conditions and the following disclaimer in the documentation 13261046Smav * and/or other materials provided with the distribution. 14261046Smav * - Neither the name of Sun Microsystems, Inc. nor the names of its 15261046Smav * contributors may be used to endorse or promote products derived 16261046Smav * from this software without specific prior written permission. 1774462Salfred * 18261046Smav * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19261046Smav * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20261046Smav * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21261046Smav * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22261046Smav * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23261046Smav * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24261046Smav * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25261046Smav * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26261046Smav * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27261046Smav * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28261046Smav * POSSIBILITY OF SUCH DAMAGE. 2992989Sobrien * 3092989Sobrien * $FreeBSD: releng/10.2/lib/libc/rpc/rpc_com.h 261046 2014-01-22 23:45:27Z mav $ 3174462Salfred */ 3274462Salfred/* 3374462Salfred * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. 3474462Salfred */ 3574462Salfred 3674462Salfred/* 3774462Salfred * rpc_com.h, Common definitions for both the server and client side. 3874462Salfred * All for the topmost layer of rpc 3974462Salfred * 4074462Salfred * In Sun's tirpc distribution, this was installed as <rpc/rpc_com.h>, 4174462Salfred * but as it contains only non-exported interfaces, it was moved here. 4274462Salfred */ 4374462Salfred 4474462Salfred#ifndef _RPC_RPCCOM_H 4574462Salfred#define _RPC_RPCCOM_H 4674462Salfred 4774462Salfred#include <sys/cdefs.h> 4874462Salfred 4974462Salfred/* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */ 5074462Salfred 5174462Salfred/* 5274462Salfred * The max size of the transport, if the size cannot be determined 5374462Salfred * by other means. 5474462Salfred */ 5574462Salfred#define RPC_MAXDATASIZE 9000 5674462Salfred#define RPC_MAXADDRSIZE 1024 5774462Salfred 5874462Salfred#define __RPC_GETXID(now) ((u_int32_t)getpid() ^ (u_int32_t)(now)->tv_sec ^ \ 5974462Salfred (u_int32_t)(now)->tv_usec) 6074462Salfred 6174462Salfred__BEGIN_DECLS 6292905Sobrienextern u_int __rpc_get_a_size(int); 6392905Sobrienextern int __rpc_dtbsize(void); 6492905Sobrienextern struct netconfig * __rpcgettp(int); 6592905Sobrienextern int __rpc_get_default_domain(char **); 6674462Salfred 6792905Sobrienchar *__rpc_taddr2uaddr_af(int, const struct netbuf *); 6892905Sobrienstruct netbuf *__rpc_uaddr2taddr_af(int, const char *); 6992905Sobrienint __rpc_fixup_addr(struct netbuf *, const struct netbuf *); 7092905Sobrienint __rpc_sockinfo2netid(struct __rpc_sockinfo *, const char **); 7192905Sobrienint __rpc_seman2socktype(int); 7292905Sobrienint __rpc_socktype2seman(int); 7392905Sobrienvoid *rpc_nullproc(CLIENT *); 7492905Sobrienint __rpc_sockisbound(int); 7574462Salfred 7699997Salfredstruct netbuf *__rpcb_findaddr_timed(rpcprog_t, rpcvers_t, 7799997Salfred const struct netconfig *, const char *host, CLIENT **clpp, 7899997Salfred struct timeval *tp); 7999997Salfred 8092905Sobrienbool_t __rpc_control(int,void *); 8174462Salfred 8292905Sobrienchar *_get_next_token(char *, int); 8374462Salfred 84111618Snectarbool_t __svc_clean_idle(fd_set *, int, bool_t); 85111618Snectarbool_t __xdrrec_setnonblock(XDR *, int); 86111618Snectarbool_t __xdrrec_getrec(XDR *, enum xprt_stat *, bool_t); 87111618Snectarvoid __xprt_unregister_unlocked(SVCXPRT *); 88111618Snectar 89109359SmbrSVCXPRT **__svc_xports; 90109359Smbrint __svc_maxrec; 91109359Smbr 9274462Salfred__END_DECLS 9374462Salfred 9474462Salfred#endif /* _RPC_RPCCOM_H */ 95