1 /*        $NetBSD: nfs_prot_darwin.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_darwin.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_RPCV2_H
49 # include <nfs/rpcv2.h>
50 #endif /* HAVE_NFS_RPCV2_H */
51 #ifdef HAVE_NFS_NFS_H
52 # include <nfs/nfs.h>
53 #endif /* HAVE_NFS_NFS_H */
54 #ifdef    HAVE_UFS_UFS_UFSMOUNT_H
55 # include <ufs/ufs/ufsmount.h>
56 #endif    /* HAVE_UFS_UFS_UFSMOUNT_H */
57 
58 /*
59  * MACROS:
60  */
61 #define   dr_drok_u diropres
62 #define ca_attributes         attributes
63 #define ca_where    where
64 #define da_fhandle  dir
65 #define da_name               name
66 #define dl_entries  entries
67 #define dl_eof                eof
68 #define dr_status   status
69 #define dr_u                  diropres_u
70 #define drok_attributes       attributes
71 #define drok_fhandle          file
72 #define fh_data               data
73 #define la_fhandle  from
74 #define la_to                 to
75 #define na_atime    atime
76 #define na_ctime    ctime
77 #define na_fileid   fileid
78 #define na_fsid               fsid
79 #define na_gid                gid
80 #define na_mode               mode
81 #define na_mtime    mtime
82 #define na_nlink    nlink
83 #define na_size               size
84 #define na_type               type
85 #define na_uid                uid
86 #define na_blocks   blocks
87 #define na_blocksize          blocksize
88 #define na_rdev               rdev
89 #define ne_cookie   cookie
90 #define ne_fileid   fileid
91 #define ne_name               name
92 #define ne_nextentry          nextentry
93 #define ns_attr_u   attributes
94 #define ns_status   status
95 #define ns_u                  attrstat_u
96 #define nt_seconds  seconds
97 #define nt_useconds useconds
98 #define ra_count    count
99 #define ra_fhandle  file
100 #define ra_offset   offset
101 #define ra_totalcount         totalcount
102 #define raok_attributes       attributes
103 #define raok_len_u  data_len
104 #define raok_u                data
105 #define raok_val_u  data_val
106 #define rda_cookie  cookie
107 #define rda_count   count
108 #define rda_fhandle dir
109 #define rdr_reply_u reply
110 #define rdr_status  status
111 #define rdr_u                 readdirres_u
112 #define rlr_data_u  data
113 #define rlr_status  status
114 #define rlr_u                 readlinkres_u
115 #define rna_from    from
116 #define rna_to                to
117 #define rr_reply_u  reply
118 #define rr_status   status
119 #define rr_u                  readres_u
120 #define sa_atime    atime
121 #define sa_gid                gid
122 #define sa_mode               mode
123 #define sa_mtime    mtime
124 #define sa_size               size
125 #define sa_uid                uid
126 #define sag_attributes        attributes
127 #define sag_fhandle file
128 #define sfr_reply_u reply
129 #define sfr_status  status
130 #define sfr_u                 statfsres_u
131 #define sfrok_bavail          bavail
132 #define sfrok_bfree bfree
133 #define sfrok_blocks          blocks
134 #define sfrok_bsize bsize
135 #define sfrok_tsize tsize
136 #define sla_attributes        attributes
137 #define sla_from    from
138 #define sla_to                to
139 #define wra_beginoffset       beginoffset
140 #define wra_fhandle file
141 #define wra_len_u   data_len
142 #define wra_offset  offset
143 #define wra_totalcount        totalcount
144 #define wra_u                 data
145 #define wra_val_u   data_val
146 
147 /*
148  * TYPEDEFS:
149  */
150 typedef attrstat nfsattrstat;
151 typedef createargs nfscreateargs;
152 typedef dirlist nfsdirlist;
153 typedef diropargs nfsdiropargs;
154 typedef diropokres nfsdiropokres;
155 typedef diropres nfsdiropres;
156 typedef entry nfsentry;
157 typedef fattr nfsfattr;
158 typedef ftype nfsftype;
159 typedef linkargs nfslinkargs;
160 typedef readargs nfsreadargs;
161 typedef readdirargs nfsreaddirargs;
162 typedef readdirres nfsreaddirres;
163 typedef readlinkres nfsreadlinkres;
164 typedef readokres nfsreadokres;
165 typedef readres nfsreadres;
166 typedef renameargs nfsrenameargs;
167 typedef sattr nfssattr;
168 typedef sattrargs nfssattrargs;
169 typedef statfsokres nfsstatfsokres;
170 typedef statfsres nfsstatfsres;
171 typedef symlinkargs nfssymlinkargs;
172 typedef writeargs nfswriteargs;
173 
174 
175 #ifdef NFSMNT_NFSV3
176 
177 # define MOUNT_NFS3 "nfs"     /* is this right? */
178 # define MNTOPT_NFS3          "nfs"
179 
180 #endif /* NFSMNT_NFSV3 */
181 
182 #endif /* not _AMU_NFS_PROT_H */
183