1*ce0e08e2SPeter Avalos /* 2*ce0e08e2SPeter Avalos * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 3*ce0e08e2SPeter Avalos * unrestricted use provided that this legend is included on all tape 4*ce0e08e2SPeter Avalos * media and as a part of the software program in whole or part. Users 5*ce0e08e2SPeter Avalos * may copy or modify Sun RPC without charge, but are not authorized 6*ce0e08e2SPeter Avalos * to license or distribute it to anyone else except as part of a product or 7*ce0e08e2SPeter Avalos * program developed by the user. 8*ce0e08e2SPeter Avalos * 9*ce0e08e2SPeter Avalos * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 10*ce0e08e2SPeter Avalos * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 11*ce0e08e2SPeter Avalos * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 12*ce0e08e2SPeter Avalos * 13*ce0e08e2SPeter Avalos * Sun RPC is provided with no support and without any obligation on the 14*ce0e08e2SPeter Avalos * part of Sun Microsystems, Inc. to assist in its use, correction, 15*ce0e08e2SPeter Avalos * modification or enhancement. 16*ce0e08e2SPeter Avalos * 17*ce0e08e2SPeter Avalos * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 18*ce0e08e2SPeter Avalos * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 19*ce0e08e2SPeter Avalos * OR ANY PART THEREOF. 20*ce0e08e2SPeter Avalos * 21*ce0e08e2SPeter Avalos * In no event will Sun Microsystems, Inc. be liable for any lost revenue 22*ce0e08e2SPeter Avalos * or profits or other special, indirect and consequential damages, even if 23*ce0e08e2SPeter Avalos * Sun has been advised of the possibility of such damages. 24*ce0e08e2SPeter Avalos * 25*ce0e08e2SPeter Avalos * Sun Microsystems, Inc. 26*ce0e08e2SPeter Avalos * 2550 Garcia Avenue 27*ce0e08e2SPeter Avalos * Mountain View, California 94043 28*ce0e08e2SPeter Avalos * 29*ce0e08e2SPeter Avalos * @(#)rpc_com.h 1.11 93/07/05 SMI 30*ce0e08e2SPeter Avalos * $NetBSD: rpc_com.h,v 1.3 2000/12/10 04:10:08 christos Exp $ 31*ce0e08e2SPeter Avalos * $FreeBSD: src/lib/libc/rpc/rpc_com.h,v 1.8 2006/02/27 22:10:59 deischen Exp $ 32*ce0e08e2SPeter Avalos * $DragonFly$ 33*ce0e08e2SPeter Avalos */ 34*ce0e08e2SPeter Avalos /* 35*ce0e08e2SPeter Avalos * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. 36*ce0e08e2SPeter Avalos */ 37*ce0e08e2SPeter Avalos 38*ce0e08e2SPeter Avalos /* 39*ce0e08e2SPeter Avalos * rpc_com.h, Common definitions for both the server and client side. 40*ce0e08e2SPeter Avalos * All for the topmost layer of rpc 41*ce0e08e2SPeter Avalos * 42*ce0e08e2SPeter Avalos * In Sun's tirpc distribution, this was installed as <rpc/rpc_com.h>, 43*ce0e08e2SPeter Avalos * but as it contains only non-exported interfaces, it was moved here. 44*ce0e08e2SPeter Avalos */ 45*ce0e08e2SPeter Avalos 46*ce0e08e2SPeter Avalos #ifndef _RPC_RPC_COM_H_ 47*ce0e08e2SPeter Avalos #define _RPC_RPC_COM_H_ 48*ce0e08e2SPeter Avalos 49*ce0e08e2SPeter Avalos #include <sys/cdefs.h> 50*ce0e08e2SPeter Avalos 51*ce0e08e2SPeter Avalos /* 52*ce0e08e2SPeter Avalos * The max size of the transport, if the size cannot be determined 53*ce0e08e2SPeter Avalos * by other means. 54*ce0e08e2SPeter Avalos */ 55*ce0e08e2SPeter Avalos #define RPC_MAXDATASIZE 9000 56*ce0e08e2SPeter Avalos #define RPC_MAXADDRSIZE 1024 57*ce0e08e2SPeter Avalos 58*ce0e08e2SPeter Avalos #define __RPC_GETXID(now) ((u_int32_t)getpid() ^ (u_int32_t)(now)->tv_sec ^ \ 59*ce0e08e2SPeter Avalos (u_int32_t)(now)->tv_usec) 60*ce0e08e2SPeter Avalos 61*ce0e08e2SPeter Avalos __BEGIN_DECLS 62*ce0e08e2SPeter Avalos extern u_int __rpc_get_a_size(int); 63*ce0e08e2SPeter Avalos extern int __rpc_dtbsize(void); 64*ce0e08e2SPeter Avalos extern struct netconfig * __rpcgettp(int); 65*ce0e08e2SPeter Avalos extern int __rpc_get_default_domain(char **); 66*ce0e08e2SPeter Avalos 67*ce0e08e2SPeter Avalos char *__rpc_taddr2uaddr_af(int, const struct netbuf *); 68*ce0e08e2SPeter Avalos struct netbuf *__rpc_uaddr2taddr_af(int, const char *); 69*ce0e08e2SPeter Avalos int __rpc_fixup_addr(struct netbuf *, const struct netbuf *); 70*ce0e08e2SPeter Avalos int __rpc_sockinfo2netid(struct __rpc_sockinfo *, const char **); 71*ce0e08e2SPeter Avalos int __rpc_seman2socktype(int); 72*ce0e08e2SPeter Avalos int __rpc_socktype2seman(int); 73*ce0e08e2SPeter Avalos void *rpc_nullproc(CLIENT *); 74*ce0e08e2SPeter Avalos int __rpc_sockisbound(int); 75*ce0e08e2SPeter Avalos 76*ce0e08e2SPeter Avalos struct netbuf *__rpcb_findaddr_timed(rpcprog_t, rpcvers_t, 77*ce0e08e2SPeter Avalos const struct netconfig *, const char *host, CLIENT **clpp, 78*ce0e08e2SPeter Avalos struct timeval *tp); 79*ce0e08e2SPeter Avalos 80*ce0e08e2SPeter Avalos bool_t __rpc_control(int,void *); 81*ce0e08e2SPeter Avalos 82*ce0e08e2SPeter Avalos char *_get_next_token(char *, int); 83*ce0e08e2SPeter Avalos 84*ce0e08e2SPeter Avalos bool_t __svc_clean_idle(fd_set *, int, bool_t); 85*ce0e08e2SPeter Avalos bool_t __xdrrec_setnonblock(XDR *, int); 86*ce0e08e2SPeter Avalos bool_t __xdrrec_getrec(XDR *, enum xprt_stat *, bool_t); 87*ce0e08e2SPeter Avalos void __xprt_unregister_unlocked(SVCXPRT *); 88*ce0e08e2SPeter Avalos 89*ce0e08e2SPeter Avalos SVCXPRT **__svc_xports; 90*ce0e08e2SPeter Avalos int __svc_maxrec; 91*ce0e08e2SPeter Avalos 92*ce0e08e2SPeter Avalos __END_DECLS 93*ce0e08e2SPeter Avalos 94*ce0e08e2SPeter Avalos #endif /* _RPC_RPC_COM_H_ */ 95