Home | History | Annotate | Line # | Download | only in rpc
      1  1.9    perry /*	$NetBSD: pmap_prot.h,v 1.9 2005/02/03 04:39:32 perry Exp $	*/
      2  1.4      cgd 
      3  1.1  deraadt /*
      4  1.1  deraadt  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
      5  1.1  deraadt  * unrestricted use provided that this legend is included on all tape
      6  1.1  deraadt  * media and as a part of the software program in whole or part.  Users
      7  1.1  deraadt  * may copy or modify Sun RPC without charge, but are not authorized
      8  1.1  deraadt  * to license or distribute it to anyone else except as part of a product or
      9  1.1  deraadt  * program developed by the user.
     10  1.1  deraadt  *
     11  1.1  deraadt  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
     12  1.1  deraadt  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
     13  1.1  deraadt  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
     14  1.1  deraadt  *
     15  1.1  deraadt  * Sun RPC is provided with no support and without any obligation on the
     16  1.1  deraadt  * part of Sun Microsystems, Inc. to assist in its use, correction,
     17  1.1  deraadt  * modification or enhancement.
     18  1.1  deraadt  *
     19  1.1  deraadt  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
     20  1.1  deraadt  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
     21  1.1  deraadt  * OR ANY PART THEREOF.
     22  1.1  deraadt  *
     23  1.1  deraadt  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
     24  1.1  deraadt  * or profits or other special, indirect and consequential damages, even if
     25  1.1  deraadt  * Sun has been advised of the possibility of such damages.
     26  1.1  deraadt  *
     27  1.1  deraadt  * Sun Microsystems, Inc.
     28  1.1  deraadt  * 2550 Garcia Avenue
     29  1.1  deraadt  * Mountain View, California  94043
     30  1.3  mycroft  *
     31  1.3  mycroft  *	from: @(#)pmap_prot.h 1.14 88/02/08 SMI
     32  1.4      cgd  *	@(#)pmap_prot.h	2.1 88/07/29 4.0 RPCSRC
     33  1.1  deraadt  */
     34  1.1  deraadt 
     35  1.1  deraadt /*
     36  1.1  deraadt  * pmap_prot.h
     37  1.1  deraadt  * Protocol for the local binder service, or pmap.
     38  1.1  deraadt  *
     39  1.1  deraadt  * Copyright (C) 1984, Sun Microsystems, Inc.
     40  1.1  deraadt  *
     41  1.1  deraadt  * The following procedures are supported by the protocol:
     42  1.1  deraadt  *
     43  1.1  deraadt  * PMAPPROC_NULL() returns ()
     44  1.1  deraadt  * 	takes nothing, returns nothing
     45  1.1  deraadt  *
     46  1.1  deraadt  * PMAPPROC_SET(struct pmap) returns (bool_t)
     47  1.1  deraadt  * 	TRUE is success, FALSE is failure.  Registers the tuple
     48  1.1  deraadt  *	[prog, vers, prot, port].
     49  1.1  deraadt  *
     50  1.1  deraadt  * PMAPPROC_UNSET(struct pmap) returns (bool_t)
     51  1.1  deraadt  *	TRUE is success, FALSE is failure.  Un-registers pair
     52  1.1  deraadt  *	[prog, vers].  prot and port are ignored.
     53  1.1  deraadt  *
     54  1.7    lukem  * PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
     55  1.1  deraadt  *	0 is failure.  Otherwise returns the port number where the pair
     56  1.1  deraadt  *	[prog, vers] is registered.  It may lie!
     57  1.1  deraadt  *
     58  1.1  deraadt  * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
     59  1.1  deraadt  *
     60  1.1  deraadt  * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
     61  1.1  deraadt  * 	RETURNS (port, string<>);
     62  1.7    lukem  * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
     63  1.1  deraadt  * 	Calls the procedure on the local machine.  If it is not registered,
     64  1.1  deraadt  *	this procedure is quite; ie it does not return error information!!!
     65  1.7    lukem  *	This procedure only is supported on rpc/udp and calls via
     66  1.7    lukem  *	rpc/udp.  This routine only passes null authentication parameters.
     67  1.1  deraadt  *	This file has no interface to xdr routines for PMAPPROC_CALLIT.
     68  1.1  deraadt  *
     69  1.1  deraadt  * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
     70  1.1  deraadt  */
     71  1.1  deraadt 
     72  1.5    perry #ifndef _RPC_PMAP_PROT_H_
     73  1.5    perry #define _RPC_PMAP_PROT_H_
     74  1.2   brezak #include <sys/cdefs.h>
     75  1.2   brezak 
     76  1.7    lukem #define PMAPPORT		((u_short)111)
     77  1.7    lukem #define PMAPPROG		((u_long)100000)
     78  1.7    lukem #define PMAPVERS		((u_long)2)
     79  1.7    lukem #define PMAPVERS_PROTO		((u_long)2)
     80  1.7    lukem #define PMAPVERS_ORIG		((u_long)1)
     81  1.7    lukem #define PMAPPROC_NULL		((u_long)0)
     82  1.7    lukem #define PMAPPROC_SET		((u_long)1)
     83  1.7    lukem #define PMAPPROC_UNSET		((u_long)2)
     84  1.7    lukem #define PMAPPROC_GETPORT	((u_long)3)
     85  1.7    lukem #define PMAPPROC_DUMP		((u_long)4)
     86  1.7    lukem #define PMAPPROC_CALLIT		((u_long)5)
     87  1.1  deraadt 
     88  1.1  deraadt struct pmap {
     89  1.7    lukem 	long unsigned pm_prog;
     90  1.7    lukem 	long unsigned pm_vers;
     91  1.7    lukem 	long unsigned pm_prot;
     92  1.7    lukem 	long unsigned pm_port;
     93  1.1  deraadt };
     94  1.1  deraadt 
     95  1.1  deraadt struct pmaplist {
     96  1.1  deraadt 	struct pmap	pml_map;
     97  1.1  deraadt 	struct pmaplist *pml_next;
     98  1.1  deraadt };
     99  1.1  deraadt 
    100  1.2   brezak __BEGIN_DECLS
    101  1.9    perry extern bool_t xdr_pmap		(XDR *, struct pmap *);
    102  1.9    perry extern bool_t xdr_pmaplist	(XDR *, struct pmaplist **);
    103  1.9    perry extern bool_t xdr_pmaplist_ptr	(XDR *, struct pmaplist *);
    104  1.2   brezak __END_DECLS
    105  1.2   brezak 
    106  1.5    perry #endif /* !_RPC_PMAP_PROT_H_ */
    107