1 /* $NetBSD: nfs_prot_netbsd.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_netbsd.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_RPCV2_H 49 # include <nfs/rpcv2.h> 50 #endif /* HAVE_NFS_RPCV2_H */ 51 52 #ifndef NFS_NPROCS 53 # define NFS_NPROCS 26 54 #endif /* not NFS_NPROCS */ 55 #ifdef HAVE_NFS_NFS_H 56 # include <nfs/nfs.h> 57 #endif /* HAVE_NFS_NFS_H */ 58 59 /* NON-NFS STUFF (doesn't really belong here) */ 60 #ifndef DEFINED_YPALL_CALLBACK_FXN_T 61 # define DEFINED_YPALL_CALLBACK_FXN_T 62 /* this is RIGHT for 1.2G and 1.2.1 */ 63 typedef int (*ypall_callback_fxn_t)(u_long, char *, int, char *, int, void *); 64 #if 0 65 /* this is right for 1.3beta */ 66 typedef int (*ypall_callback_fxn_t)(int, char *, int, char *, int, char *); 67 #endif /* 0 */ 68 #endif /* DEFINED_YPALL_CALLBACK_FXN_T */ 69 70 71 /* 72 * MACROS: 73 */ 74 #define dr_drok_u diropres 75 #define ca_where where 76 #define da_fhandle dir 77 #define da_name name 78 #define dl_entries entries 79 #define dl_eof eof 80 #define dr_status status 81 #define dr_u diropres_u 82 #define drok_attributes attributes 83 #define drok_fhandle file 84 #define fh_data data 85 #define la_fhandle from 86 #define la_to to 87 #define na_atime atime 88 #define na_ctime ctime 89 #define na_fileid fileid 90 #define na_fsid fsid 91 #define na_mode mode 92 #define na_mtime mtime 93 #define na_nlink nlink 94 #define na_size size 95 #define na_type type 96 #define ne_cookie cookie 97 #define ne_fileid fileid 98 #define ne_name name 99 #define ne_nextentry nextentry 100 #define ns_attr_u attributes 101 #define ns_status status 102 #define ns_u attrstat_u 103 #define nt_seconds seconds 104 #define nt_useconds useconds 105 #define rda_cookie cookie 106 #define rda_count count 107 #define rda_fhandle dir 108 #define rdr_reply_u reply 109 #define rdr_status status 110 #define rdr_u readdirres_u 111 #define rlr_data_u data 112 #define rlr_status status 113 #define rlr_u readlinkres_u 114 #define rna_from from 115 #define rna_to to 116 #define rr_status status 117 #define sag_fhandle file 118 #define sfr_reply_u reply 119 #define sfr_status status 120 #define sfr_u statfsres_u 121 #define sfrok_bavail bavail 122 #define sfrok_bfree bfree 123 #define sfrok_blocks blocks 124 #define sfrok_bsize bsize 125 #define sfrok_tsize tsize 126 #define sla_from from 127 #define wra_fhandle file 128 129 130 /* 131 * TYPEDEFS: 132 */ 133 typedef attrstat nfsattrstat; 134 typedef createargs nfscreateargs; 135 typedef dirlist nfsdirlist; 136 typedef diropargs nfsdiropargs; 137 typedef diropres nfsdiropres; 138 typedef entry nfsentry; 139 typedef fattr nfsfattr; 140 typedef ftype nfsftype; 141 typedef linkargs nfslinkargs; 142 typedef readargs nfsreadargs; 143 typedef readdirargs nfsreaddirargs; 144 typedef readdirres nfsreaddirres; 145 typedef readlinkres nfsreadlinkres; 146 typedef readres nfsreadres; 147 typedef renameargs nfsrenameargs; 148 typedef sattrargs nfssattrargs; 149 typedef statfsokres nfsstatfsokres; 150 typedef statfsres nfsstatfsres; 151 typedef symlinkargs nfssymlinkargs; 152 typedef writeargs nfswriteargs; 153 154 155 /* 156 * 157 * NetBSD 1.2 has NFS V3, but it is undefined in the header files. 158 * so I define everything that's needed for NFS V3 here. 159 */ 160 #ifdef NFSMNT_NFSV3 161 162 # define MOUNT_NFS3 MOUNT_NFS 163 # define MNTOPT_NFS3 "nfs" 164 165 #endif /* NFSMNT_NFSV3 */ 166 167 #endif /* not _AMU_NFS_PROT_H */ 168