rpc_com.h revision 92905
174462Salfred/*	$NetBSD: rpc_com.h,v 1.3 2000/12/10 04:10:08 christos Exp $	*/
274462Salfred/*	$FreeBSD: head/lib/libc/rpc/rpc_com.h 92905 2002-03-21 22:49:10Z obrien $ */
374462Salfred
474462Salfred/*
574462Salfred * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
674462Salfred * unrestricted use provided that this legend is included on all tape
774462Salfred * media and as a part of the software program in whole or part.  Users
874462Salfred * may copy or modify Sun RPC without charge, but are not authorized
974462Salfred * to license or distribute it to anyone else except as part of a product or
1074462Salfred * program developed by the user.
1174462Salfred *
1274462Salfred * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
1374462Salfred * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
1474462Salfred * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
1574462Salfred *
1674462Salfred * Sun RPC is provided with no support and without any obligation on the
1774462Salfred * part of Sun Microsystems, Inc. to assist in its use, correction,
1874462Salfred * modification or enhancement.
1974462Salfred *
2074462Salfred * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
2174462Salfred * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
2274462Salfred * OR ANY PART THEREOF.
2374462Salfred *
2474462Salfred * In no event will Sun Microsystems, Inc. be liable for any lost revenue
2574462Salfred * or profits or other special, indirect and consequential damages, even if
2674462Salfred * Sun has been advised of the possibility of such damages.
2774462Salfred *
2874462Salfred * Sun Microsystems, Inc.
2974462Salfred * 2550 Garcia Avenue
3074462Salfred * Mountain View, California  94043
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
7674462Salfredstruct netbuf *__rpcb_findaddr __P((rpcprog_t, rpcvers_t,
7774462Salfred				    const struct netconfig *,
7874462Salfred				    const char *, CLIENT **));
7992905Sobrienbool_t __rpc_control(int,void *);
8074462Salfred
8192905Sobrienchar *_get_next_token(char *, int);
8274462Salfred
8374462Salfred__END_DECLS
8474462Salfred
8574462Salfred#endif /* _RPC_RPCCOM_H */
86