Path: blob/main/crypto/krb5/src/include/gssrpc/pmap_prot.h
34907 views
/* @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC; from 1.14 88/02/08 SMI */1/*2* Copyright (c) 2010, Oracle America, Inc.3*4* All rights reserved.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions are met:8*9* * Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11*12* * Redistributions in binary form must reproduce the above copyright13* notice, this list of conditions and the following disclaimer in14* the documentation and/or other materials provided with the15* distribution.16*17* * Neither the name of the "Oracle America, Inc." nor the names of18* its contributors may be used to endorse or promote products19* derived from this software without specific prior written permission.20*21* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS22* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED23* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A24* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT25* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,26* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED27* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR28* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF29* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING30* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS31* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.32*/3334/*35* pmap_prot.h36* Protocol for the local binder service, or pmap.37*38* The following procedures are supported by the protocol:39*40* PMAPPROC_NULL() returns ()41* takes nothing, returns nothing42*43* PMAPPROC_SET(struct pmap) returns (bool_t)44* TRUE is success, FALSE is failure. Registers the tuple45* [prog, vers, prot, port].46*47* PMAPPROC_UNSET(struct pmap) returns (bool_t)48* TRUE is success, FALSE is failure. Un-registers pair49* [prog, vers]. prot and port are ignored.50*51* PMAPPROC_GETPORT(struct pmap) returns (u_short).52* 0 is failure. Otherwise returns the port number where the pair53* [prog, vers] is registered. It may lie!54*55* PMAPPROC_DUMP() RETURNS (struct pmaplist *)56*57* PMAPPROC_CALLIT(rpcprog_t, rpcvers_t, rpcproc_t, string<>)58* RETURNS (port, string<>);59* usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);60* Calls the procedure on the local machine. If it is not registered,61* this procedure is quite; ie it does not return error information!!!62* This procedure only is supported on rpc/udp and calls via63* rpc/udp. This routine only passes null authentication parameters.64* This file has no interface to xdr routines for PMAPPROC_CALLIT.65*66* The service supports remote procedure calls on udp/ip or tcp/ip socket 111.67*/6869#ifndef GSSRPC_PMAP_PROT_H70#define GSSRPC_PMAP_PROT_H71GSSRPC__BEGIN_DECLS7273#define PMAPPORT ((u_short)111)74#define PMAPPROG ((rpcprog_t)100000)75#define PMAPVERS ((rpcvers_t)2)76#define PMAPVERS_PROTO ((rpcprot_t)2)77#define PMAPVERS_ORIG ((rpcvers_t)1)78#define PMAPPROC_NULL ((rpcproc_t)0)79#define PMAPPROC_SET ((rpcproc_t)1)80#define PMAPPROC_UNSET ((rpcproc_t)2)81#define PMAPPROC_GETPORT ((rpcproc_t)3)82#define PMAPPROC_DUMP ((rpcproc_t)4)83#define PMAPPROC_CALLIT ((rpcproc_t)5)8485struct pmap {86rpcprog_t pm_prog;87rpcvers_t pm_vers;88rpcprot_t pm_prot;89rpcport_t pm_port;90};9192extern bool_t xdr_pmap(XDR *, struct pmap *);9394struct pmaplist {95struct pmap pml_map;96struct pmaplist *pml_next;97};9899extern bool_t xdr_pmaplist(XDR *, struct pmaplist **);100101GSSRPC__END_DECLS102#endif /* !defined(GSSRPC_PMAP_PROT_H) */103104105