174462Salfred/* $NetBSD: rpc_com.h,v 1.3 2000/12/10 04:10:08 christos Exp $ */ 274462Salfred/* $FreeBSD$ */ 374462Salfred 4261057Smav/*- 5261057Smav * Copyright (c) 2009, Sun Microsystems, Inc. 6261057Smav * All rights reserved. 7261057Smav * 8261057Smav * Redistribution and use in source and binary forms, with or without 9261057Smav * modification, are permitted provided that the following conditions are met: 10261057Smav * - Redistributions of source code must retain the above copyright notice, 11261057Smav * this list of conditions and the following disclaimer. 12261057Smav * - Redistributions in binary form must reproduce the above copyright notice, 13261057Smav * this list of conditions and the following disclaimer in the documentation 14261057Smav * and/or other materials provided with the distribution. 15261057Smav * - Neither the name of Sun Microsystems, Inc. nor the names of its 16261057Smav * contributors may be used to endorse or promote products derived 17261057Smav * from this software without specific prior written permission. 18261057Smav * 19261057Smav * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20261057Smav * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21261057Smav * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22261057Smav * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23261057Smav * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24261057Smav * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25261057Smav * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26261057Smav * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27261057Smav * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28261057Smav * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29261057Smav * POSSIBILITY OF SUCH DAMAGE. 3026209Swpaul */ 3126209Swpaul/* 3226209Swpaul * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. 3326209Swpaul */ 3426209Swpaul 3526209Swpaul/* 3626209Swpaul * rpc_com.h, Common definitions for both the server and client side. 3726209Swpaul * All for the topmost layer of rpc 3826209Swpaul * 3926209Swpaul */ 4026209Swpaul 4126209Swpaul#ifndef _RPC_RPCCOM_H 4226209Swpaul#define _RPC_RPCCOM_H 4326209Swpaul 4474462Salfred#include <sys/cdefs.h> 4526209Swpaul 4674462Salfred/* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */ 4726209Swpaul 4826209Swpaul/* 4926209Swpaul * The max size of the transport, if the size cannot be determined 5026209Swpaul * by other means. 5126209Swpaul */ 5226209Swpaul#define RPC_MAXDATASIZE 9000 5326209Swpaul#define RPC_MAXADDRSIZE 1024 5426209Swpaul 5574462Salfred#define __RPC_GETXID(now) ((u_int32_t)getpid() ^ (u_int32_t)(now)->tv_sec ^ \ 5674462Salfred (u_int32_t)(now)->tv_usec) 5726209Swpaul 5874462Salfred__BEGIN_DECLS 5993032Simpextern u_int __rpc_get_a_size(int); 6093032Simpextern int __rpc_dtbsize(void); 6193032Simpextern int _rpc_dtablesize(void); 6293032Simpextern struct netconfig * __rpcgettp(int); 6393032Simpextern int __rpc_get_default_domain(char **); 6426209Swpaul 6593032Simpchar *__rpc_taddr2uaddr_af(int, const struct netbuf *); 6693032Simpstruct netbuf *__rpc_uaddr2taddr_af(int, const char *); 6793032Simpint __rpc_fixup_addr(struct netbuf *, const struct netbuf *); 6893032Simpint __rpc_sockinfo2netid(struct __rpc_sockinfo *, const char **); 6993032Simpint __rpc_seman2socktype(int); 7093032Simpint __rpc_socktype2seman(int); 7193032Simpvoid *rpc_nullproc(CLIENT *); 7293032Simpint __rpc_sockisbound(int); 7374462Salfred 7493032Simpstruct netbuf *__rpcb_findaddr(rpcprog_t, rpcvers_t, const struct netconfig *, 7593032Simp const char *, CLIENT **); 76109359Smbrbool_t rpc_control(int,void *); 7774462Salfred 7893032Simpchar *_get_next_token(char *, int); 7974462Salfred 8074462Salfred__END_DECLS 8174462Salfred 8226209Swpaul#endif /* _RPC_RPCCOM_H */ 83