1b7899253Schristos /* 2*4da6d876Schristos * Copyright (c) 1997-2014 Erez Zadok 3b7899253Schristos * Copyright (c) 1990 Jan-Simon Pendry 4b7899253Schristos * Copyright (c) 1990 Imperial College of Science, Technology & Medicine 5b7899253Schristos * Copyright (c) 1990 The Regents of the University of California. 6b7899253Schristos * All rights reserved. 7b7899253Schristos * 8b7899253Schristos * This code is derived from software contributed to Berkeley by 9b7899253Schristos * Jan-Simon Pendry at Imperial College, London. 10b7899253Schristos * 11b7899253Schristos * Redistribution and use in source and binary forms, with or without 12b7899253Schristos * modification, are permitted provided that the following conditions 13b7899253Schristos * are met: 14b7899253Schristos * 1. Redistributions of source code must retain the above copyright 15b7899253Schristos * notice, this list of conditions and the following disclaimer. 16b7899253Schristos * 2. Redistributions in binary form must reproduce the above copyright 17b7899253Schristos * notice, this list of conditions and the following disclaimer in the 18b7899253Schristos * documentation and/or other materials provided with the distribution. 19*4da6d876Schristos * 3. Neither the name of the University nor the names of its contributors 20b7899253Schristos * may be used to endorse or promote products derived from this software 21b7899253Schristos * without specific prior written permission. 22b7899253Schristos * 23b7899253Schristos * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24b7899253Schristos * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25b7899253Schristos * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26b7899253Schristos * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27b7899253Schristos * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28b7899253Schristos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29b7899253Schristos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30b7899253Schristos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31b7899253Schristos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32b7899253Schristos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33b7899253Schristos * SUCH DAMAGE. 34b7899253Schristos * 35b7899253Schristos * 36b7899253Schristos * File: am-utils/conf/nfs_prot/nfs_prot_netbsd1_4.h 37b7899253Schristos * 38b7899253Schristos */ 39b7899253Schristos 40b7899253Schristos #ifndef _AMU_NFS_PROT_H 41b7899253Schristos #define _AMU_NFS_PROT_H 42b7899253Schristos 43b7899253Schristos #ifdef HAVE_RPCSVC_NFS_PROT_H 44b7899253Schristos # include <rpcsvc/nfs_prot.h> 45b7899253Schristos #endif /* HAVE_RPCSVC_NFS_PROT_H */ 46b7899253Schristos #ifdef HAVE_NFS_RPCV2_H 47b7899253Schristos # include <nfs/rpcv2.h> 48b7899253Schristos #endif /* HAVE_NFS_RPCV2_H */ 49b7899253Schristos #ifndef NFS_NPROCS 50b7899253Schristos # define NFS_NPROCS 26 51b7899253Schristos #endif /* not NFS_NPROCS */ 52b7899253Schristos #ifdef HAVE_NFS_NFS_H 53b7899253Schristos # include <nfs/nfs.h> 54b7899253Schristos #endif /* HAVE_NFS_NFS_H */ 55b7899253Schristos #ifdef HAVE_NFS_NFSMOUNT_H 56b7899253Schristos # include <nfs/nfsmount.h> 57b7899253Schristos #endif /* HAVE_NFS_NFSMOUNT_H */ 58b7899253Schristos 59b7899253Schristos #ifdef HAVE_UFS_UFS_UFSMOUNT_H 60b7899253Schristos /* netbsd-1.4 does't protect <ufs/ufs/ufsmount.h> */ 61b7899253Schristos # ifndef _UFS_UFS_UFSMOUNT_H 62b7899253Schristos # include <ufs/ufs/ufsmount.h> 63b7899253Schristos # define _UFS_UFS_UFSMOUNT_H 64b7899253Schristos # endif /* not _UFS_UFS_UFSMOUNT_H */ 65b7899253Schristos #endif /* HAVE_UFS_UFS_UFSMOUNT_H */ 66b7899253Schristos 67b7899253Schristos /* NON-NFS STUFF (doesn't really belong here) */ 68b7899253Schristos #ifndef DEFINED_YPALL_CALLBACK_FXN_T 69b7899253Schristos # define DEFINED_YPALL_CALLBACK_FXN_T 70b7899253Schristos #if 0 71b7899253Schristos /* this is RIGHT for 1.2G and 1.2.1 */ 72b7899253Schristos typedef int (*ypall_callback_fxn_t)(u_long, char *, int, char *, int, void *); 73b7899253Schristos #endif /* 0 */ 74b7899253Schristos /* this is right for 1.3beta and newer */ 75b7899253Schristos typedef int (*ypall_callback_fxn_t)(int, char *, int, char *, int, char *); 76b7899253Schristos #endif /* DEFINED_YPALL_CALLBACK_FXN_T */ 77b7899253Schristos 78b7899253Schristos #ifdef HAVE_STATVFS 79b7899253Schristos # define statfs statvfs 80b7899253Schristos #endif /* HAVE_STATVFS */ 81b7899253Schristos 82b7899253Schristos /* 83b7899253Schristos * MACROS: 84b7899253Schristos */ 85b7899253Schristos #define dr_drok_u diropres 86b7899253Schristos #define ca_where where 87b7899253Schristos #define da_fhandle dir 88b7899253Schristos #define da_name name 89b7899253Schristos #define dl_entries entries 90b7899253Schristos #define dl_eof eof 91b7899253Schristos #define dr_status status 92b7899253Schristos #define dr_u diropres_u 93b7899253Schristos #define drok_attributes attributes 94b7899253Schristos #define drok_fhandle file 95b7899253Schristos #define fh_data data 96b7899253Schristos #define la_fhandle from 97b7899253Schristos #define la_to to 98b7899253Schristos #define na_atime atime 99b7899253Schristos #define na_ctime ctime 100b7899253Schristos #define na_fileid fileid 101b7899253Schristos #define na_fsid fsid 102b7899253Schristos #define na_gid gid 103b7899253Schristos #define na_mode mode 104b7899253Schristos #define na_mtime mtime 105b7899253Schristos #define na_nlink nlink 106*4da6d876Schristos #define na_rdev rdev 107b7899253Schristos #define na_size size 108b7899253Schristos #define na_uid uid 109b7899253Schristos #define na_type type 110b7899253Schristos #define ne_cookie cookie 111b7899253Schristos #define ne_fileid fileid 112b7899253Schristos #define ne_name name 113b7899253Schristos #define ne_nextentry nextentry 114b7899253Schristos #define ns_attr_u attributes 115b7899253Schristos #define ns_status status 116b7899253Schristos #define ns_u attrstat_u 117b7899253Schristos #define nt_seconds seconds 118b7899253Schristos #define nt_useconds useconds 119b7899253Schristos #define rda_cookie cookie 120b7899253Schristos #define rda_count count 121b7899253Schristos #define rda_fhandle dir 122b7899253Schristos #define rdr_reply_u reply 123b7899253Schristos #define rdr_status status 124b7899253Schristos #define rdr_u readdirres_u 125b7899253Schristos #define rlr_data_u data 126b7899253Schristos #define rlr_status status 127b7899253Schristos #define rlr_u readlinkres_u 128b7899253Schristos #define rna_from from 129b7899253Schristos #define rna_to to 130b7899253Schristos #define rr_status status 131b7899253Schristos #define sag_fhandle file 132b7899253Schristos #define sfr_reply_u reply 133b7899253Schristos #define sfr_status status 134b7899253Schristos #define sfr_u statfsres_u 135b7899253Schristos #define sfrok_bavail bavail 136b7899253Schristos #define sfrok_bfree bfree 137b7899253Schristos #define sfrok_blocks blocks 138b7899253Schristos #define sfrok_bsize bsize 139b7899253Schristos #define sfrok_tsize tsize 140b7899253Schristos #define sla_from from 141b7899253Schristos #define wra_fhandle file 142b7899253Schristos 143b7899253Schristos 144b7899253Schristos /* 145b7899253Schristos * TYPEDEFS: 146b7899253Schristos */ 147b7899253Schristos typedef attrstat nfsattrstat; 148b7899253Schristos typedef createargs nfscreateargs; 149b7899253Schristos typedef dirlist nfsdirlist; 150b7899253Schristos typedef diropargs nfsdiropargs; 151b7899253Schristos typedef diropres nfsdiropres; 152b7899253Schristos typedef entry nfsentry; 153b7899253Schristos typedef fattr nfsfattr; 154b7899253Schristos typedef ftype nfsftype; 155b7899253Schristos typedef linkargs nfslinkargs; 156b7899253Schristos typedef readargs nfsreadargs; 157b7899253Schristos typedef readdirargs nfsreaddirargs; 158b7899253Schristos typedef readdirres nfsreaddirres; 159b7899253Schristos typedef readlinkres nfsreadlinkres; 160b7899253Schristos typedef readres nfsreadres; 161b7899253Schristos typedef renameargs nfsrenameargs; 162b7899253Schristos typedef sattrargs nfssattrargs; 163b7899253Schristos typedef statfsokres nfsstatfsokres; 164b7899253Schristos typedef statfsres nfsstatfsres; 165b7899253Schristos typedef symlinkargs nfssymlinkargs; 166b7899253Schristos typedef writeargs nfswriteargs; 167b7899253Schristos 168b7899253Schristos /* 169b7899253Schristos * 170b7899253Schristos * NetBSD 1.2 has NFS V3, but it is undefined in the header files. 171b7899253Schristos * so I define everything that's needed for NFS V3 here. 172b7899253Schristos */ 173b7899253Schristos #ifdef NFSMNT_NFSV3 174b7899253Schristos 175b7899253Schristos # define MOUNT_NFS3 MOUNT_NFS 176b7899253Schristos # define MNTOPT_NFS3 "nfs" 177b7899253Schristos 178b7899253Schristos #endif /* NFSMNT_NFSV3 */ 179b7899253Schristos 180b7899253Schristos #endif /* not _AMU_NFS_PROT_H */ 181