/* $NetBSD: nfsv2.h,v 1.2 1996/02/26 23:05:23 gwr Exp $ */12/*3* Copyright (c) 1989, 19934* The Regents of the University of California. All rights reserved.5*6* This code is derived from software contributed to Berkeley by7* Rick Macklem at The University of Guelph.8*9* Redistribution and use in source and binary forms, with or without10* modification, are permitted provided that the following conditions11* are met:12* 1. Redistributions of source code must retain the above copyright13* notice, this list of conditions and the following disclaimer.14* 2. Redistributions in binary form must reproduce the above copyright15* notice, this list of conditions and the following disclaimer in the16* documentation and/or other materials provided with the distribution.17* 3. Neither the name of the University nor the names of its contributors18* may be used to endorse or promote products derived from this software19* without specific prior written permission.20*21* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND22* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE23* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE24* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE25* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL26* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS27* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)28* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT29* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY30* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF31* SUCH DAMAGE.32*/3334/*35* nfs definitions as per the version 2 specs36*/3738/*39* Constants as defined in the Sun NFS Version 2 spec.40* "NFS: Network File System Protocol Specification" RFC109441*/4243#define NFS_PORT 204944#define NFS_PROG 10000345#define NFS_VER2 246#define NFS_MAXDGRAMDATA 819247#define NFS_MAXDATA 3276848#define NFS_MAXPATHLEN 102449#define NFS_MAXNAMLEN 25550#define NFS_FHSIZE 3251#define NFS_MAXPKTHDR 40452#define NFS_MAXPACKET (NFS_MAXPKTHDR+NFS_MAXDATA)53#define NFS_MINPACKET 2054#define NFS_FABLKSIZE 512 /* Size in bytes of a block wrt fa_blocks */55#define NFS_READDIRSIZE 10245657/* Stat numbers for rpc returns */58#define NFS_OK 059#define NFSERR_PERM 160#define NFSERR_NOENT 261#define NFSERR_IO 562#define NFSERR_NXIO 663#define NFSERR_ACCES 1364#define NFSERR_EXIST 1765#define NFSERR_NODEV 1966#define NFSERR_NOTDIR 2067#define NFSERR_ISDIR 2168#define NFSERR_FBIG 2769#define NFSERR_NOSPC 2870#define NFSERR_ROFS 3071#define NFSERR_NAMETOL 6372#define NFSERR_NOTEMPTY 6673#define NFSERR_DQUOT 6974#define NFSERR_STALE 7075#define NFSERR_WFLUSH 997677/* Sizes in bytes of various nfs rpc components */78#define NFSX_FH 3279#define NFSX_UNSIGNED 480#define NFSX_FATTR 6881#define NFSX_SATTR 3282#define NFSX_STATFS 2083#define NFSX_COOKIE 48485/* nfs rpc procedure numbers */86#define NFSPROC_NULL 087#define NFSPROC_GETATTR 188#define NFSPROC_SETATTR 289#define NFSPROC_NOOP 390#define NFSPROC_ROOT NFSPROC_NOOP /* Obsolete */91#define NFSPROC_LOOKUP 492#define NFSPROC_READLINK 593#define NFSPROC_READ 694#define NFSPROC_WRITECACHE NFSPROC_NOOP /* Obsolete */95#define NFSPROC_WRITE 896#define NFSPROC_CREATE 997#define NFSPROC_REMOVE 1098#define NFSPROC_RENAME 1199#define NFSPROC_LINK 12100#define NFSPROC_SYMLINK 13101#define NFSPROC_MKDIR 14102#define NFSPROC_RMDIR 15103#define NFSPROC_READDIR 16104#define NFSPROC_STATFS 17105106#define NFS_NPROCS 18107108109/* File types */110typedef enum {111NFNON=0,112NFREG=1,113NFDIR=2,114NFBLK=3,115NFCHR=4,116NFLNK=5117} nfstype;118119120