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