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