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