2 * @(#)pmap_clnt.h 2.1 97/10/23
4 /* @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC; from 1.11 88/02/08 SMI */
6 * Copyright (c) 1992-1997,2001 by Standard Performance Evaluation Corporation
8 * Standard Performance Evaluation Corporation (SPEC)
9 * 6585 Merchant Place, Suite 100
12 * This product contains benchmarks acquired from several sources who
13 * understand and agree with SPEC's goal of creating fair and objective
14 * benchmarks to measure computer performance.
16 * This copyright notice is placed here only to protect SPEC in the
17 * event the source is misused in any manner that is contrary to the
18 * spirit, the goals and the intent of SPEC.
20 * The source code is provided to the user or company under the license
21 * agreement for the SPEC Benchmark Suite for this product.
24 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
25 * unrestricted use provided that this legend is included on all tape
26 * media and as a part of the software program in whole or part. Users
27 * may copy or modify Sun RPC without charge, but are not authorized
28 * to license or distribute it to anyone else except as part of a product or
29 * program developed by the user.
31 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
32 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
33 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
35 * Sun RPC is provided with no support and without any obligation on the
36 * part of Sun Microsystems, Inc. to assist in its use, correction,
37 * modification or enhancement.
39 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
40 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
41 * OR ANY PART THEREOF.
43 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
44 * or profits or other special, indirect and consequential damages, even if
45 * Sun has been advised of the possibility of such damages.
47 * Sun Microsystems, Inc.
49 * Mountain View, California 94043
54 * Supplies C routines to get to portmap services.
56 * Copyright (C) 1984, Sun Microsystems, Inc.
58 #ifndef _SRPC_PMAP_CLNT_H
59 #define _SRPC_PMAP_CLNT_H
64 * success = pmap_set(program, version, protocol, port);
65 * success = pmap_unset(program, version);
66 * port = pmap_getport(address, program, version, protocol);
67 * head = pmap_getmaps(address);
68 * clnt_stat = pmap_rmtcall(address, program, version, procedure,
69 * xdrargs, argsp, xdrres, resp, tout, port_ptr)
70 * (works for udp only.)
71 * clnt_stat = clnt_broadcast(program, version, procedure,
72 * xdrargs, argsp, xdrres, resp, eachresult)
73 * (like pmap_rmtcall, except the call is broadcasted to all
74 * locally connected nets. For each valid response received,
75 * the procedure eachresult is called. Its form is:
76 * done = eachresult(resp, raddr)
79 * struct sockaddr_in raddr;
80 * where resp points to the results of the call and raddr is the
81 * address if the responder to the broadcast.
84 typedef bool_t (*resultproc_t)();
85 extern bool_t pmap_set(uint32_t, uint32_t, int, uint16_t);
86 extern bool_t pmap_unset(uint32_t, uint32_t);
87 extern struct pmaplist *pmap_getmaps(struct sockaddr_in *);
88 extern enum clnt_stat pmap_rmtcall(struct sockaddr_in *, uint32_t, uint32_t,
89 uint32_t, xdrproc_t, void *,
91 struct timeval, uint32_t *);
92 extern enum clnt_stat clnt_broadcast(uint32_t, uint32_t, uint32_t, xdrproc_t,
94 void *, resultproc_t);
95 extern uint16_t pmap_getport(struct sockaddr_in *, uint32_t, uint32_t,
97 #endif /* _SRPC_PMAP_CLNT_H */