Back to index

glibc  2.9
pmap_prot.h
Go to the documentation of this file.
00001 /* @(#)pmap_prot.h   2.1 88/07/29 4.0 RPCSRC; from 1.14 88/02/08 SMI */
00002 /*
00003  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
00004  * unrestricted use provided that this legend is included on all tape
00005  * media and as a part of the software program in whole or part.  Users
00006  * may copy or modify Sun RPC without charge, but are not authorized
00007  * to license or distribute it to anyone else except as part of a product or
00008  * program developed by the user.
00009  *
00010  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
00011  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
00012  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
00013  *
00014  * Sun RPC is provided with no support and without any obligation on the
00015  * part of Sun Microsystems, Inc. to assist in its use, correction,
00016  * modification or enhancement.
00017  *
00018  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
00019  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
00020  * OR ANY PART THEREOF.
00021  *
00022  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
00023  * or profits or other special, indirect and consequential damages, even if
00024  * Sun has been advised of the possibility of such damages.
00025  *
00026  * Sun Microsystems, Inc.
00027  * 2550 Garcia Avenue
00028  * Mountain View, California  94043
00029  */
00030 
00031 /*
00032  * pmap_prot.h
00033  * Protocol for the local binder service, or pmap.
00034  *
00035  * Copyright (C) 1984, Sun Microsystems, Inc.
00036  */
00037 
00038 #ifndef _RPC_PMAP_PROT_H
00039 #define _RPC_PMAP_PROT_H    1
00040 
00041 #include <features.h>
00042 
00043 #include <rpc/xdr.h>
00044 
00045 __BEGIN_DECLS
00046 
00047 /* The following procedures are supported by the protocol:
00048  *
00049  * PMAPPROC_NULL() returns ()
00050  *     takes nothing, returns nothing
00051  *
00052  * PMAPPROC_SET(struct pmap) returns (bool_t)
00053  *     TRUE is success, FALSE is failure.  Registers the tuple
00054  *     [prog, vers, prot, port].
00055  *
00056  * PMAPPROC_UNSET(struct pmap) returns (bool_t)
00057  *     TRUE is success, FALSE is failure.  Un-registers pair
00058  *     [prog, vers].  prot and port are ignored.
00059  *
00060  * PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
00061  *     0 is failure.  Otherwise returns the port number where the pair
00062  *     [prog, vers] is registered.  It may lie!
00063  *
00064  * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
00065  *
00066  * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
00067  *     RETURNS (port, string<>);
00068  * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
00069  *     Calls the procedure on the local machine.  If it is not registered,
00070  *     this procedure is quite; ie it does not return error information!!!
00071  *     This procedure only is supported on rpc/udp and calls via
00072  *     rpc/udp.  This routine only passes null authentication parameters.
00073  *     This file has no interface to xdr routines for PMAPPROC_CALLIT.
00074  *
00075  * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
00076  */
00077 
00078 #define PMAPPORT            ((u_short)111)
00079 #define PMAPPROG            ((u_long)100000)
00080 #define PMAPVERS            ((u_long)2)
00081 #define PMAPVERS_PROTO             ((u_long)2)
00082 #define PMAPVERS_ORIG              ((u_long)1)
00083 #define PMAPPROC_NULL              ((u_long)0)
00084 #define PMAPPROC_SET        ((u_long)1)
00085 #define PMAPPROC_UNSET             ((u_long)2)
00086 #define PMAPPROC_GETPORT    ((u_long)3)
00087 #define PMAPPROC_DUMP              ((u_long)4)
00088 #define PMAPPROC_CALLIT            ((u_long)5)
00089 
00090 struct pmap {
00091        long unsigned pm_prog;
00092        long unsigned pm_vers;
00093        long unsigned pm_prot;
00094        long unsigned pm_port;
00095 };
00096 
00097 extern bool_t xdr_pmap (XDR *__xdrs, struct pmap *__regs) __THROW;
00098 
00099 struct pmaplist {
00100        struct pmap   pml_map;
00101        struct pmaplist *pml_next;
00102 };
00103 
00104 extern bool_t xdr_pmaplist (XDR *__xdrs, struct pmaplist **__rp) __THROW;
00105 
00106 __END_DECLS
00107 
00108 #endif /* rpc/pmap_prot.h */