174462Salfred/*	$NetBSD: pmap_prot.h,v 1.8 2000/06/02 22:57:55 fvdl Exp $	*/
274462Salfred
31839Swollman/*
41839Swollman * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
51839Swollman * unrestricted use provided that this legend is included on all tape
61839Swollman * media and as a part of the software program in whole or part.  Users
71839Swollman * may copy or modify Sun RPC without charge, but are not authorized
81839Swollman * to license or distribute it to anyone else except as part of a product or
91839Swollman * program developed by the user.
108858Srgrimes *
111839Swollman * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
1213771Smpp * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
131839Swollman * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
148858Srgrimes *
151839Swollman * Sun RPC is provided with no support and without any obligation on the
161839Swollman * part of Sun Microsystems, Inc. to assist in its use, correction,
171839Swollman * modification or enhancement.
188858Srgrimes *
191839Swollman * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
201839Swollman * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
211839Swollman * OR ANY PART THEREOF.
228858Srgrimes *
231839Swollman * In no event will Sun Microsystems, Inc. be liable for any lost revenue
241839Swollman * or profits or other special, indirect and consequential damages, even if
251839Swollman * Sun has been advised of the possibility of such damages.
268858Srgrimes *
271839Swollman * Sun Microsystems, Inc.
281839Swollman * 2550 Garcia Avenue
291839Swollman * Mountain View, California  94043
301903Swollman *
3174462Salfred *	from: @(#)pmap_prot.h 1.14 88/02/08 SMI
321903Swollman *	from: @(#)pmap_prot.h	2.1 88/07/29 4.0 RPCSRC
3350473Speter * $FreeBSD$
341839Swollman */
351839Swollman
361839Swollman/*
371839Swollman * pmap_prot.h
381839Swollman * Protocol for the local binder service, or pmap.
391839Swollman *
401839Swollman * Copyright (C) 1984, Sun Microsystems, Inc.
411839Swollman *
421839Swollman * The following procedures are supported by the protocol:
431839Swollman *
441839Swollman * PMAPPROC_NULL() returns ()
451839Swollman * 	takes nothing, returns nothing
461839Swollman *
471839Swollman * PMAPPROC_SET(struct pmap) returns (bool_t)
481839Swollman * 	TRUE is success, FALSE is failure.  Registers the tuple
491839Swollman *	[prog, vers, prot, port].
501839Swollman *
511839Swollman * PMAPPROC_UNSET(struct pmap) returns (bool_t)
521839Swollman *	TRUE is success, FALSE is failure.  Un-registers pair
531839Swollman *	[prog, vers].  prot and port are ignored.
541839Swollman *
551839Swollman * PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
561839Swollman *	0 is failure.  Otherwise returns the port number where the pair
571839Swollman *	[prog, vers] is registered.  It may lie!
581839Swollman *
591839Swollman * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
601839Swollman *
611839Swollman * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
621839Swollman * 	RETURNS (port, string<>);
631839Swollman * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
641839Swollman * 	Calls the procedure on the local machine.  If it is not registered,
651839Swollman *	this procedure is quite; ie it does not return error information!!!
661839Swollman *	This procedure only is supported on rpc/udp and calls via
671839Swollman *	rpc/udp.  This routine only passes null authentication parameters.
681839Swollman *	This file has no interface to xdr routines for PMAPPROC_CALLIT.
691839Swollman *
701839Swollman * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
711839Swollman */
721839Swollman
7374462Salfred#ifndef _RPC_PMAP_PROT_H
7474462Salfred#define _RPC_PMAP_PROT_H
751903Swollman#include <sys/cdefs.h>
761903Swollman
771839Swollman#define PMAPPORT		((u_short)111)
781839Swollman#define PMAPPROG		((u_long)100000)
791839Swollman#define PMAPVERS		((u_long)2)
801839Swollman#define PMAPVERS_PROTO		((u_long)2)
811839Swollman#define PMAPVERS_ORIG		((u_long)1)
821839Swollman#define PMAPPROC_NULL		((u_long)0)
831839Swollman#define PMAPPROC_SET		((u_long)1)
841839Swollman#define PMAPPROC_UNSET		((u_long)2)
851839Swollman#define PMAPPROC_GETPORT	((u_long)3)
861839Swollman#define PMAPPROC_DUMP		((u_long)4)
871839Swollman#define PMAPPROC_CALLIT		((u_long)5)
881839Swollman
891839Swollmanstruct pmap {
901839Swollman	long unsigned pm_prog;
911839Swollman	long unsigned pm_vers;
921839Swollman	long unsigned pm_prot;
931839Swollman	long unsigned pm_port;
941839Swollman};
951839Swollman
961839Swollmanstruct pmaplist {
971839Swollman	struct pmap	pml_map;
981839Swollman	struct pmaplist *pml_next;
991839Swollman};
1001839Swollman
1011903Swollman__BEGIN_DECLS
10293032Simpextern bool_t xdr_pmap(XDR *, struct pmap *);
10393032Simpextern bool_t xdr_pmaplist(XDR *, struct pmaplist **);
10493032Simpextern bool_t xdr_pmaplist_ptr(XDR *, struct pmaplist *);
1051903Swollman__END_DECLS
1061903Swollman
10774462Salfred#endif /* !_RPC_PMAP_PROT_H */
108