xref: /csrg-svn/sys/nfs/rpcv2.h (revision 41896)
1 /*
2  * Copyright (c) 1989 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Rick Macklem at The University of Guelph.
7  *
8  * Redistribution and use in source and binary forms are permitted
9  * provided that the above copyright notice and this paragraph are
10  * duplicated in all such forms and that any documentation,
11  * advertising materials, and other materials related to such
12  * distribution and use acknowledge that the software was developed
13  * by the University of California, Berkeley.  The name of the
14  * University may not be used to endorse or promote products derived
15  * from this software without specific prior written permission.
16  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19  *
20  *	@(#)rpcv2.h	7.3 (Berkeley) 05/14/90
21  */
22 
23 /*
24  * Definitions for Sun RPC Version 2, from
25  * "RPC: Remote Procedure Call Protocol Specification" RFC1057
26  */
27 
28 /* Version # */
29 #define	RPC_VER2	2
30 
31 /* Authentication */
32 #define	RPCAUTH_NULL	0
33 #define	RPCAUTH_UNIX	1
34 #define	RPCAUTH_SHORT	2
35 #define	RPCAUTH_MAXSIZ	400
36 #define	RPCAUTH_UNIXGIDS 16
37 
38 /* Rpc Constants */
39 #define	RPC_CALL	0
40 #define	RPC_REPLY	1
41 #define	RPC_MSGACCEPTED	0
42 #define	RPC_MSGDENIED	1
43 #define	RPC_PROGUNAVAIL	1
44 #define	RPC_PROGMISMATCH	2
45 #define	RPC_PROCUNAVAIL	3
46 #define	RPC_GARBAGE	4		/* I like this one */
47 #define	RPC_MISMATCH	0
48 #define	RPC_AUTHFAIL	1
49 
50 /* Authentication failures */
51 #define	AUTH_BADCRED	1
52 #define	AUTH_REJECTCRED	2
53 #define	AUTH_BADVERF	3
54 #define	AUTH_REJECTVERF	4
55 #define	AUTH_TOOWEAK	5		/* Give em wheaties */
56 
57 /* Sizes of rpc header parts */
58 #define	RPC_SIZ		24
59 #define	RPC_REPLYSIZ	28
60 
61 /* RPC Prog definitions */
62 #define	RPCPROG_MNT	100005
63 #define	RPCMNT_VER1	1
64 #define	RPCMNT_MOUNT	1
65 #define	RPCMNT_DUMP	2
66 #define	RPCMNT_UMOUNT	3
67 #define	RPCMNT_UMNTALL	4
68 #define	RPCMNT_EXPORT	5
69 #define	RPCMNT_NAMELEN	255
70 #define	RPCMNT_PATHLEN	1024
71 #define	RPCPROG_NFS	100003
72