2 * Copyright (c) 1997-1999 Erez Zadok
3 * Copyright (c) 1990 Jan-Simon Pendry
4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5 * Copyright (c) 1990 The Regents of the University of California.
8 * This code is derived from software contributed to Berkeley by
9 * Jan-Simon Pendry at Imperial College, London.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 * 3. All advertising materials mentioning features or use of this software
20 * must display the following acknowledgment:
21 * This product includes software developed by the University of
22 * California, Berkeley and its contributors.
23 * 4. Neither the name of the University nor the names of its contributors
24 * may be used to endorse or promote products derived from this software
25 * without specific prior written permission.
27 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 * $Id: nfs_prot_freebsd3.h,v 1.4 1999/03/30 17:22:54 ezk Exp $
42 * $FreeBSD: src/contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h,v 1.7 1999/09/15 05:45:14 obrien Exp $
43 * $DragonFly: src/contrib/amd/conf/nfs_prot/nfs_prot_freebsd3.h,v 1.3 2003/08/08 04:18:29 dillon Exp $
47 #ifndef _AMU_NFS_PROT_H
48 #define _AMU_NFS_PROT_H
51 #ifdef HAVE_RPCSVC_NFS_PROT_H
52 # include <rpcsvc/nfs_prot.h>
53 #endif /* HAVE_RPCSVC_NFS_PROT_H */
54 #endif /* COMMENT_OUT */
55 /* nfs_prot.h defines struct `nfs_fh3', but it is a ``dmr "unwarranted
56 * chumminess with the C implementation". We need the more complete
57 * structure, which is defined below. So get the stock `nfs_fh3'
61 #define nfs_fh3 nfs_fh3_fbsd_
62 # include "nfs_prot.h"
65 #ifdef HAVE_NFS_RPCV2_H
66 # include <nfs/rpcv2.h>
67 #endif /* HAVE_NFS_RPCV2_H */
70 #endif /* HAVE_NFS_NFS_H */
71 #ifdef HAVE_UFS_UFS_UFSMOUNT_H
72 # include <vfs/ufs/ufsmount.h>
73 #endif /* HAVE_UFS_UFS_UFSMOUNT_H */
78 #define dr_drok_u diropres
79 #define ca_where where
80 #define da_fhandle dir
82 #define dl_entries entries
84 #define dr_status status
85 #define dr_u diropres_u
86 #define drok_attributes attributes
87 #define drok_fhandle file
89 #define la_fhandle from
91 #define na_atime atime
92 #define na_ctime ctime
93 #define na_fileid fileid
96 #define na_mtime mtime
97 #define na_nlink nlink
100 #define ne_cookie cookie
101 #define ne_fileid fileid
103 #define ne_nextentry nextentry
104 #define ns_attr_u attributes
105 #define ns_status status
106 #define ns_u attrstat_u
107 #define nt_seconds seconds
108 #define nt_useconds useconds
109 #define rda_cookie cookie
110 #define rda_count count
111 #define rda_fhandle dir
112 #define rdr_reply_u reply
113 #define rdr_status status
114 #define rdr_u readdirres_u
115 #define rlr_data_u data
116 #define rlr_status status
117 #define rlr_u readlinkres_u
118 #define rna_from from
120 #define rr_status status
121 #define sag_fhandle file
122 #define sfr_reply_u reply
123 #define sfr_status status
124 #define sfr_u statfsres_u
125 #define sfrok_bavail bavail
126 #define sfrok_bfree bfree
127 #define sfrok_blocks blocks
128 #define sfrok_bsize bsize
129 #define sfrok_tsize tsize
130 #define sla_from from
131 #define wra_fhandle file
137 typedef attrstat nfsattrstat;
138 typedef createargs nfscreateargs;
139 typedef dirlist nfsdirlist;
140 typedef diropargs nfsdiropargs;
141 typedef diropres nfsdiropres;
142 typedef entry nfsentry;
143 typedef fattr nfsfattr;
144 typedef ftype nfsftype;
145 typedef linkargs nfslinkargs;
146 typedef readargs nfsreadargs;
147 typedef readdirargs nfsreaddirargs;
148 typedef readdirres nfsreaddirres;
149 typedef readlinkres nfsreadlinkres;
150 typedef readres nfsreadres;
151 typedef renameargs nfsrenameargs;
152 typedef sattrargs nfssattrargs;
153 typedef statfsokres nfsstatfsokres;
154 typedef statfsres nfsstatfsres;
155 typedef symlinkargs nfssymlinkargs;
156 typedef writeargs nfswriteargs;
161 * FreeBSD-3.0-RELEASE has NFS V3. Older versions had it only defined
162 * in the rpcgen source file. If you are on an older system, and you
163 * want NFSv3 support, you need to regenerate the rpcsvc header files as
165 * cd /usr/include/rpcsvc
166 * rpcgen -h -C -DWANT_NFS3 mount.x
167 * rpcgen -h -C -DWANT_NFS3 nfs_prot.x
168 * If you don't want NFSv3, then you will have to turn off the NFSMNT_NFSV3
169 * macro below. If the code doesn't compile, upgrade to the latest 3.0
174 # define MOUNT_NFS3 MOUNT_NFS
175 # define MNTOPT_NFS3 "nfs"
178 * as of 3.0-RELEASE the nfs_fh3 that is defined in the system headers
179 * (or the one generated by rpcgen) lacks the proper full definition,
180 * listed below. A special macro (aux/macros/struct_nfs_fh3.m4) searches
181 * for this special name before other names.
183 struct nfs_fh3_freebsd3 {
189 char data[NFS3_FHSIZE];
192 typedef struct nfs_fh3_freebsd3 nfs_fh3_freebsd3;
194 /* since we don't use Am-utils's aux/macros/struct_nfs_fh3.m4, we don't get
195 their special searching. So restore the standard name. */
196 typedef struct nfs_fh3_freebsd3 nfs_fh3;
198 #endif /* NFSMNT_NFSV3 */
200 #endif /* not _AMU_NFS_PROT_H */