4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
26 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
27 /* All Rights Reserved */
29 * Portions of this source code were derived from Berkeley
30 * 4.3 BSD under license from the Regents of the University of
35 * clnt.h - Client side remote procedure call interface.
38 #ifndef _RPC_CLNT_SOC_H
39 #define _RPC_CLNT_SOC_H
41 #pragma ident "%Z%%M% %I% %E% SMI"
44 * All the following declarations are only for backward compatibility
48 #include <sys/socket.h>
49 #include <netinet/in.h>
57 #define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */
60 * callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
65 * xdrproc_t inproc, outproc;
69 extern int callrpc(char *, rpcprog_t
, rpcvers_t
, rpcproc_t
, xdrproc_t
, char *,
79 * clnttcp_create(raddr, prog, vers, fdp, sendsz, recvsz)
80 * struct sockaddr_in *raddr;
88 extern CLIENT
*clnttcp_create(struct sockaddr_in
*, rpcprog_t
, rpcvers_t
,
89 int *, uint_t
, uint_t
);
91 extern CLIENT
*clnttcp_create();
98 * clntudp_create(raddr, program, version, wait, fdp)
99 * struct sockaddr_in *raddr;
102 * struct timeval wait;
105 * Same as above, but you specify max packet sizes.
107 * clntudp_bufcreate(raddr, program, version, wait, fdp, sendsz, recvsz)
108 * struct sockaddr_in *raddr;
111 * struct timeval wait;
118 extern CLIENT
*clntudp_create(struct sockaddr_in
*, rpcprog_t
, rpcvers_t
,
119 struct timeval
, int *);
120 extern CLIENT
*clntudp_bufcreate(struct sockaddr_in
*, rpcprog_t
, rpcvers_t
,
121 struct timeval
, int *, uint_t
, uint_t
);
123 extern CLIENT
*clntudp_create();
124 extern CLIENT
*clntudp_bufcreate();
128 * Memory based rpc (for speed check and testing)
130 * clntraw_create(prog, vers)
135 extern CLIENT
*clntraw_create(rpcprog_t
, rpcvers_t
);
137 extern CLIENT
*clntraw_create();
141 * get the local host's IP address without consulting
142 * name service library functions
144 * get_myaddress(addr)
145 * struct sockaddr_in *addr;
148 extern void get_myaddress(struct sockaddr_in
*);
150 extern void get_myaddress();
154 * get the port number on the host for the rpc program, version and proto
156 * getrpcport(host, prognum, versnum, proto)
163 extern ushort_t
getrpcport(char *, rpcprog_t
, rpcvers_t
, rpcprot_t
);
165 extern ushort_t
getrpcport();
172 #endif /* _RPC_CLNT_SOC_H */