1/* $NetBSD: nfs_prot_openbsd.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_openbsd.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 52#ifndef NFS_NPROCS 53# define NFS_NPROCS 26 54#endif /* not NFS_NPROCS */ 55#ifdef HAVE_NFS_NFS_H 56# include <nfs/nfs.h> 57#endif /* HAVE_NFS_NFS_H */ 58 59#ifdef HAVE_UFS_UFS_UFSMOUNT_H 60# ifdef HAVE_UFS_UFS_EXTATTR_H 61/* 62 * Need to define _KERNEL to include protected definition of struct 63 * ufs_extattr_per_mount, which is used in struct ufsmount in 64 * <ufs/ufs/ufsmount.h>, but is NOT protected by _KERNEL there. 65 */ 66# define _KERNEL 67# include <ufs/ufs/extattr.h> 68# undef _KERNEL 69# endif /* HAVE_UFS_UFS_EXTATTR_H */ 70# ifndef MAXQUOTAS 71# define MAXQUOTAS 2 72# endif /* not MAXQUOTAS */ 73/* 74 * XXX: fake struct nextexport: trying to include proper headers here is too 75 * difficult: those headers drag many other headers, etc. 76 */ 77struct netexport { int this_is_SO_wrong; }; 78# include <ufs/ufs/ufsmount.h> 79#endif /* HAVE_UFS_UFS_UFSMOUNT_H */ 80 81 82/* 83 * MACROS: 84 */ 85#define dr_drok_u diropres 86#define ca_where where 87#define da_fhandle dir 88#define da_name name 89#define dl_entries entries 90#define dl_eof eof 91#define dr_status status 92#define dr_u diropres_u 93#define drok_attributes attributes 94#define drok_fhandle file 95#define fh_data data 96#define la_fhandle from 97#define la_to to 98#define na_atime atime 99#define na_ctime ctime 100#define na_fileid fileid 101#define na_fsid fsid 102#define na_mode mode 103#define na_mtime mtime 104#define na_nlink nlink 105#define na_size size 106#define na_type type 107#define na_uid uid 108#define na_gid gid 109#define ne_cookie cookie 110#define ne_fileid fileid 111#define ne_name name 112#define ne_nextentry nextentry 113#define ns_attr_u attributes 114#define ns_status status 115#define ns_u attrstat_u 116#define nt_seconds seconds 117#define nt_useconds useconds 118#define rda_cookie cookie 119#define rda_count count 120#define rda_fhandle dir 121#define rdr_reply_u reply 122#define rdr_status status 123#define rdr_u readdirres_u 124#define rlr_data_u data 125#define rlr_status status 126#define rlr_u readlinkres_u 127#define rna_from from 128#define rna_to to 129#define rr_status status 130#define sag_fhandle file 131#define sfr_reply_u reply 132#define sfr_status status 133#define sfr_u statfsres_u 134#define sfrok_bavail bavail 135#define sfrok_bfree bfree 136#define sfrok_blocks blocks 137#define sfrok_bsize bsize 138#define sfrok_tsize tsize 139#define sla_from from 140#define wra_fhandle file 141 142 143/* 144 * TYPEDEFS: 145 */ 146typedef attrstat nfsattrstat; 147typedef createargs nfscreateargs; 148typedef dirlist nfsdirlist; 149typedef diropargs nfsdiropargs; 150typedef diropres nfsdiropres; 151typedef entry nfsentry; 152typedef fattr nfsfattr; 153typedef ftype nfsftype; 154typedef linkargs nfslinkargs; 155typedef readargs nfsreadargs; 156typedef readdirargs nfsreaddirargs; 157typedef readdirres nfsreaddirres; 158typedef readlinkres nfsreadlinkres; 159typedef readres nfsreadres; 160typedef renameargs nfsrenameargs; 161typedef sattrargs nfssattrargs; 162typedef statfsokres nfsstatfsokres; 163typedef statfsres nfsstatfsres; 164typedef symlinkargs nfssymlinkargs; 165typedef writeargs nfswriteargs; 166 167 168/* 169 * OpenBSD 2.2 has NFS V3, but it is undefined in the header files. 170 * so I define everything that's needed for NFS V3 here. 171 */ 172#ifdef NFSMNT_NFSV3 173 174/* 175 * turn of this function so it cannot be used! OpenBSD seems to 176 * require that NFS sockets be connected. 177 * See m4/macros/check_nfs_socket_connection.m4. 178 */ 179 180# define MOUNT_NFS3 MOUNT_NFS 181# define MNTOPT_NFS3 "nfs" 182 183#endif /* NFSMNT_NFSV3 */ 184 185#endif /* not _AMU_NFS_PROT_H */ 186