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