]> git.saurik.com Git - apple/libinfo.git/blame - rpc.subproj/pmap_prot.h
Libinfo-392.tar.gz
[apple/libinfo.git] / rpc.subproj / pmap_prot.h
CommitLineData
03fb6eb0
A
1/*
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
ad21edcc
A
6 * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.1 (the "License"). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
12 * this file.
03fb6eb0
A
13 *
14 * The Original Code and all software distributed under the License are
ad21edcc 15 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
03fb6eb0
A
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
ad21edcc
A
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
20 * under the License.
03fb6eb0
A
21 *
22 * @APPLE_LICENSE_HEADER_END@
23 */
24/*
25 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
26 * unrestricted use provided that this legend is included on all tape
27 * media and as a part of the software program in whole or part. Users
28 * may copy or modify Sun RPC without charge, but are not authorized
29 * to license or distribute it to anyone else except as part of a product or
30 * program developed by the user.
31 *
32 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
33 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
34 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
35 *
36 * Sun RPC is provided with no support and without any obligation on the
37 * part of Sun Microsystems, Inc. to assist in its use, correction,
38 * modification or enhancement.
39 *
40 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
41 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
42 * OR ANY PART THEREOF.
43 *
44 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
45 * or profits or other special, indirect and consequential damages, even if
46 * Sun has been advised of the possibility of such damages.
47 *
48 * Sun Microsystems, Inc.
49 * 2550 Garcia Avenue
50 * Mountain View, California 94043
51 *
52 * from: @(#)pmap_prot.h 1.14 88/02/08 SMI
53 * from: @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC
c29f2fcc 54 * $Id: pmap_prot.h,v 1.3 2004/10/28 21:58:22 emoy Exp $
03fb6eb0
A
55 */
56
57/*
58 * pmap_prot.h
59 * Protocol for the local binder service, or pmap.
60 *
61 * Copyright (C) 1984, Sun Microsystems, Inc.
62 *
63 * The following procedures are supported by the protocol:
64 *
65 * PMAPPROC_NULL() returns ()
66 * takes nothing, returns nothing
67 *
68 * PMAPPROC_SET(struct pmap) returns (bool_t)
69 * TRUE is success, FALSE is failure. Registers the tuple
70 * [prog, vers, prot, port].
71 *
72 * PMAPPROC_UNSET(struct pmap) returns (bool_t)
73 * TRUE is success, FALSE is failure. Un-registers pair
74 * [prog, vers]. prot and port are ignored.
75 *
76 * PMAPPROC_GETPORT(struct pmap) returns (long unsigned).
77 * 0 is failure. Otherwise returns the port number where the pair
78 * [prog, vers] is registered. It may lie!
79 *
80 * PMAPPROC_DUMP() RETURNS (struct pmaplist *)
81 *
82 * PMAPPROC_CALLIT(unsigned, unsigned, unsigned, string<>)
83 * RETURNS (port, string<>);
84 * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs);
85 * Calls the procedure on the local machine. If it is not registered,
86 * this procedure is quite; ie it does not return error information!!!
87 * This procedure only is supported on rpc/udp and calls via
88 * rpc/udp. This routine only passes null authentication parameters.
89 * This file has no interface to xdr routines for PMAPPROC_CALLIT.
90 *
91 * The service supports remote procedure calls on udp/ip or tcp/ip socket 111.
92 */
93
94#ifndef _RPC_PMAPPROT_H
95#define _RPC_PMAPPROT_H
96#include <sys/cdefs.h>
97
c29f2fcc 98#define PMAPPORT ((unsigned short)111)
b3dd680f
A
99#ifdef __LP64__
100#define PMAPPROG ((unsigned int)100000)
101#define PMAPVERS ((unsigned int)2)
102#define PMAPVERS_PROTO ((unsigned int)2)
103#define PMAPVERS_ORIG ((unsigned int)1)
104#define PMAPPROC_NULL ((unsigned int)0)
105#define PMAPPROC_SET ((unsigned int)1)
106#define PMAPPROC_UNSET ((unsigned int)2)
107#define PMAPPROC_GETPORT ((unsigned int)3)
108#define PMAPPROC_DUMP ((unsigned int)4)
109#define PMAPPROC_CALLIT ((unsigned int)5)
110#else
c29f2fcc
A
111#define PMAPPROG ((unsigned long)100000)
112#define PMAPVERS ((unsigned long)2)
113#define PMAPVERS_PROTO ((unsigned long)2)
114#define PMAPVERS_ORIG ((unsigned long)1)
115#define PMAPPROC_NULL ((unsigned long)0)
116#define PMAPPROC_SET ((unsigned long)1)
117#define PMAPPROC_UNSET ((unsigned long)2)
118#define PMAPPROC_GETPORT ((unsigned long)3)
119#define PMAPPROC_DUMP ((unsigned long)4)
120#define PMAPPROC_CALLIT ((unsigned long)5)
b3dd680f 121#endif
03fb6eb0
A
122
123struct pmap {
b3dd680f
A
124#ifdef __LP64__
125 unsigned int pm_prog;
126 unsigned int pm_vers;
127 unsigned int pm_prot;
128 unsigned int pm_port;
129#else
03fb6eb0
A
130 long unsigned pm_prog;
131 long unsigned pm_vers;
132 long unsigned pm_prot;
133 long unsigned pm_port;
b3dd680f 134#endif
03fb6eb0
A
135};
136
137struct pmaplist {
138 struct pmap pml_map;
139 struct pmaplist *pml_next;
140};
141
142__BEGIN_DECLS
143extern bool_t xdr_pmap __P((XDR *, struct pmap *));
144extern bool_t xdr_pmaplist __P((XDR *, struct pmaplist **));
145__END_DECLS
146
147#endif /* !_RPC_PMAPPROT_H */