]> git.saurik.com Git - apple/xnu.git/blame - bsd/nfs/rpcv2.h
xnu-6153.141.1.tar.gz
[apple/xnu.git] / bsd / nfs / rpcv2.h
CommitLineData
1c79356b 1/*
cb323159 2 * Copyright (c) 2000-2018 Apple Inc. All rights reserved.
5d5c5d0d 3 *
2d21ac55 4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
0a7de745 5 *
2d21ac55
A
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
0a7de745 14 *
2d21ac55
A
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
0a7de745 17 *
2d21ac55
A
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
8f6c56a5
A
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2d21ac55
A
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
0a7de745 25 *
2d21ac55 26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
1c79356b
A
27 */
28/* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */
29/*
30 * Copyright (c) 1989, 1993
31 * The Regents of the University of California. All rights reserved.
32 *
33 * This code is derived from software contributed to Berkeley by
34 * Rick Macklem at The University of Guelph.
35 *
36 * Redistribution and use in source and binary forms, with or without
37 * modification, are permitted provided that the following conditions
38 * are met:
39 * 1. Redistributions of source code must retain the above copyright
40 * notice, this list of conditions and the following disclaimer.
41 * 2. Redistributions in binary form must reproduce the above copyright
42 * notice, this list of conditions and the following disclaimer in the
43 * documentation and/or other materials provided with the distribution.
44 * 3. All advertising materials mentioning features or use of this software
45 * must display the following acknowledgement:
46 * This product includes software developed by the University of
47 * California, Berkeley and its contributors.
48 * 4. Neither the name of the University nor the names of its contributors
49 * may be used to endorse or promote products derived from this software
50 * without specific prior written permission.
51 *
52 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
53 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
54 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
55 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
56 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
57 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
58 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
59 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
60 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
61 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
62 * SUCH DAMAGE.
63 *
64 * @(#)rpcv2.h 8.2 (Berkeley) 3/30/95
65 * FreeBSD-Id: rpcv2.h,v 1.8 1997/05/11 18:05:39 tegge Exp $
66 */
67
68
69#ifndef _NFS_RPCV2_H_
70#define _NFS_RPCV2_H_
71
9bccf70c
A
72#include <sys/appleapiopts.h>
73
74#ifdef __APPLE_API_PRIVATE
1c79356b
A
75/*
76 * Definitions for Sun RPC Version 2, from
77 * "RPC: Remote Procedure Call Protocol Specification" RFC1057
78 */
79
80/* Version # */
0a7de745 81#define RPC_VER2 2
1c79356b
A
82
83/* Authentication */
0a7de745
A
84#define RPCAUTH_NULL 0
85#define RPCAUTH_NONE RPCAUTH_NULL
86#define RPCAUTH_UNIX 1
87#define RPCAUTH_SYS RPCAUTH_UNIX
88#define RPCAUTH_SHORT 2
89#define RPCAUTH_KERB4 4
90#define RPCAUTH_KRB5 390003
91#define RPCAUTH_KRB5I 390004
92#define RPCAUTH_KRB5P 390005
93#define RPCAUTH_INVALID ~0U
94#define RPCAUTH_UNKNOWN RPCAUTH_INVALID
2d21ac55 95
0a7de745
A
96#define RPCAUTH_MAXSIZ 400
97#define RPCAUTH_UNIXGIDS 16
1c79356b
A
98
99/*
100 * Constants associated with authentication flavours.
101 */
0a7de745
A
102#define RPCAKN_FULLNAME 0
103#define RPCAKN_NICKNAME 1
1c79356b
A
104
105/* Rpc Constants */
0a7de745
A
106#define RPC_CALL 0
107#define RPC_REPLY 1
108#define RPC_MSGACCEPTED 0
109#define RPC_MSGDENIED 1
110#define RPC_SUCCESS 0
111#define RPC_PROGUNAVAIL 1
112#define RPC_PROGMISMATCH 2
113#define RPC_PROCUNAVAIL 3
114#define RPC_GARBAGE 4 /* I like this one */
115#define RPC_SYSTEM_ERR 5
116#define RPC_MISMATCH 0
117#define RPC_AUTHERR 1
1c79356b
A
118
119/* Authentication failures */
0a7de745
A
120#define AUTH_BADCRED 1
121#define AUTH_REJECTCRED 2
122#define AUTH_BADVERF 3
123#define AUTH_REJECTVERF 4
124#define AUTH_TOOWEAK 5 /* Give em wheaties */
125#define AUTH_INVALIDRESP 6
126#define AUTH_FAILED 7
127#define AUTH_KERB_GENERIC 8
128#define AUTH_TIMEEXPIRE 9
129#define AUTH_TKT_FILE 10
130#define AUTH_DECODE 11
131#define AUTH_NET_ADDR 12
132#define RPCSEC_GSS_CREDPROBLEM 13
133#define RPCSEC_GSS_CTXPROBLEM 14
1c79356b
A
134
135/* Sizes of rpc header parts */
0a7de745
A
136#define RPC_SIZ 24
137#define RPC_REPLYSIZ 28
1c79356b
A
138
139/* RPC Prog definitions */
0a7de745
A
140#define RPCPROG_MNT 100005
141#define RPCMNT_VER1 1
142#define RPCMNT_VER3 3
143#define RPCMNT_MOUNT 1
144#define RPCMNT_DUMP 2
145#define RPCMNT_UMOUNT 3
146#define RPCMNT_UMNTALL 4
147#define RPCMNT_EXPORT 5
148#define RPCMNT_NAMELEN 255
149#define RPCMNT_PATHLEN 1024
150#define RPCPROG_NFS 100003
1c79356b 151
0a7de745
A
152#define RPCPROG_RQUOTA 100011
153#define RPCRQUOTA_VER 1
154#define RPCRQUOTA_EXT_VER 2
155#define RPCRQUOTA_GET 1
156#define RQUOTA_STAT_OK 1
157#define RQUOTA_STAT_NOQUOTA 2
158#define RQUOTA_STAT_EPERM 3
9bccf70c 159
cb323159
A
160/* Local transports for rpcbind */
161#define RPCB_TICOTSORD_PATH "/var/run/rpcb.ticotsord"
162#define RPCB_TICLTS_PATH "/var/run/rpcb.ticlst"
163
164/* Local transport for nfs */
165#define NFS_TICOTSORD_PATH "/var/ran/nfs.ticotsord"
166#define NFS_TICLTS_PATH "/var/run/nfs.ticlts"
167
9bccf70c
A
168#endif /* __APPLE_API_PRIVATE */
169#endif /* _NFS_RPCV2_H_ */