]> git.saurik.com Git - apple/libinfo.git/blame - rpc.subproj/pmap_prot.h
Libinfo-89.1.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 *
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.
13 *
14 * The Original Code and all software distributed under the License are
15 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
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.
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
54 * $Id: pmap_prot.h,v 1.2 1999/10/14 21:56:53 wsanchez Exp $
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
98#define PMAPPORT ((u_short)111)
99#define PMAPPROG ((u_long)100000)
100#define PMAPVERS ((u_long)2)
101#define PMAPVERS_PROTO ((u_long)2)
102#define PMAPVERS_ORIG ((u_long)1)
103#define PMAPPROC_NULL ((u_long)0)
104#define PMAPPROC_SET ((u_long)1)
105#define PMAPPROC_UNSET ((u_long)2)
106#define PMAPPROC_GETPORT ((u_long)3)
107#define PMAPPROC_DUMP ((u_long)4)
108#define PMAPPROC_CALLIT ((u_long)5)
109
110struct pmap {
111 long unsigned pm_prog;
112 long unsigned pm_vers;
113 long unsigned pm_prot;
114 long unsigned pm_port;
115};
116
117struct pmaplist {
118 struct pmap pml_map;
119 struct pmaplist *pml_next;
120};
121
122__BEGIN_DECLS
123extern bool_t xdr_pmap __P((XDR *, struct pmap *));
124extern bool_t xdr_pmaplist __P((XDR *, struct pmaplist **));
125__END_DECLS
126
127#endif /* !_RPC_PMAPPROT_H */