1 /*!\file rpc/pmap_cln.h
2 * RPC portmapper (client-side).
6 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
7 * unrestricted use provided that this legend is included on all tape
8 * media and as a part of the software program in whole or part. Users
9 * may copy or modify Sun RPC without charge, but are not authorized
10 * to license or distribute it to anyone else except as part of a product or
11 * program developed by the user.
13 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
14 * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
17 * Sun RPC is provided with no support and without any obligation on the
18 * part of Sun Microsystems, Inc. to assist in its use, correction,
19 * modification or enhancement.
21 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
22 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
23 * OR ANY PART THEREOF.
25 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
26 * or profits or other special, indirect and consequential damages, even if
27 * Sun has been advised of the possibility of such damages.
29 * Sun Microsystems, Inc.
31 * Mountain View, California 94043
33 * from: @(#)pmap_clnt.h 1.11 88/02/08 SMI
34 * from: @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC
35 * $Id: pmap_clnt.h,v 1.4 1996/01/30 23:31:59 mpp Exp $
40 * Supplies C routines to get to portmap services.
42 * Copyright (C) 1984, Sun Microsystems, Inc.
47 * success = pmap_set(program, version, protocol, port);
48 * success = pmap_unset(program, version);
49 * port = pmap_getport(address, program, version, protocol);
50 * head = pmap_getmaps(address);
51 * clnt_stat = pmap_rmtcall(address, program, version, procedure,
52 * xdrargs, argsp, xdrres, resp, tout, port_ptr)
53 * (works for udp only.)
54 * clnt_stat = clnt_broadcast(program, version, procedure,
55 * xdrargs, argsp, xdrres, resp, eachresult)
56 * (like pmap_rmtcall, except the call is broadcasted to all
57 * locally connected nets. For each valid response received,
58 * the procedure eachresult is called. Its form is:
59 * done = eachresult(resp, raddr)
62 * struct sockaddr_in raddr;
63 * where resp points to the results of the call and raddr is the
64 * address if the responder to the broadcast.
67 #ifndef __RPC_PMAP_CLIENT_H
68 #define __RPC_PMAP_CLIENT_H
70 #include <sys/cdefs.h>
74 extern bool_t pmap_set (u_long, u_long, int, int);
75 extern bool_t pmap_unset (u_long, u_long);
76 extern struct pmaplist *pmap_getmaps (struct sockaddr_in *);
77 extern enum clnt_stat pmap_rmtcall (struct sockaddr_in *, u_long, u_long,
78 u_long, xdrproc_t, caddr_t, xdrproc_t,
79 caddr_t, struct timeval, u_long *);
80 extern enum clnt_stat clnt_broadcast(u_long, u_long, u_long, xdrproc_t,
81 char *, xdrproc_t, char *, bool_t (*)());
82 extern u_short pmap_getport (struct sockaddr_in *, u_long, u_long, u_int);