Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

pmap_prot.h

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

Generated on Sun May 14 14:51:20 2006 by  doxygen 1.4.2