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_sunos5_4.h
46 #ifndef _AMU_NFS_PROT_H
47 #define _AMU_NFS_PROT_H
50 * Do not include <nfs/nfs.h> because Solaris 2.4 really does not have NFS
51 * V.3 support, despite what their header files claim.
54 #ifdef HAVE_RPCSVC_NFS_PROT_H
55 # include <rpcsvc/nfs_prot.h>
56 #endif /* HAVE_RPCSVC_NFS_PROT_H */
59 typedef char fhandle
[FHSIZE
];
60 #define fhandle_t fhandle
62 #ifdef HAVE_RPCSVC_MOUNT_H
63 # include <rpcsvc/mount.h>
64 #endif /* HAVE_RPCSVC_MOUNT_H */
67 #endif /* HAVE_RPC_RPC_H */
69 /* missing mntent definition for cachefs */
70 #ifndef MNTTYPE_CACHEFS
71 # define MNTTYPE_CACHEFS "cachefs" /* Cache File System */
72 #endif /* not MNTTYPE_CACHEFS */
75 * Solaris 2.4 has header definitions for NFS V.3, but does not really
76 * have NFS V.3 support in the kernel. So I must undefine these.
80 #endif /* MNTTYPE_NFS3 */
88 #define NFS_MAXDATA 8192
89 #define NFS_MAXPATHLEN 1024
90 #define NFS_MAXNAMLEN 255
92 #define NFS_COOKIESIZE 4
94 #define NFSMODE_FMT 0170000
95 #define NFSMODE_DIR 0040000
96 #define NFSMODE_CHR 0020000
97 #define NFSMODE_BLK 0060000
98 #define NFSMODE_REG 0100000
99 #define NFSMODE_LNK 0120000
100 #define NFSMODE_SOCK 0140000
101 #define NFSMODE_FIFO 0010000
103 #define dr_drok_u diropres
104 #define ca_attributes attributes
105 #define ca_where where
106 #define da_fhandle dir
108 #define dl_entries entries
110 #define dr_status status
111 #define dr_u diropres_u
112 #define drok_attributes attributes
113 #define drok_fhandle file
115 #define la_fhandle from
117 #define na_atime atime
118 #define na_blocks blocks
119 #define na_blocksize blocksize
120 #define na_ctime ctime
121 #define na_fileid fileid
125 #define na_mtime mtime
126 #define na_nlink nlink
131 #define ne_cookie cookie
132 #define ne_fileid fileid
134 #define ne_nextentry nextentry
135 #define ns_attr_u attributes
136 #define ns_status status
137 #define ns_u attrstat_u
138 #define nt_seconds seconds
139 #define nt_useconds useconds
140 #define ra_count count
141 #define ra_fhandle file
142 #define ra_offset offset
143 #define ra_totalcount totalcount
144 #define raok_attributes attributes
145 #define raok_len_u data_len
147 #define raok_val_u data_val
148 #define rda_cookie cookie
149 #define rda_count count
150 #define rda_fhandle dir
151 #define rdr_reply_u reply
152 #define rdr_status status
153 #define rdr_u readdirres_u
154 #define rlr_data_u data
155 #define rlr_status status
156 #define rlr_u readlinkres_u
157 #define rna_from from
159 #define rr_reply_u reply
160 #define rr_status status
161 #define rr_u readres_u
162 #define sa_atime atime
165 #define sa_mtime mtime
168 #define sag_attributes attributes
169 #define sag_fhandle file
170 #define sfr_reply_u reply
171 #define sfr_status status
172 #define sfr_u statfsres_u
173 #define sfrok_bavail bavail
174 #define sfrok_bfree bfree
175 #define sfrok_blocks blocks
176 #define sfrok_bsize bsize
177 #define sfrok_tsize tsize
178 #define sla_attributes attributes
179 #define sla_from from
181 #define wra_beginoffset beginoffset
182 #define wra_fhandle file
183 #define wra_len_u data_len
184 #define wra_offset offset
185 #define wra_totalcount totalcount
187 #define wra_val_u data_val
189 /* map field names */
190 #define ex_dir ex_name
191 #define gr_name g_name
192 #define gr_next g_next
193 #define ml_directory ml_path
194 #define ml_hostname ml_name
195 #define ml_next ml_nxt
202 typedef char *dirpath
;
204 typedef enum ftype nfsftype
;
205 typedef struct attrstat nfsattrstat
;
206 typedef struct createargs nfscreateargs
;
207 typedef struct dirlist nfsdirlist
;
208 typedef struct diropargs nfsdiropargs
;
209 typedef struct diropokres nfsdiropokres
;
210 typedef struct diropres nfsdiropres
;
211 typedef struct entry nfsentry
;
212 typedef struct exports
*exports
;
213 typedef struct exports exportnode
;
214 typedef struct fattr nfsfattr
;
215 typedef struct fhstatus fhstatus
;
216 typedef struct groups
*groups
;
217 typedef struct groups groupnode
;
218 typedef struct linkargs nfslinkargs
;
219 typedef struct mountlist
*mountlist
;
220 typedef struct mountlist mountbody
;
221 typedef struct readargs nfsreadargs
;
222 typedef struct readdirargs nfsreaddirargs
;
223 typedef struct readdirres nfsreaddirres
;
224 typedef struct readlinkres nfsreadlinkres
;
225 typedef struct readokres nfsreadokres
;
226 typedef struct readres nfsreadres
;
227 typedef struct renameargs nfsrenameargs
;
228 typedef struct sattr nfssattr
;
229 typedef struct sattrargs nfssattrargs
;
230 typedef struct statfsokres nfsstatfsokres
;
231 typedef struct statfsres nfsstatfsres
;
232 typedef struct symlinkargs nfssymlinkargs
;
233 typedef struct writeargs nfswriteargs
;
240 extern bool_t
xdr_createargs(XDR
*, nfscreateargs
*);
241 extern bool_t
xdr_dirlist(XDR
*, nfsdirlist
*);
242 extern bool_t
xdr_diropokres(XDR
*, nfsdiropokres
*);
243 extern bool_t
xdr_entry(XDR
*, nfsentry
*);
244 extern bool_t
xdr_filename(XDR
*, filename
*);
245 extern bool_t
xdr_ftype(XDR
*, nfsftype
*);
246 extern bool_t
xdr_nfs_fh(XDR
*, nfs_fh
*);
247 extern bool_t
xdr_nfscookie(XDR
*, nfscookie
);
248 extern bool_t
xdr_nfspath(XDR
*, nfspath
*);
249 extern bool_t
xdr_nfsstat(XDR
*, nfsstat
*);
250 extern bool_t
xdr_nfstime(XDR
*, nfstime
*);
251 extern bool_t
xdr_readdirargs(XDR
*, nfsreaddirargs
*);
252 extern bool_t
xdr_readdirres(XDR
*, nfsreaddirres
*);
253 extern bool_t
xdr_readlinkres(XDR
*, nfsreadlinkres
*);
254 extern bool_t
xdr_readokres(XDR
*, nfsreadokres
*);
255 extern bool_t
xdr_readres(XDR
*, nfsreadres
*);
256 extern bool_t
xdr_renameargs(XDR
*, nfsrenameargs
*);
257 extern bool_t
xdr_sattrargs(XDR
*, nfssattrargs
*);
258 extern bool_t
xdr_statfsokres(XDR
*, nfsstatfsokres
*);
259 extern bool_t
xdr_statfsres(XDR
*, nfsstatfsres
*);
260 extern bool_t
xdr_symlinkargs(XDR
*, nfssymlinkargs
*);
272 #endif /* not _AMU_NFS_PROT_H */