138451Smsmith/*	$NetBSD: rpcv2.h,v 1.1 1996/02/26 23:05:32 gwr Exp $	*/
238451Smsmith
338451Smsmith/*
438451Smsmith * Copyright (c) 1989, 1993
538451Smsmith *	The Regents of the University of California.  All rights reserved.
638451Smsmith *
738451Smsmith * This code is derived from software contributed to Berkeley by
838451Smsmith * Rick Macklem at The University of Guelph.
938451Smsmith *
1038451Smsmith * Redistribution and use in source and binary forms, with or without
1138451Smsmith * modification, are permitted provided that the following conditions
1238451Smsmith * are met:
1338451Smsmith * 1. Redistributions of source code must retain the above copyright
1438451Smsmith *    notice, this list of conditions and the following disclaimer.
1538451Smsmith * 2. Redistributions in binary form must reproduce the above copyright
1638451Smsmith *    notice, this list of conditions and the following disclaimer in the
1738451Smsmith *    documentation and/or other materials provided with the distribution.
1838451Smsmith * 4. Neither the name of the University nor the names of its contributors
1938451Smsmith *    may be used to endorse or promote products derived from this software
2038451Smsmith *    without specific prior written permission.
2138451Smsmith *
2238451Smsmith * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2338451Smsmith * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2438451Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2538451Smsmith * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2638451Smsmith * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2738451Smsmith * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2838451Smsmith * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2938451Smsmith * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3038451Smsmith * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3138451Smsmith * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3238451Smsmith * SUCH DAMAGE.
3338451Smsmith *
3438451Smsmith *	@(#)rpcv2.h	8.1 (Berkeley) 6/10/93
35165906Simp *
36165906Simp * $FreeBSD$
3738451Smsmith */
3838451Smsmith
3938451Smsmith/*
4038451Smsmith * Definitions for Sun RPC Version 2, from
4138451Smsmith * "RPC: Remote Procedure Call Protocol Specification" RFC1057
4238451Smsmith */
4338451Smsmith
4438451Smsmith/* Version # */
4538451Smsmith#define	RPC_VER2	2
4638451Smsmith
4738451Smsmith/* Authentication */
4838451Smsmith#define	RPCAUTH_NULL	0
4938451Smsmith#define	RPCAUTH_UNIX	1
5038451Smsmith#define	RPCAUTH_SHORT	2
5138451Smsmith#define	RPCAUTH_MAXSIZ	400
5238451Smsmith#define	RPCAUTH_UNIXGIDS 16
5338451Smsmith
5438451Smsmith/* Rpc Constants */
5538451Smsmith#define	RPC_CALL	0
5638451Smsmith#define	RPC_REPLY	1
5738451Smsmith#define	RPC_MSGACCEPTED	0
5838451Smsmith#define	RPC_MSGDENIED	1
5938451Smsmith#define	RPC_PROGUNAVAIL	1
6038451Smsmith#define	RPC_PROGMISMATCH	2
6138451Smsmith#define	RPC_PROCUNAVAIL	3
6238451Smsmith#define	RPC_GARBAGE	4		/* I like this one */
6338451Smsmith#define	RPC_MISMATCH	0
6438451Smsmith#define	RPC_AUTHERR	1
6538451Smsmith
6638451Smsmith/* Authentication failures */
6738451Smsmith#define	AUTH_BADCRED	1
6838451Smsmith#define	AUTH_REJECTCRED	2
6938451Smsmith#define	AUTH_BADVERF	3
7038451Smsmith#define	AUTH_REJECTVERF	4
7138451Smsmith#define	AUTH_TOOWEAK	5		/* Give em wheaties */
7238451Smsmith
7338451Smsmith/* Sizes of rpc header parts */
7438451Smsmith#define	RPC_SIZ		24
7538451Smsmith#define	RPC_REPLYSIZ	28
7638451Smsmith
7738451Smsmith/* RPC Prog definitions */
7838451Smsmith#define	RPCPROG_MNT	100005
7938451Smsmith#define	RPCMNT_VER1	1
8038451Smsmith#define	RPCMNT_MOUNT	1
8138451Smsmith#define	RPCMNT_DUMP	2
8238451Smsmith#define	RPCMNT_UMOUNT	3
8338451Smsmith#define	RPCMNT_UMNTALL	4
8438451Smsmith#define	RPCMNT_EXPORT	5
8538451Smsmith#define	RPCMNT_NAMELEN	255
8638451Smsmith#define	RPCMNT_PATHLEN	1024
8738451Smsmith#define	RPCPROG_NFS	100003
88