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