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