/*-1* SPDX-License-Identifier: BSD-3-Clause2*3* Copyright (c) 1989, 1993, 19954* The Regents of the University of California. All rights reserved.5*6* This code is derived from software contributed to Berkeley by7* Rick Macklem at The University of Guelph.8*9* Redistribution and use in source and binary forms, with or without10* modification, are permitted provided that the following conditions11* are met:12* 1. Redistributions of source code must retain the above copyright13* notice, this list of conditions and the following disclaimer.14* 2. Redistributions in binary form must reproduce the above copyright15* notice, this list of conditions and the following disclaimer in the16* documentation and/or other materials provided with the distribution.17* 3. Neither the name of the University nor the names of its contributors18* may be used to endorse or promote products derived from this software19* without specific prior written permission.20*21* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND22* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE23* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE24* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE25* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL26* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS27* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)28* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT29* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY30* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF31* SUCH DAMAGE.32*/3334#ifndef _NFSCLIENT_NFSARGS_H_35#define _NFSCLIENT_NFSARGS_H_3637/*38* Arguments to mount NFS39*/40#define NFS_ARGSVERSION 3 /* change when nfs_args changes */41struct nfs_args {42int version; /* args structure version number */43struct sockaddr *addr; /* file server address */44int addrlen; /* length of address */45int sotype; /* Socket type */46int proto; /* and Protocol */47u_char *fh; /* File handle to be mounted */48int fhsize; /* Size, in bytes, of fh */49int flags; /* flags */50int wsize; /* write size in bytes */51int rsize; /* read size in bytes */52int readdirsize; /* readdir size in bytes */53int timeo; /* initial timeout in .1 secs */54int retrans; /* times to retry send */55int maxgrouplist; /* Max. size of group list */56int readahead; /* # of blocks to readahead */57int wcommitsize; /* Max. write commit size in bytes */58int deadthresh; /* Retrans threshold */59char *hostname; /* server's name */60int acregmin; /* cache attrs for reg files min time */61int acregmax; /* cache attrs for reg files max time */62int acdirmin; /* cache attrs for dirs min time */63int acdirmax; /* cache attrs for dirs max time */64};6566/*67* NFS mount option flags68*/69#define NFSMNT_SOFT 0x00000001 /* soft mount (hard is default) */70#define NFSMNT_WSIZE 0x00000002 /* set write size */71#define NFSMNT_RSIZE 0x00000004 /* set read size */72#define NFSMNT_TIMEO 0x00000008 /* set initial timeout */73#define NFSMNT_RETRANS 0x00000010 /* set number of request retries */74#define NFSMNT_MAXGRPS 0x00000020 /* set maximum grouplist size */75#define NFSMNT_INT 0x00000040 /* allow interrupts on hard mount */76#define NFSMNT_NOCONN 0x00000080 /* Don't Connect the socket */77#define NFSMNT_ONEOPENOWN 0x00000100 /* Use one OpenOwner for NFSv4.1 */78#define NFSMNT_NFSV3 0x00000200 /* Use NFS Version 3 protocol */79#define NFSMNT_KERB 0x00000400 /* Use RPCSEC_GSS/Krb5 */80#define NFSMNT_DUMBTIMR 0x00000800 /* Don't estimate rtt dynamically */81#define NFSMNT_WCOMMITSIZE 0x00001000 /* set max write commit size */82#define NFSMNT_READAHEAD 0x00002000 /* set read ahead */83#define NFSMNT_DEADTHRESH 0x00004000 /* set dead server retry thresh */84#define NFSMNT_RESVPORT 0x00008000 /* Allocate a reserved port */85#define NFSMNT_RDIRPLUS 0x00010000 /* Use Readdirplus for V3 */86#define NFSMNT_READDIRSIZE 0x00020000 /* Set readdir size */87#define NFSMNT_ACREGMIN 0x0004000088#define NFSMNT_ACREGMAX 0x0008000089#define NFSMNT_ACDIRMIN 0x0010000090#define NFSMNT_ACDIRMAX 0x0020000091#define NFSMNT_NOLOCKD 0x00400000 /* Locks are local */92#define NFSMNT_NFSV4 0x00800000 /* Use NFS Version 4 protocol */93#define NFSMNT_HASWRITEVERF 0x01000000 /* NFSv4 Write verifier */94#define NFSMNT_INTEGRITY 0x02000000 /* Use integrity with RPCSEC_GSS */95#define NFSMNT_PRIVACY 0x04000000 /* Use privacy with RPCSEC_GSS */96#define NFSMNT_ALLGSSNAME 0x08000000 /* Use principal for all accesses */97#define NFSMNT_STRICT3530 0x10000000 /* Adhere strictly to RFC3530 */98#define NFSMNT_NOCTO 0x20000000 /* Don't flush attrcache on open */99#define NFSMNT_PNFS 0x40000000 /* Enable pNFS support */100#define NFSMNT_NONCONTIGWR 0x80000000 /* Enable non-contiguous writes */101102#endif103104105