Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


pmap_prot.h
001: /*
002:  * pmap_prot.h
003:  * Protocol for the local binder service, or pmap.
004:  *
005:  * Copyright (c) 2010, Oracle America, Inc.
006:  *
007:  * Redistribution and use in source and binary forms, with or without
008:  * modification, are permitted provided that the following conditions are
009:  * met:
010:  *
011:  *     * Redistributions of source code must retain the above copyright
012:  *       notice, this list of conditions and the following disclaimer.
013:  *     * Redistributions in binary form must reproduce the above
014:  *       copyright notice, this list of conditions and the following
015:  *       disclaimer in the documentation and/or other materials
016:  *       provided with the distribution.
017:  *     * Neither the name of the "Oracle America, Inc." nor the names of its
018:  *       contributors may be used to endorse or promote products derived
019:  *       from this software without specific prior written permission.
020:  *
021:  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
022:  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
023:  *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
024:  *   FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
025:  *   COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
026:  *   INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
027:  *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
028:  *   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
029:  *   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
030:  *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
031:  *   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
032:  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
033:  */
034: 
035: #ifndef _RPC_PMAP_PROT_H
036: #define _RPC_PMAP_PROT_H        1
037: 
038: #include <features.h>
039: 
040: #include <rpc/xdr.h>
041: 
042: __BEGIN_DECLS
043: 
044: /* The following procedures are supported by the protocol:
045:  *
046:  * PMAPPROC_NULL() returns ()
047:  *      takes nothing, returns nothing
048:  *
049:  * PMAPPROC_SET(struct pmap) returns (bool_t)
050:  *      TRUE is success, FALSE is failure.  Registers the tuple
051:  *      [prog, vers, prot, port].
052:  *
053:  * PMAPPROC_UNSET(struct pmap) returns (bool_t)
054:  *      TRUE is success, FALSE is failure.  Un-registers pair
055:  *      [prog, vers].  prot and port are ignored.
056:  *
057:  * PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
058:  *      0 is failure.  Otherwise returns the port number where the pair
059:  *      [prog, vers] is registered.  It may lie!
060:  *
061:  * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
062:  *
063:  * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
064:  *      RETURNS (port, string<>);
065:  * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
066:  *      Calls the procedure on the local machine.  If it is not registered,
067:  *      this procedure is quite; ie it does not return error information!!!
068:  *      This procedure only is supported on rpc/udp and calls via
069:  *      rpc/udp.  This routine only passes null authentication parameters.
070:  *      This file has no interface to xdr routines for PMAPPROC_CALLIT.
071:  *
072:  * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
073:  */
074: 
075: #define PMAPPORT                ((u_short)111)
076: #define PMAPPROG                ((u_long)100000)
077: #define PMAPVERS                ((u_long)2)
078: #define PMAPVERS_PROTO          ((u_long)2)
079: #define PMAPVERS_ORIG           ((u_long)1)
080: #define PMAPPROC_NULL           ((u_long)0)
081: #define PMAPPROC_SET            ((u_long)1)
082: #define PMAPPROC_UNSET          ((u_long)2)
083: #define PMAPPROC_GETPORT        ((u_long)3)
084: #define PMAPPROC_DUMP           ((u_long)4)
085: #define PMAPPROC_CALLIT         ((u_long)5)
086: 
087: struct pmap {
088:         long unsigned pm_prog;
089:         long unsigned pm_vers;
090:         long unsigned pm_prot;
091:         long unsigned pm_port;
092: };
093: 
094: extern bool_t xdr_pmap (XDR *__xdrs, struct pmap *__regs) __THROW;
095: 
096: struct pmaplist {
097:         struct pmap     pml_map;
098:         struct pmaplist *pml_next;
099: };
100: 
101: extern bool_t xdr_pmaplist (XDR *__xdrs, struct pmaplist **__rp) __THROW;
102: 
103: __END_DECLS
104: 
105: #endif /* rpc/pmap_prot.h */
106: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/