1*ca987d46SWarner Losh /* $NetBSD: rpcv2.h,v 1.1 1996/02/26 23:05:32 gwr Exp $ */ 2*ca987d46SWarner Losh 3*ca987d46SWarner Losh /* 4*ca987d46SWarner Losh * Copyright (c) 1989, 1993 5*ca987d46SWarner Losh * The Regents of the University of California. All rights reserved. 6*ca987d46SWarner Losh * 7*ca987d46SWarner Losh * This code is derived from software contributed to Berkeley by 8*ca987d46SWarner Losh * Rick Macklem at The University of Guelph. 9*ca987d46SWarner Losh * 10*ca987d46SWarner Losh * Redistribution and use in source and binary forms, with or without 11*ca987d46SWarner Losh * modification, are permitted provided that the following conditions 12*ca987d46SWarner Losh * are met: 13*ca987d46SWarner Losh * 1. Redistributions of source code must retain the above copyright 14*ca987d46SWarner Losh * notice, this list of conditions and the following disclaimer. 15*ca987d46SWarner Losh * 2. Redistributions in binary form must reproduce the above copyright 16*ca987d46SWarner Losh * notice, this list of conditions and the following disclaimer in the 17*ca987d46SWarner Losh * documentation and/or other materials provided with the distribution. 18*ca987d46SWarner Losh * 3. Neither the name of the University nor the names of its contributors 19*ca987d46SWarner Losh * may be used to endorse or promote products derived from this software 20*ca987d46SWarner Losh * without specific prior written permission. 21*ca987d46SWarner Losh * 22*ca987d46SWarner Losh * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23*ca987d46SWarner Losh * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24*ca987d46SWarner Losh * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25*ca987d46SWarner Losh * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26*ca987d46SWarner Losh * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27*ca987d46SWarner Losh * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28*ca987d46SWarner Losh * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29*ca987d46SWarner Losh * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30*ca987d46SWarner Losh * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31*ca987d46SWarner Losh * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32*ca987d46SWarner Losh * SUCH DAMAGE. 33*ca987d46SWarner Losh */ 34*ca987d46SWarner Losh 35*ca987d46SWarner Losh /* 36*ca987d46SWarner Losh * Definitions for Sun RPC Version 2, from 37*ca987d46SWarner Losh * "RPC: Remote Procedure Call Protocol Specification" RFC1057 38*ca987d46SWarner Losh */ 39*ca987d46SWarner Losh 40*ca987d46SWarner Losh /* Version # */ 41*ca987d46SWarner Losh #define RPC_VER2 2 42*ca987d46SWarner Losh 43*ca987d46SWarner Losh /* Authentication */ 44*ca987d46SWarner Losh #define RPCAUTH_NULL 0 45*ca987d46SWarner Losh #define RPCAUTH_UNIX 1 46*ca987d46SWarner Losh #define RPCAUTH_SHORT 2 47*ca987d46SWarner Losh #define RPCAUTH_MAXSIZ 400 48*ca987d46SWarner Losh #define RPCAUTH_UNIXGIDS 16 49*ca987d46SWarner Losh 50*ca987d46SWarner Losh /* Rpc Constants */ 51*ca987d46SWarner Losh #define RPC_CALL 0 52*ca987d46SWarner Losh #define RPC_REPLY 1 53*ca987d46SWarner Losh #define RPC_MSGACCEPTED 0 54*ca987d46SWarner Losh #define RPC_MSGDENIED 1 55*ca987d46SWarner Losh #define RPC_PROGUNAVAIL 1 56*ca987d46SWarner Losh #define RPC_PROGMISMATCH 2 57*ca987d46SWarner Losh #define RPC_PROCUNAVAIL 3 58*ca987d46SWarner Losh #define RPC_GARBAGE 4 /* I like this one */ 59*ca987d46SWarner Losh #define RPC_MISMATCH 0 60*ca987d46SWarner Losh #define RPC_AUTHERR 1 61*ca987d46SWarner Losh 62*ca987d46SWarner Losh /* Authentication failures */ 63*ca987d46SWarner Losh #define AUTH_BADCRED 1 64*ca987d46SWarner Losh #define AUTH_REJECTCRED 2 65*ca987d46SWarner Losh #define AUTH_BADVERF 3 66*ca987d46SWarner Losh #define AUTH_REJECTVERF 4 67*ca987d46SWarner Losh #define AUTH_TOOWEAK 5 /* Give em wheaties */ 68*ca987d46SWarner Losh 69*ca987d46SWarner Losh /* Sizes of rpc header parts */ 70*ca987d46SWarner Losh #define RPC_SIZ 24 71*ca987d46SWarner Losh #define RPC_REPLYSIZ 28 72*ca987d46SWarner Losh 73*ca987d46SWarner Losh /* RPC Prog definitions */ 74*ca987d46SWarner Losh #define RPCPROG_MNT 100005 75*ca987d46SWarner Losh #define RPCMNT_VER1 1 76*ca987d46SWarner Losh #define RPCMNT_MOUNT 1 77*ca987d46SWarner Losh #define RPCMNT_DUMP 2 78*ca987d46SWarner Losh #define RPCMNT_UMOUNT 3 79*ca987d46SWarner Losh #define RPCMNT_UMNTALL 4 80*ca987d46SWarner Losh #define RPCMNT_EXPORT 5 81*ca987d46SWarner Losh #define RPCMNT_NAMELEN 255 82*ca987d46SWarner Losh #define RPCMNT_PATHLEN 1024 83*ca987d46SWarner Losh #define RPCPROG_NFS 100003 84