Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/crypto/krb5/src/include/gssrpc/pmap_prot.h
34907 views
1
/* @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC; from 1.14 88/02/08 SMI */
2
/*
3
* Copyright (c) 2010, Oracle America, Inc.
4
*
5
* All rights reserved.
6
*
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions are met:
9
*
10
* * Redistributions of source code must retain the above copyright
11
* notice, this list of conditions and the following disclaimer.
12
*
13
* * Redistributions in binary form must reproduce the above copyright
14
* notice, this list of conditions and the following disclaimer in
15
* the documentation and/or other materials provided with the
16
* distribution.
17
*
18
* * Neither the name of the "Oracle America, Inc." nor the names of
19
* its contributors may be used to endorse or promote products
20
* derived from this software without specific prior written permission.
21
*
22
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
23
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
24
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
25
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
28
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
29
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
30
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
31
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
*/
34
35
/*
36
* pmap_prot.h
37
* Protocol for the local binder service, or pmap.
38
*
39
* The following procedures are supported by the protocol:
40
*
41
* PMAPPROC_NULL() returns ()
42
* takes nothing, returns nothing
43
*
44
* PMAPPROC_SET(struct pmap) returns (bool_t)
45
* TRUE is success, FALSE is failure. Registers the tuple
46
* [prog, vers, prot, port].
47
*
48
* PMAPPROC_UNSET(struct pmap) returns (bool_t)
49
* TRUE is success, FALSE is failure. Un-registers pair
50
* [prog, vers]. prot and port are ignored.
51
*
52
* PMAPPROC_GETPORT(struct pmap) returns (u_short).
53
* 0 is failure. Otherwise returns the port number where the pair
54
* [prog, vers] is registered. It may lie!
55
*
56
* PMAPPROC_DUMP() RETURNS (struct pmaplist *)
57
*
58
* PMAPPROC_CALLIT(rpcprog_t, rpcvers_t, rpcproc_t, string<>)
59
* RETURNS (port, string<>);
60
* usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
61
* Calls the procedure on the local machine. If it is not registered,
62
* this procedure is quite; ie it does not return error information!!!
63
* This procedure only is supported on rpc/udp and calls via
64
* rpc/udp. This routine only passes null authentication parameters.
65
* This file has no interface to xdr routines for PMAPPROC_CALLIT.
66
*
67
* The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
68
*/
69
70
#ifndef GSSRPC_PMAP_PROT_H
71
#define GSSRPC_PMAP_PROT_H
72
GSSRPC__BEGIN_DECLS
73
74
#define PMAPPORT ((u_short)111)
75
#define PMAPPROG ((rpcprog_t)100000)
76
#define PMAPVERS ((rpcvers_t)2)
77
#define PMAPVERS_PROTO ((rpcprot_t)2)
78
#define PMAPVERS_ORIG ((rpcvers_t)1)
79
#define PMAPPROC_NULL ((rpcproc_t)0)
80
#define PMAPPROC_SET ((rpcproc_t)1)
81
#define PMAPPROC_UNSET ((rpcproc_t)2)
82
#define PMAPPROC_GETPORT ((rpcproc_t)3)
83
#define PMAPPROC_DUMP ((rpcproc_t)4)
84
#define PMAPPROC_CALLIT ((rpcproc_t)5)
85
86
struct pmap {
87
rpcprog_t pm_prog;
88
rpcvers_t pm_vers;
89
rpcprot_t pm_prot;
90
rpcport_t pm_port;
91
};
92
93
extern bool_t xdr_pmap(XDR *, struct pmap *);
94
95
struct pmaplist {
96
struct pmap pml_map;
97
struct pmaplist *pml_next;
98
};
99
100
extern bool_t xdr_pmaplist(XDR *, struct pmaplist **);
101
102
GSSRPC__END_DECLS
103
#endif /* !defined(GSSRPC_PMAP_PROT_H) */
104
105