1/*
2 * Copyright (c) 1997-2009 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.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by
9 * Jan-Simon Pendry at Imperial College, London.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
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.
26 *
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
37 * SUCH DAMAGE.
38 *
39 *
40 * File: am-utils/conf/nfs_prot/nfs_prot_netbsd1_4.h
41 *
42 */
43
44#ifndef _AMU_NFS_PROT_H
45#define _AMU_NFS_PROT_H
46
47#ifdef HAVE_RPCSVC_NFS_PROT_H
48# include <rpcsvc/nfs_prot.h>
49#endif /* HAVE_RPCSVC_NFS_PROT_H */
50#ifdef HAVE_NFS_RPCV2_H
51# include <nfs/rpcv2.h>
52#endif /* HAVE_NFS_RPCV2_H */
53#ifndef NFS_NPROCS
54# define NFS_NPROCS	26
55#endif /* not NFS_NPROCS */
56#ifdef HAVE_NFS_NFS_H
57# include <nfs/nfs.h>
58#endif /* HAVE_NFS_NFS_H */
59#ifdef HAVE_NFS_NFSMOUNT_H
60# include <nfs/nfsmount.h>
61#endif /* HAVE_NFS_NFSMOUNT_H */
62
63#ifdef HAVE_UFS_UFS_UFSMOUNT_H
64/* netbsd-1.4 does't protect <ufs/ufs/ufsmount.h> */
65# ifndef _UFS_UFS_UFSMOUNT_H
66#  include <ufs/ufs/ufsmount.h>
67#  define _UFS_UFS_UFSMOUNT_H
68# endif /* not _UFS_UFS_UFSMOUNT_H */
69#endif /* HAVE_UFS_UFS_UFSMOUNT_H */
70
71/* NON-NFS STUFF (doesn't really belong here) */
72#ifndef DEFINED_YPALL_CALLBACK_FXN_T
73# define DEFINED_YPALL_CALLBACK_FXN_T
74#if 0
75/* this is RIGHT for 1.2G and 1.2.1 */
76typedef int (*ypall_callback_fxn_t)(u_long, char *, int, char *, int, void *);
77#endif /* 0 */
78/* this is right for 1.3beta and newer */
79typedef int (*ypall_callback_fxn_t)(int, char *, int, char *, int, char *);
80#endif /* DEFINED_YPALL_CALLBACK_FXN_T */
81
82#ifdef HAVE_STATVFS
83# define statfs statvfs
84#endif /* HAVE_STATVFS */
85
86/*
87 * MACROS:
88 */
89#define	dr_drok_u	diropres
90#define ca_where	where
91#define da_fhandle	dir
92#define da_name		name
93#define dl_entries	entries
94#define dl_eof		eof
95#define dr_status	status
96#define dr_u		diropres_u
97#define drok_attributes	attributes
98#define drok_fhandle	file
99#define fh_data		data
100#define la_fhandle	from
101#define la_to		to
102#define na_atime	atime
103#define na_ctime	ctime
104#define na_fileid	fileid
105#define na_fsid		fsid
106#define na_gid		gid
107#define na_mode		mode
108#define na_mtime	mtime
109#define na_nlink	nlink
110#define na_size		size
111#define na_uid		uid
112#define na_type		type
113#define ne_cookie	cookie
114#define ne_fileid	fileid
115#define ne_name		name
116#define ne_nextentry	nextentry
117#define ns_attr_u	attributes
118#define ns_status	status
119#define ns_u		attrstat_u
120#define nt_seconds	seconds
121#define nt_useconds	useconds
122#define rda_cookie	cookie
123#define rda_count	count
124#define rda_fhandle	dir
125#define rdr_reply_u	reply
126#define rdr_status	status
127#define rdr_u		readdirres_u
128#define rlr_data_u	data
129#define rlr_status	status
130#define rlr_u		readlinkres_u
131#define rna_from	from
132#define rna_to		to
133#define rr_status	status
134#define sag_fhandle	file
135#define sfr_reply_u	reply
136#define sfr_status	status
137#define sfr_u		statfsres_u
138#define sfrok_bavail	bavail
139#define sfrok_bfree	bfree
140#define sfrok_blocks	blocks
141#define sfrok_bsize	bsize
142#define sfrok_tsize	tsize
143#define sla_from	from
144#define wra_fhandle	file
145
146
147/*
148 * TYPEDEFS:
149 */
150typedef attrstat nfsattrstat;
151typedef createargs nfscreateargs;
152typedef dirlist nfsdirlist;
153typedef diropargs nfsdiropargs;
154typedef diropres nfsdiropres;
155typedef entry nfsentry;
156typedef fattr nfsfattr;
157typedef ftype nfsftype;
158typedef linkargs nfslinkargs;
159typedef readargs nfsreadargs;
160typedef readdirargs nfsreaddirargs;
161typedef readdirres nfsreaddirres;
162typedef readlinkres nfsreadlinkres;
163typedef readres nfsreadres;
164typedef renameargs nfsrenameargs;
165typedef sattrargs nfssattrargs;
166typedef statfsokres nfsstatfsokres;
167typedef statfsres nfsstatfsres;
168typedef symlinkargs nfssymlinkargs;
169typedef writeargs nfswriteargs;
170
171/*
172 *
173 * NetBSD 1.2 has NFS V3, but it is undefined in the header files.
174 * so I define everything that's needed for NFS V3 here.
175 */
176#ifdef NFSMNT_NFSV3
177
178# define MOUNT_NFS3 MOUNT_NFS
179# define MNTOPT_NFS3 "nfs"
180
181#endif /* NFSMNT_NFSV3 */
182
183#endif /* not _AMU_NFS_PROT_H */
184