pmap_clnt.h revision 1.2
11.1Sderaadt/* @(#)pmap_clnt.h	2.1 88/07/29 4.0 RPCSRC; from 1.11 88/02/08 SMI */
21.1Sderaadt/*
31.1Sderaadt * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
41.1Sderaadt * unrestricted use provided that this legend is included on all tape
51.1Sderaadt * media and as a part of the software program in whole or part.  Users
61.1Sderaadt * may copy or modify Sun RPC without charge, but are not authorized
71.1Sderaadt * to license or distribute it to anyone else except as part of a product or
81.1Sderaadt * program developed by the user.
91.1Sderaadt *
101.1Sderaadt * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
111.1Sderaadt * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
121.1Sderaadt * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
131.1Sderaadt *
141.1Sderaadt * Sun RPC is provided with no support and without any obligation on the
151.1Sderaadt * part of Sun Microsystems, Inc. to assist in its use, correction,
161.1Sderaadt * modification or enhancement.
171.1Sderaadt *
181.1Sderaadt * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
191.1Sderaadt * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
201.1Sderaadt * OR ANY PART THEREOF.
211.1Sderaadt *
221.1Sderaadt * In no event will Sun Microsystems, Inc. be liable for any lost revenue
231.1Sderaadt * or profits or other special, indirect and consequential damages, even if
241.1Sderaadt * Sun has been advised of the possibility of such damages.
251.1Sderaadt *
261.1Sderaadt * Sun Microsystems, Inc.
271.1Sderaadt * 2550 Garcia Avenue
281.1Sderaadt * Mountain View, California  94043
291.1Sderaadt */
301.1Sderaadt
311.1Sderaadt/*
321.1Sderaadt * pmap_clnt.h
331.1Sderaadt * Supplies C routines to get to portmap services.
341.1Sderaadt *
351.1Sderaadt * Copyright (C) 1984, Sun Microsystems, Inc.
361.1Sderaadt */
371.1Sderaadt
381.1Sderaadt/*
391.1Sderaadt * Usage:
401.1Sderaadt *	success = pmap_set(program, version, protocol, port);
411.1Sderaadt *	success = pmap_unset(program, version);
421.1Sderaadt *	port = pmap_getport(address, program, version, protocol);
431.1Sderaadt *	head = pmap_getmaps(address);
441.1Sderaadt *	clnt_stat = pmap_rmtcall(address, program, version, procedure,
451.1Sderaadt *		xdrargs, argsp, xdrres, resp, tout, port_ptr)
461.1Sderaadt *		(works for udp only.)
471.1Sderaadt * 	clnt_stat = clnt_broadcast(program, version, procedure,
481.1Sderaadt *		xdrargs, argsp,	xdrres, resp, eachresult)
491.1Sderaadt *		(like pmap_rmtcall, except the call is broadcasted to all
501.1Sderaadt *		locally connected nets.  For each valid response received,
511.1Sderaadt *		the procedure eachresult is called.  Its form is:
521.1Sderaadt *	done = eachresult(resp, raddr)
531.1Sderaadt *		bool_t done;
541.1Sderaadt *		caddr_t resp;
551.1Sderaadt *		struct sockaddr_in raddr;
561.1Sderaadt *		where resp points to the results of the call and raddr is the
571.1Sderaadt *		address if the responder to the broadcast.
581.1Sderaadt */
591.1Sderaadt
601.2Sbrezak#ifndef _RPC_PMAPCLNT_H
611.2Sbrezak#define _RPC_PMAPCLNT_H
621.2Sbrezak#include <sys/cdefs.h>
631.2Sbrezak
641.2Sbrezak__BEGIN_DECLS
651.2Sbrezakextern bool_t		pmap_set	__P((u_long, u_long, int, int));
661.2Sbrezakextern bool_t		pmap_unset	__P((u_long, u_long));
671.2Sbrezakextern struct pmaplist	*pmap_getmaps	__P((struct sockaddr_in *));
681.2Sbrezakextern enum clnt_stat	pmap_rmtcall	__P((struct sockaddr_in *,
691.2Sbrezak					     u_long, u_long, u_long,
701.2Sbrezak					     xdrproc_t, caddr_t,
711.2Sbrezak					     xdrproc_t, caddr_t,
721.2Sbrezak					     struct timeval, u_long *));
731.2Sbrezakextern enum clnt_stat	clnt_broadcast	__P((u_long, u_long, u_long,
741.2Sbrezak					     xdrproc_t, char *,
751.2Sbrezak					     xdrproc_t, char *,
761.2Sbrezak					     bool_t (*)()));
771.2Sbrezakextern u_short		pmap_getport	__P((struct sockaddr_in *,
781.2Sbrezak					     u_long, u_long, u_int));
791.2Sbrezak__END_DECLS
801.2Sbrezak
811.2Sbrezak#endif /* !_RPC_PMAPCLNT_H */
82