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