Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:25:05

0001 /*  $NetBSD: rpc_com.h,v 1.3 2000/12/10 04:10:08 christos Exp $ */
0002 /*  $FreeBSD: src/include/rpc/rpc_com.h,v 1.6 2003/01/16 07:13:51 mbr Exp $ */
0003 
0004 /*
0005  * Copyright (c) 2009, Sun Microsystems, Inc.
0006  * All rights reserved.
0007  *
0008  * Redistribution and use in source and binary forms, with or without
0009  * modification, are permitted provided that the following conditions are met:
0010  * - Redistributions of source code must retain the above copyright notice,
0011  *   this list of conditions and the following disclaimer.
0012  * - Redistributions in binary form must reproduce the above copyright notice,
0013  *   this list of conditions and the following disclaimer in the documentation
0014  *   and/or other materials provided with the distribution.
0015  * - Neither the name of Sun Microsystems, Inc. nor the names of its
0016  *   contributors may be used to endorse or promote products derived
0017  *   from this software without specific prior written permission.
0018  *
0019  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0020  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0021  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0022  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
0023  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0024  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
0025  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0026  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
0027  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0028  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
0029  * POSSIBILITY OF SUCH DAMAGE.
0030  */
0031 /*
0032  * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
0033  */
0034 
0035 /*
0036  * rpc_com.h, Common definitions for both the server and client side.
0037  * All for the topmost layer of rpc
0038  *
0039  */
0040 
0041 #ifndef _RPC_RPCCOM_H
0042 #define _RPC_RPCCOM_H
0043 
0044 
0045 /* #pragma ident    "@(#)rpc_com.h  1.11    93/07/05 SMI" */
0046 
0047 /*
0048  * The max size of the transport, if the size cannot be determined
0049  * by other means.
0050  */
0051 #define RPC_MAXDATASIZE 9000
0052 #define RPC_MAXADDRSIZE 1024
0053 
0054 #define __RPC_GETXID(now) ((u_int32_t)getpid() ^ (u_int32_t)(now)->tv_sec ^ \
0055     (u_int32_t)(now)->tv_usec)
0056 
0057 #ifdef __cplusplus
0058 extern "C" {
0059 #endif
0060 extern u_int __rpc_get_a_size(int);
0061 extern int __rpc_dtbsize(void);
0062 extern int _rpc_dtablesize(void);
0063 extern struct netconfig * __rpcgettp(int);
0064 extern  int  __rpc_get_default_domain(char **);
0065 
0066 char *__rpc_taddr2uaddr_af(int, const struct netbuf *);
0067 struct netbuf *__rpc_uaddr2taddr_af(int, const char *);
0068 int __rpc_fixup_addr(struct netbuf *, const struct netbuf *);
0069 int __rpc_sockinfo2netid(struct __rpc_sockinfo *, const char **);
0070 int __rpc_seman2socktype(int);
0071 int __rpc_socktype2seman(int);
0072 void *rpc_nullproc(CLIENT *);
0073 int __rpc_sockisbound(int);
0074 
0075 struct netbuf *__rpcb_findaddr(rpcprog_t, rpcvers_t, const struct netconfig *,
0076                    const char *, CLIENT **);
0077 bool_t rpc_control(int,void *);
0078 
0079 char *_get_next_token(char *, int);
0080 
0081 #ifdef __cplusplus
0082 }
0083 #endif
0084 
0085 #endif /* _RPC_RPCCOM_H */