1/*
2 * CDDL HEADER START
3 *
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
7 * with the License.
8 *
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.
13 *
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]
19 *
20 * CDDL HEADER END
21 */
22#pragma ident	"%Z%%M%	%I%	%E% SMI"
23
24/*
25 * pmap_clnt.h
26 * Supplies C routines to get to portmap services.
27 *
28 * Copyright (C) 1984, Sun Microsystems, Inc.
29 */
30
31/*
32 * Usage:
33 *	success = pmap_set(program, version, protocol, port);
34 *	success = pmap_unset(program, version);
35 *	port = pmap_getport(address, program, version, protocol);
36 *	head = pmap_getmaps(address);
37 *	clnt_stat = pmap_rmtcall(address, program, version, procedure,
38 *		xdrargs, argsp, xdrres, resp, tout, port_ptr)
39 *		(works for udp only.)
40 * 	clnt_stat = clnt_broadcast(program, version, procedure,
41 *		xdrargs, argsp,	xdrres, resp, eachresult)
42 *		(like pmap_rmtcall, except the call is broadcasted to all
43 *		locally connected nets.  For each valid response received,
44 *		the procedure eachresult is called.  Its form is:
45 *	done = eachresult(resp, raddr)
46 *		bool_t done;
47 *		caddr_t resp;
48 *		struct sockaddr_in raddr;
49 *		where resp points to the results of the call and raddr is the
50 *		address if the responder to the broadcast.
51 */
52
53#ifndef _rpc_pmap_clnt_h
54#define	_rpc_pmap_clnt_h
55
56extern bool_t		pmap_set();
57extern bool_t		pmap_unset();
58extern struct pmaplist	*pmap_getmaps();
59enum clnt_stat		pmap_rmtcall();
60enum clnt_stat		clnt_broadcast();
61extern u_short		pmap_getport();
62
63#endif /*!_rpc_pmap_clnt_h*/
64