* Copyright (c) 1989 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* Rick Macklem at The University of Guelph.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* From: @(#)nfsv2.h 7.8 (Berkeley) 6/28/90
* nfs definitions as per the version 2 specs
* Constants as defined in the Sun NFS Version 2 spec.
* "NFS: Network File System Protocol Specification" RFC1094
#define NFS_MAXDGRAMDATA 8192
#define NFS_MAXDATA 32768
#define NFS_MAXPATHLEN 1024
#define NFS_MAXNAMLEN 255
#define NFS_MAXPKTHDR 404
#define NFS_MAXPACKET (NFS_MAXPKTHDR+NFS_MAXDATA)
#define NFS_FABLKSIZE 512 /* Size in bytes of a block wrt fa_blocks */
/* Stat numbers for rpc returns */
#define NFSERR_NAMETOOLONG 63
#define NFSERR_NOTEMPTY 66
/* Sizes in bytes of various nfs rpc components */
/* nfs rpc procedure numbers */
#define NFSPROC_GETATTR 1
#define NFSPROC_SETATTR 2
#define NFSPROC_ROOT 3 /* Obsolete */
#define NFSPROC_NOOP 3 /* Fake for err returns XXX 08 Sep 92*/
#define NFSPROC_READLINK 5
#define NFSPROC_WRITECACHE 7 /* Obsolete */
#define NFSPROC_REMOVE 10
#define NFSPROC_RENAME 11
#define NFSPROC_SYMLINK 13
#define NFSPROC_READDIR 16
#define NFSPROC_STATFS 17
#define vtonfs_mode(t,m) \
txdr_unsigned(((t) == VFIFO) ? MAKEIMODE(VCHR, (m)) : \
#define nfstov_mode(a) (fxdr_unsigned(u_short, (a))&07777)
#define vtonfs_type(a) txdr_unsigned(nfs_type[((long)(a))])
#define nfstov_type(a) ntov_type[fxdr_unsigned(u_long,(a))&0x7]
typedef enum { NFNON
=0, NFREG
=1, NFDIR
=2, NFBLK
=3, NFCHR
=4, NFLNK
=5 } nfstype
;
/* Structs for common parts of the rpc's */
struct nfsv2_time fa_atime
;
struct nfsv2_time fa_mtime
;
struct nfsv2_time fa_ctime
;
struct nfsv2_time sa_atime
;
struct nfsv2_time sa_mtime
;