4 * Copyright (c) 1997-2009 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.
10 * This code is derived from software contributed to Berkeley by
11 * Jan-Simon Pendry at Imperial College, London.
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
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. All advertising materials mentioning features or use of this software
22 * must display the following acknowledgment:
23 * This product includes software developed by the University of
24 * California, Berkeley and its contributors.
25 * 4. Neither the name of the University nor the names of its contributors
26 * may be used to endorse or promote products derived from this software
27 * without specific prior written permission.
29 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
30 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
33 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
42 * File: am-utils/conf/nfs_prot/nfs_prot_aix4_2.h
46 #ifndef _AMU_NFS_PROT_H
47 #define _AMU_NFS_PROT_H
51 * AIX 4.2 and newer support NFS V.3, hence the separate header.
54 #ifdef HAVE_RPCSVC_NFS_PROT_H
55 # include <rpcsvc/nfs_prot.h>
56 #endif /* HAVE_RPCSVC_NFS_PROT_H */
57 #ifdef HAVE_NFS_NFSV2_H
58 # include <nfs/nfsv2.h>
59 #endif /* HAVE_NFS_NFSV2_H */
60 #ifdef HAVE_NFS_RPCV2_H
61 # include <nfs/rpcv2.h>
62 #endif /* HAVE_NFS_RPCV2_H */
63 #ifdef HAVE_SYS_FS_NFS_H
64 # include <sys/fs/nfs.h>
65 #endif /* HAVE_SYS_FS_NFS_H */
66 #ifdef HAVE_RPCSVC_MOUNT_H
67 # include <rpcsvc/mount.h>
68 #endif /* HAVE_RPCSVC_MOUNT_H */
76 # define MNTPATHLEN 1024
77 #endif /* not MNTPATHLEN */
79 # define MNTNAMLEN 255
80 #endif /* not MNTNAMLEN */
83 #define ex_dir ex_name
84 #define gr_name g_name
85 #define gr_next g_next
86 #define ml_directory ml_path
87 #define ml_hostname ml_name
88 #define ml_next ml_nxt
90 #define dr_drok_u diropres
91 #define ca_attributes attributes
92 #define ca_where where
93 #define da_fhandle dir
95 #define dl_entries entries
97 #define dr_status status
98 #define dr_u diropres_u
99 #define drok_attributes attributes
100 #define drok_fhandle file
102 #define la_fhandle from
104 #define na_atime atime
105 #define na_blocks blocks
106 #define na_blocksize blocksize
107 #define na_ctime ctime
108 #define na_fileid fileid
112 #define na_mtime mtime
113 #define na_nlink nlink
118 #define ne_cookie cookie
119 #define ne_fileid fileid
121 #define ne_nextentry nextentry
122 #define ns_attr_u attributes
123 #define ns_status status
124 #define ns_u attrstat_u
125 #define nt_seconds seconds
126 #define nt_useconds useconds
127 #define ra_count count
128 #define ra_fhandle file
129 #define ra_offset offset
130 #define ra_totalcount totalcount
131 #define raok_attributes attributes
132 #define raok_len_u data_len
134 #define raok_val_u data_val
135 #define rda_cookie cookie
136 #define rda_count count
137 #define rda_fhandle dir
138 #define rdr_reply_u reply
139 #define rdr_status status
140 #define rdr_u readdirres_u
141 #define rlr_data_u data
142 #define rlr_status status
143 #define rlr_u readlinkres_u
144 #define rna_from from
146 #define rr_reply_u reply
147 #define rr_status status
148 #define rr_u readres_u
149 #define sa_atime atime
152 #define sa_mtime mtime
155 #define sag_attributes attributes
156 #define sag_fhandle file
157 #define sfr_reply_u reply
158 #define sfr_status status
159 #define sfr_u statfsres_u
160 #define sfrok_bavail bavail
161 #define sfrok_bfree bfree
162 #define sfrok_blocks blocks
163 #define sfrok_bsize bsize
164 #define sfrok_tsize tsize
165 #define sla_attributes attributes
166 #define sla_from from
168 #define wra_beginoffset beginoffset
169 #define wra_fhandle file
170 #define wra_len_u data_len
171 #define wra_offset offset
172 #define wra_totalcount totalcount
174 #define wra_val_u data_val
180 typedef char *dirpath
;
182 typedef struct exports
*exports
;
183 typedef struct exports exportnode
;
184 typedef struct groups
*groups
;
185 typedef struct groups groupnode
;
186 typedef struct mountlist
*mountlist
;
188 typedef attrstat nfsattrstat
;
189 typedef createargs nfscreateargs
;
190 typedef dirlist nfsdirlist
;
191 typedef diropargs nfsdiropargs
;
192 typedef diropokres nfsdiropokres
;
193 typedef diropres nfsdiropres
;
194 typedef entry nfsentry
;
195 typedef fattr nfsfattr
;
196 typedef ftype nfsftype
;
197 typedef linkargs nfslinkargs
;
198 typedef readargs nfsreadargs
;
199 typedef readdirargs nfsreaddirargs
;
200 typedef readdirres nfsreaddirres
;
201 typedef readlinkres nfsreadlinkres
;
202 typedef readokres nfsreadokres
;
203 typedef readres nfsreadres
;
204 typedef renameargs nfsrenameargs
;
205 typedef sattr nfssattr
;
206 typedef sattrargs nfssattrargs
;
207 typedef statfsokres nfsstatfsokres
;
208 typedef statfsres nfsstatfsres
;
209 typedef symlinkargs nfssymlinkargs
;
210 typedef writeargs nfswriteargs
;
223 * AIX 4.2 has NFS V3, but it is undefined in the header files.
224 * so I define everything that's needed for NFS V3 here.
228 struct aix4_nfs_args
{
229 struct sockaddr_in addr
; /* server address and port */
230 caddr_t u0
; /* ??? UNKNOWN ??? */
231 unsigned long proto
; /* IPPROTO_TCP/IPPROTO_UDP */
232 char *hostname
; /* pointer to hostname? */
233 char *netname
; /* pointer to netname? */
234 caddr_t fh
; /* pointer to NFS v3 fh? */
235 unsigned long flags
; /* flags */
236 unsigned long wsize
; /* wsize */
237 unsigned long rsize
; /* rsize */
238 unsigned long timeo
; /* timeo */
239 unsigned long retrans
; /* retrans */
240 unsigned long acregmin
; /* acregmin */
241 unsigned long acregmax
; /* acregmax */
242 unsigned long acdirmin
; /* acdirmin */
243 unsigned long acdirmax
; /* acdirmax */
244 unsigned long u14
; /* ??? UNKNOWN ??? */
245 struct pathcnf
*pathconf
; /* pathconf */
248 #endif /* MNT_NFS3 */
253 extern bool_t
xdr_groups(XDR
*xdrs
, groups
*objp
);
255 #endif /* not _AMU_NFS_PROT_H */