1 /* $NetBSD: nfs_prot_aix4.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_aix4.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 #ifdef HAVE_SYS_FS_NFS_H 55 # include <sys/fs/nfs.h> 56 #endif /* HAVE_SYS_FS_NFS_H */ 57 #ifdef HAVE_RPCSVC_MOUNT_H 58 # include <rpcsvc/mount.h> 59 #endif /* HAVE_RPCSVC_MOUNT_H */ 60 61 62 /* 63 * MACROS 64 */ 65 66 #ifndef MNTPATHLEN 67 # define MNTPATHLEN 1024 68 #endif /* not MNTPATHLEN */ 69 #ifndef MNTNAMLEN 70 # define MNTNAMLEN 255 71 #endif /* not MNTNAMLEN */ 72 73 /* map field names */ 74 #define ex_dir ex_name 75 #define gr_name g_name 76 #define gr_next g_next 77 #define ml_directory ml_path 78 #define ml_hostname ml_name 79 #define ml_next ml_nxt 80 81 #define dr_drok_u diropres 82 #define ca_attributes attributes 83 #define ca_where where 84 #define da_fhandle dir 85 #define da_name name 86 #define dl_entries entries 87 #define dl_eof eof 88 #define dr_status status 89 #define dr_u diropres_u 90 #define drok_attributes attributes 91 #define drok_fhandle file 92 #define fh_data data 93 #define la_fhandle from 94 #define la_to to 95 #define na_atime atime 96 #define na_blocks blocks 97 #define na_blocksize blocksize 98 #define na_ctime ctime 99 #define na_fileid fileid 100 #define na_fsid fsid 101 #define na_gid gid 102 #define na_mode mode 103 #define na_mtime mtime 104 #define na_nlink nlink 105 #define na_rdev rdev 106 #define na_size size 107 #define na_type type 108 #define na_uid uid 109 #define ne_cookie cookie 110 #define ne_fileid fileid 111 #define ne_name name 112 #define ne_nextentry nextentry 113 #define ns_attr_u attributes 114 #define ns_status status 115 #define ns_u attrstat_u 116 #define nt_seconds seconds 117 #define nt_useconds useconds 118 #define ra_count count 119 #define ra_fhandle file 120 #define ra_offset offset 121 #define ra_totalcount totalcount 122 #define raok_attributes attributes 123 #define raok_len_u data_len 124 #define raok_u data 125 #define raok_val_u data_val 126 #define rda_cookie cookie 127 #define rda_count count 128 #define rda_fhandle dir 129 #define rdr_reply_u reply 130 #define rdr_status status 131 #define rdr_u readdirres_u 132 #define rlr_data_u data 133 #define rlr_status status 134 #define rlr_u readlinkres_u 135 #define rna_from from 136 #define rna_to to 137 #define rr_reply_u reply 138 #define rr_status status 139 #define rr_u readres_u 140 #define sa_atime atime 141 #define sa_gid gid 142 #define sa_mode mode 143 #define sa_mtime mtime 144 #define sa_size size 145 #define sa_uid uid 146 #define sag_attributes attributes 147 #define sag_fhandle file 148 #define sfr_reply_u reply 149 #define sfr_status status 150 #define sfr_u statfsres_u 151 #define sfrok_bavail bavail 152 #define sfrok_bfree bfree 153 #define sfrok_blocks blocks 154 #define sfrok_bsize bsize 155 #define sfrok_tsize tsize 156 #define sla_attributes attributes 157 #define sla_from from 158 #define sla_to to 159 #define wra_beginoffset beginoffset 160 #define wra_fhandle file 161 #define wra_len_u data_len 162 #define wra_offset offset 163 #define wra_totalcount totalcount 164 #define wra_u data 165 #define wra_val_u data_val 166 167 168 /* 169 * TYPEDEFS: 170 */ 171 typedef char *dirpath; 172 typedef char *name; 173 typedef struct exports *exports; 174 typedef struct exports exportnode; 175 typedef struct groups *groups; 176 typedef struct groups groupnode; 177 typedef struct mountlist *mountlist; 178 179 typedef attrstat nfsattrstat; 180 typedef createargs nfscreateargs; 181 typedef dirlist nfsdirlist; 182 typedef diropargs nfsdiropargs; 183 typedef diropokres nfsdiropokres; 184 typedef diropres nfsdiropres; 185 typedef entry nfsentry; 186 typedef fattr nfsfattr; 187 typedef ftype nfsftype; 188 typedef linkargs nfslinkargs; 189 typedef readargs nfsreadargs; 190 typedef readdirargs nfsreaddirargs; 191 typedef readdirres nfsreaddirres; 192 typedef readlinkres nfsreadlinkres; 193 typedef readokres nfsreadokres; 194 typedef readres nfsreadres; 195 typedef renameargs nfsrenameargs; 196 typedef sattr nfssattr; 197 typedef sattrargs nfssattrargs; 198 typedef statfsokres nfsstatfsokres; 199 typedef statfsres nfsstatfsres; 200 typedef symlinkargs nfssymlinkargs; 201 typedef writeargs nfswriteargs; 202 203 /* 204 * EXTERNALS: 205 */ 206 extern bool_t xdr_groups(XDR *xdrs, groups *objp); 207 208 /* 209 * STRUCTURES: 210 */ 211 212 #endif /* not _AMU_NFS_PROT_H */ 213