Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:04

0001 /* @(#)pmap_prot.h  2.1 88/07/29 4.0 RPCSRC; from 1.14 88/02/08 SMI */
0002 /*
0003  * Copyright (c) 2010, Oracle America, Inc.
0004  *
0005  * All rights reserved.
0006  *
0007  * Redistribution and use in source and binary forms, with or without
0008  * modification, are permitted provided that the following conditions are met:
0009  *
0010  *     * Redistributions of source code must retain the above copyright
0011  *       notice, this list of conditions and the following disclaimer.
0012  *
0013  *     * Redistributions in binary form must reproduce the above copyright
0014  *       notice, this list of conditions and the following disclaimer in
0015  *       the documentation and/or other materials provided with the
0016  *       distribution.
0017  *
0018  *     * Neither the name of the "Oracle America, Inc." nor the names of
0019  *       its contributors may be used to endorse or promote products
0020  *       derived from this software without specific prior written permission.
0021  *
0022  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
0023  * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
0024  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
0025  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0026  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0027  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
0028  * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
0029  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
0030  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
0031  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
0032  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0033  */
0034 
0035 /*
0036  * pmap_prot.h
0037  * Protocol for the local binder service, or pmap.
0038  *
0039  * The following procedures are supported by the protocol:
0040  *
0041  * PMAPPROC_NULL() returns ()
0042  *  takes nothing, returns nothing
0043  *
0044  * PMAPPROC_SET(struct pmap) returns (bool_t)
0045  *  TRUE is success, FALSE is failure.  Registers the tuple
0046  *  [prog, vers, prot, port].
0047  *
0048  * PMAPPROC_UNSET(struct pmap) returns (bool_t)
0049  *  TRUE is success, FALSE is failure.  Un-registers pair
0050  *  [prog, vers].  prot and port are ignored.
0051  *
0052  * PMAPPROC_GETPORT(struct pmap) returns (u_short).
0053  *  0 is failure.  Otherwise returns the port number where the pair
0054  *  [prog, vers] is registered.  It may lie!
0055  *
0056  * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
0057  *
0058  * PMAPPROC_CALLIT(rpcprog_t, rpcvers_t, rpcproc_t, string<>)
0059  *  RETURNS (port, string<>);
0060  * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
0061  *  Calls the procedure on the local machine.  If it is not registered,
0062  *  this procedure is quite; ie it does not return error information!!!
0063  *  This procedure only is supported on rpc/udp and calls via
0064  *  rpc/udp.  This routine only passes null authentication parameters.
0065  *  This file has no interface to xdr routines for PMAPPROC_CALLIT.
0066  *
0067  * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
0068  */
0069 
0070 #ifndef GSSRPC_PMAP_PROT_H
0071 #define GSSRPC_PMAP_PROT_H
0072 GSSRPC__BEGIN_DECLS
0073 
0074 #define PMAPPORT        ((u_short)111)
0075 #define PMAPPROG        ((rpcprog_t)100000)
0076 #define PMAPVERS        ((rpcvers_t)2)
0077 #define PMAPVERS_PROTO      ((rpcprot_t)2)
0078 #define PMAPVERS_ORIG       ((rpcvers_t)1)
0079 #define PMAPPROC_NULL       ((rpcproc_t)0)
0080 #define PMAPPROC_SET        ((rpcproc_t)1)
0081 #define PMAPPROC_UNSET      ((rpcproc_t)2)
0082 #define PMAPPROC_GETPORT    ((rpcproc_t)3)
0083 #define PMAPPROC_DUMP       ((rpcproc_t)4)
0084 #define PMAPPROC_CALLIT     ((rpcproc_t)5)
0085 
0086 struct pmap {
0087     rpcprog_t pm_prog;
0088     rpcvers_t pm_vers;
0089     rpcprot_t pm_prot;
0090     rpcport_t pm_port;
0091 };
0092 
0093 extern bool_t xdr_pmap(XDR *, struct pmap *);
0094 
0095 struct pmaplist {
0096     struct pmap pml_map;
0097     struct pmaplist *pml_next;
0098 };
0099 
0100 extern bool_t xdr_pmaplist(XDR *, struct pmaplist **);
0101 
0102 GSSRPC__END_DECLS
0103 #endif /* !defined(GSSRPC_PMAP_PROT_H) */