1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate /* 23*0Sstevel@tonic-gate * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 24*0Sstevel@tonic-gate * Use is subject to license terms. 25*0Sstevel@tonic-gate */ 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate /* 28*0Sstevel@tonic-gate * Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T 29*0Sstevel@tonic-gate * All Rights Reserved 30*0Sstevel@tonic-gate */ 31*0Sstevel@tonic-gate 32*0Sstevel@tonic-gate #ifndef _NFS_MOUNT_H 33*0Sstevel@tonic-gate #define _NFS_MOUNT_H 34*0Sstevel@tonic-gate 35*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 36*0Sstevel@tonic-gate 37*0Sstevel@tonic-gate #ifdef __cplusplus 38*0Sstevel@tonic-gate extern "C" { 39*0Sstevel@tonic-gate #endif 40*0Sstevel@tonic-gate 41*0Sstevel@tonic-gate #include <sys/pathconf.h> /* static pathconf kludge */ 42*0Sstevel@tonic-gate 43*0Sstevel@tonic-gate 44*0Sstevel@tonic-gate #define NFS_ARGS_EXTA 1 45*0Sstevel@tonic-gate #define NFS_ARGS_EXTB 2 46*0Sstevel@tonic-gate 47*0Sstevel@tonic-gate /* 48*0Sstevel@tonic-gate * extension data for nfs_args_ext == NFS_ARGS_EXTA. 49*0Sstevel@tonic-gate */ 50*0Sstevel@tonic-gate struct nfs_args_extA { 51*0Sstevel@tonic-gate struct sec_data *secdata; /* security data */ 52*0Sstevel@tonic-gate }; 53*0Sstevel@tonic-gate 54*0Sstevel@tonic-gate /* 55*0Sstevel@tonic-gate * extension data for nfs_args_ext == NFS_ARGS_EXTB. 56*0Sstevel@tonic-gate */ 57*0Sstevel@tonic-gate struct nfs_args_extB { 58*0Sstevel@tonic-gate struct sec_data *secdata; /* security data */ 59*0Sstevel@tonic-gate struct nfs_args *next; /* link for failover */ 60*0Sstevel@tonic-gate }; 61*0Sstevel@tonic-gate 62*0Sstevel@tonic-gate /* 63*0Sstevel@tonic-gate * Union structure for future extension. 64*0Sstevel@tonic-gate */ 65*0Sstevel@tonic-gate union nfs_ext { 66*0Sstevel@tonic-gate struct nfs_args_extA nfs_extA; /* nfs_args extension v1 */ 67*0Sstevel@tonic-gate struct nfs_args_extB nfs_extB; /* nfs_args extension v2 */ 68*0Sstevel@tonic-gate }; 69*0Sstevel@tonic-gate 70*0Sstevel@tonic-gate struct nfs_args { 71*0Sstevel@tonic-gate struct netbuf *addr; /* file server address */ 72*0Sstevel@tonic-gate struct netbuf *syncaddr; /* secure NFS time sync addr */ 73*0Sstevel@tonic-gate struct knetconfig *knconf; /* transport netconfig struct */ 74*0Sstevel@tonic-gate char *hostname; /* server's hostname */ 75*0Sstevel@tonic-gate char *netname; /* server's netname */ 76*0Sstevel@tonic-gate caddr_t fh; /* File handle to be mounted */ 77*0Sstevel@tonic-gate int flags; /* flags */ 78*0Sstevel@tonic-gate int wsize; /* write size in bytes */ 79*0Sstevel@tonic-gate int rsize; /* read size in bytes */ 80*0Sstevel@tonic-gate int timeo; /* initial timeout in .1 secs */ 81*0Sstevel@tonic-gate int retrans; /* times to retry send */ 82*0Sstevel@tonic-gate int acregmin; /* attr cache file min secs */ 83*0Sstevel@tonic-gate int acregmax; /* attr cache file max secs */ 84*0Sstevel@tonic-gate int acdirmin; /* attr cache dir min secs */ 85*0Sstevel@tonic-gate int acdirmax; /* attr cache dir max secs */ 86*0Sstevel@tonic-gate struct pathcnf *pathconf; /* static pathconf kludge */ 87*0Sstevel@tonic-gate int nfs_args_ext; /* the nfs_args extension id */ 88*0Sstevel@tonic-gate union nfs_ext nfs_ext_u; /* extension union structure */ 89*0Sstevel@tonic-gate }; 90*0Sstevel@tonic-gate 91*0Sstevel@tonic-gate #ifdef _SYSCALL32 92*0Sstevel@tonic-gate struct nfs_args_extA32 { 93*0Sstevel@tonic-gate caddr32_t secdata; /* security data */ 94*0Sstevel@tonic-gate }; 95*0Sstevel@tonic-gate 96*0Sstevel@tonic-gate struct nfs_args_extB32 { 97*0Sstevel@tonic-gate caddr32_t secdata; /* security data */ 98*0Sstevel@tonic-gate caddr32_t next; /* link for failover */ 99*0Sstevel@tonic-gate }; 100*0Sstevel@tonic-gate 101*0Sstevel@tonic-gate union nfs_ext32 { 102*0Sstevel@tonic-gate struct nfs_args_extA32 nfs_extA; /* nfs_args extension v1 */ 103*0Sstevel@tonic-gate struct nfs_args_extB32 nfs_extB; /* nfs_args extension v2 */ 104*0Sstevel@tonic-gate }; 105*0Sstevel@tonic-gate 106*0Sstevel@tonic-gate struct nfs_args32 { 107*0Sstevel@tonic-gate caddr32_t addr; /* file server address */ 108*0Sstevel@tonic-gate caddr32_t syncaddr; /* secure NFS time sync addr */ 109*0Sstevel@tonic-gate caddr32_t knconf; /* transport netconfig struct */ 110*0Sstevel@tonic-gate caddr32_t hostname; /* server's hostname */ 111*0Sstevel@tonic-gate caddr32_t netname; /* server's netname */ 112*0Sstevel@tonic-gate caddr32_t fh; /* File handle to be mounted */ 113*0Sstevel@tonic-gate int32_t flags; /* flags */ 114*0Sstevel@tonic-gate int32_t wsize; /* write size in bytes */ 115*0Sstevel@tonic-gate int32_t rsize; /* read size in bytes */ 116*0Sstevel@tonic-gate int32_t timeo; /* initial timeout in .1 secs */ 117*0Sstevel@tonic-gate int32_t retrans; /* times to retry send */ 118*0Sstevel@tonic-gate int32_t acregmin; /* attr cache file min secs */ 119*0Sstevel@tonic-gate int32_t acregmax; /* attr cache file max secs */ 120*0Sstevel@tonic-gate int32_t acdirmin; /* attr cache dir min secs */ 121*0Sstevel@tonic-gate int32_t acdirmax; /* attr cache dir max secs */ 122*0Sstevel@tonic-gate caddr32_t pathconf; /* static pathconf kludge */ 123*0Sstevel@tonic-gate int32_t nfs_args_ext; /* the nfs_args extension id */ 124*0Sstevel@tonic-gate union nfs_ext32 nfs_ext_u; /* extension union structure */ 125*0Sstevel@tonic-gate }; 126*0Sstevel@tonic-gate #endif /* _SYSCALL32 */ 127*0Sstevel@tonic-gate 128*0Sstevel@tonic-gate /* 129*0Sstevel@tonic-gate * NFS mount option flags 130*0Sstevel@tonic-gate */ 131*0Sstevel@tonic-gate #define NFSMNT_SOFT 0x001 /* soft mount (hard is default) */ 132*0Sstevel@tonic-gate #define NFSMNT_WSIZE 0x002 /* set write size */ 133*0Sstevel@tonic-gate #define NFSMNT_RSIZE 0x004 /* set read size */ 134*0Sstevel@tonic-gate #define NFSMNT_TIMEO 0x008 /* set initial timeout */ 135*0Sstevel@tonic-gate #define NFSMNT_RETRANS 0x010 /* set number of request retrys */ 136*0Sstevel@tonic-gate #define NFSMNT_HOSTNAME 0x020 /* set hostname for error printf */ 137*0Sstevel@tonic-gate #define NFSMNT_INT 0x040 /* allow interrupts on hard mount */ 138*0Sstevel@tonic-gate #define NFSMNT_NOAC 0x080 /* don't cache attributes */ 139*0Sstevel@tonic-gate #define NFSMNT_ACREGMIN 0x0100 /* set min secs for file attr cache */ 140*0Sstevel@tonic-gate #define NFSMNT_ACREGMAX 0x0200 /* set max secs for file attr cache */ 141*0Sstevel@tonic-gate #define NFSMNT_ACDIRMIN 0x0400 /* set min secs for dir attr cache */ 142*0Sstevel@tonic-gate #define NFSMNT_ACDIRMAX 0x0800 /* set max secs for dir attr cache */ 143*0Sstevel@tonic-gate #define NFSMNT_SECURE 0x1000 /* secure mount */ 144*0Sstevel@tonic-gate #define NFSMNT_NOCTO 0x2000 /* no close-to-open consistency */ 145*0Sstevel@tonic-gate #define NFSMNT_KNCONF 0x4000 /* transport's knetconfig structure */ 146*0Sstevel@tonic-gate #define NFSMNT_GRPID 0x8000 /* System V-style gid inheritance */ 147*0Sstevel@tonic-gate #define NFSMNT_RPCTIMESYNC 0x10000 /* use RPC to do secure NFS time sync */ 148*0Sstevel@tonic-gate #define NFSMNT_KERBEROS 0x20000 /* use kerberos credentials */ 149*0Sstevel@tonic-gate #define NFSMNT_POSIX 0x40000 /* static pathconf kludge info */ 150*0Sstevel@tonic-gate #define NFSMNT_LLOCK 0x80000 /* Local locking (no lock manager) */ 151*0Sstevel@tonic-gate #define NFSMNT_LOOPBACK 0x100000 /* Is a loopback mount */ 152*0Sstevel@tonic-gate #define NFSMNT_SEMISOFT 0x200000 /* read soft, modify hard */ 153*0Sstevel@tonic-gate #define NFSMNT_NOPRINT 0x400000 /* don't print messages */ 154*0Sstevel@tonic-gate #define NFSMNT_NEWARGS 0x800000 /* using nfs_args extented structure */ 155*0Sstevel@tonic-gate #define NFSMNT_DIRECTIO 0x1000000 /* do direct I/O */ 156*0Sstevel@tonic-gate #define NFSMNT_PUBLIC 0x2000000 /* mount was done with url/public */ 157*0Sstevel@tonic-gate #define NFSMNT_SECDEFAULT 0x4000000 /* mount using default sec flavor */ 158*0Sstevel@tonic-gate #define NFSMNT_TRYRDMA 0x8000000 /* Try RDMA mount,no proto advised */ 159*0Sstevel@tonic-gate #define NFSMNT_DORDMA 0x10000000 /* Do an RDMA mount, regardless */ 160*0Sstevel@tonic-gate 161*0Sstevel@tonic-gate #ifdef __cplusplus 162*0Sstevel@tonic-gate } 163*0Sstevel@tonic-gate #endif 164*0Sstevel@tonic-gate 165*0Sstevel@tonic-gate #endif /* _NFS_MOUNT_H */ 166