10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*5302Sth199096 * Common Development and Distribution License (the "License"). 6*5302Sth199096 * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 22*5302Sth199096 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate /* 270Sstevel@tonic-gate * Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T 280Sstevel@tonic-gate * All Rights Reserved 290Sstevel@tonic-gate */ 300Sstevel@tonic-gate 310Sstevel@tonic-gate #ifndef _NFS_MOUNT_H 320Sstevel@tonic-gate #define _NFS_MOUNT_H 330Sstevel@tonic-gate 340Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 350Sstevel@tonic-gate 360Sstevel@tonic-gate #ifdef __cplusplus 370Sstevel@tonic-gate extern "C" { 380Sstevel@tonic-gate #endif 390Sstevel@tonic-gate 400Sstevel@tonic-gate #include <sys/pathconf.h> /* static pathconf kludge */ 410Sstevel@tonic-gate 420Sstevel@tonic-gate 430Sstevel@tonic-gate #define NFS_ARGS_EXTA 1 440Sstevel@tonic-gate #define NFS_ARGS_EXTB 2 450Sstevel@tonic-gate 460Sstevel@tonic-gate /* 470Sstevel@tonic-gate * extension data for nfs_args_ext == NFS_ARGS_EXTA. 480Sstevel@tonic-gate */ 490Sstevel@tonic-gate struct nfs_args_extA { 500Sstevel@tonic-gate struct sec_data *secdata; /* security data */ 510Sstevel@tonic-gate }; 520Sstevel@tonic-gate 530Sstevel@tonic-gate /* 540Sstevel@tonic-gate * extension data for nfs_args_ext == NFS_ARGS_EXTB. 550Sstevel@tonic-gate */ 560Sstevel@tonic-gate struct nfs_args_extB { 570Sstevel@tonic-gate struct sec_data *secdata; /* security data */ 580Sstevel@tonic-gate struct nfs_args *next; /* link for failover */ 590Sstevel@tonic-gate }; 600Sstevel@tonic-gate 610Sstevel@tonic-gate /* 620Sstevel@tonic-gate * Union structure for future extension. 630Sstevel@tonic-gate */ 640Sstevel@tonic-gate union nfs_ext { 650Sstevel@tonic-gate struct nfs_args_extA nfs_extA; /* nfs_args extension v1 */ 660Sstevel@tonic-gate struct nfs_args_extB nfs_extB; /* nfs_args extension v2 */ 670Sstevel@tonic-gate }; 680Sstevel@tonic-gate 690Sstevel@tonic-gate struct nfs_args { 700Sstevel@tonic-gate struct netbuf *addr; /* file server address */ 710Sstevel@tonic-gate struct netbuf *syncaddr; /* secure NFS time sync addr */ 720Sstevel@tonic-gate struct knetconfig *knconf; /* transport netconfig struct */ 730Sstevel@tonic-gate char *hostname; /* server's hostname */ 740Sstevel@tonic-gate char *netname; /* server's netname */ 750Sstevel@tonic-gate caddr_t fh; /* File handle to be mounted */ 760Sstevel@tonic-gate int flags; /* flags */ 770Sstevel@tonic-gate int wsize; /* write size in bytes */ 780Sstevel@tonic-gate int rsize; /* read size in bytes */ 790Sstevel@tonic-gate int timeo; /* initial timeout in .1 secs */ 800Sstevel@tonic-gate int retrans; /* times to retry send */ 810Sstevel@tonic-gate int acregmin; /* attr cache file min secs */ 820Sstevel@tonic-gate int acregmax; /* attr cache file max secs */ 830Sstevel@tonic-gate int acdirmin; /* attr cache dir min secs */ 840Sstevel@tonic-gate int acdirmax; /* attr cache dir max secs */ 850Sstevel@tonic-gate struct pathcnf *pathconf; /* static pathconf kludge */ 860Sstevel@tonic-gate int nfs_args_ext; /* the nfs_args extension id */ 870Sstevel@tonic-gate union nfs_ext nfs_ext_u; /* extension union structure */ 880Sstevel@tonic-gate }; 890Sstevel@tonic-gate 900Sstevel@tonic-gate #ifdef _SYSCALL32 910Sstevel@tonic-gate struct nfs_args_extA32 { 920Sstevel@tonic-gate caddr32_t secdata; /* security data */ 930Sstevel@tonic-gate }; 940Sstevel@tonic-gate 950Sstevel@tonic-gate struct nfs_args_extB32 { 960Sstevel@tonic-gate caddr32_t secdata; /* security data */ 970Sstevel@tonic-gate caddr32_t next; /* link for failover */ 980Sstevel@tonic-gate }; 990Sstevel@tonic-gate 1000Sstevel@tonic-gate union nfs_ext32 { 1010Sstevel@tonic-gate struct nfs_args_extA32 nfs_extA; /* nfs_args extension v1 */ 1020Sstevel@tonic-gate struct nfs_args_extB32 nfs_extB; /* nfs_args extension v2 */ 1030Sstevel@tonic-gate }; 1040Sstevel@tonic-gate 1050Sstevel@tonic-gate struct nfs_args32 { 1060Sstevel@tonic-gate caddr32_t addr; /* file server address */ 1070Sstevel@tonic-gate caddr32_t syncaddr; /* secure NFS time sync addr */ 1080Sstevel@tonic-gate caddr32_t knconf; /* transport netconfig struct */ 1090Sstevel@tonic-gate caddr32_t hostname; /* server's hostname */ 1100Sstevel@tonic-gate caddr32_t netname; /* server's netname */ 1110Sstevel@tonic-gate caddr32_t fh; /* File handle to be mounted */ 1120Sstevel@tonic-gate int32_t flags; /* flags */ 1130Sstevel@tonic-gate int32_t wsize; /* write size in bytes */ 1140Sstevel@tonic-gate int32_t rsize; /* read size in bytes */ 1150Sstevel@tonic-gate int32_t timeo; /* initial timeout in .1 secs */ 1160Sstevel@tonic-gate int32_t retrans; /* times to retry send */ 1170Sstevel@tonic-gate int32_t acregmin; /* attr cache file min secs */ 1180Sstevel@tonic-gate int32_t acregmax; /* attr cache file max secs */ 1190Sstevel@tonic-gate int32_t acdirmin; /* attr cache dir min secs */ 1200Sstevel@tonic-gate int32_t acdirmax; /* attr cache dir max secs */ 1210Sstevel@tonic-gate caddr32_t pathconf; /* static pathconf kludge */ 1220Sstevel@tonic-gate int32_t nfs_args_ext; /* the nfs_args extension id */ 1230Sstevel@tonic-gate union nfs_ext32 nfs_ext_u; /* extension union structure */ 1240Sstevel@tonic-gate }; 1250Sstevel@tonic-gate #endif /* _SYSCALL32 */ 1260Sstevel@tonic-gate 1270Sstevel@tonic-gate /* 1280Sstevel@tonic-gate * NFS mount option flags 1290Sstevel@tonic-gate */ 1300Sstevel@tonic-gate #define NFSMNT_SOFT 0x001 /* soft mount (hard is default) */ 1310Sstevel@tonic-gate #define NFSMNT_WSIZE 0x002 /* set write size */ 1320Sstevel@tonic-gate #define NFSMNT_RSIZE 0x004 /* set read size */ 1330Sstevel@tonic-gate #define NFSMNT_TIMEO 0x008 /* set initial timeout */ 1340Sstevel@tonic-gate #define NFSMNT_RETRANS 0x010 /* set number of request retrys */ 1350Sstevel@tonic-gate #define NFSMNT_HOSTNAME 0x020 /* set hostname for error printf */ 1360Sstevel@tonic-gate #define NFSMNT_INT 0x040 /* allow interrupts on hard mount */ 1370Sstevel@tonic-gate #define NFSMNT_NOAC 0x080 /* don't cache attributes */ 1380Sstevel@tonic-gate #define NFSMNT_ACREGMIN 0x0100 /* set min secs for file attr cache */ 1390Sstevel@tonic-gate #define NFSMNT_ACREGMAX 0x0200 /* set max secs for file attr cache */ 1400Sstevel@tonic-gate #define NFSMNT_ACDIRMIN 0x0400 /* set min secs for dir attr cache */ 1410Sstevel@tonic-gate #define NFSMNT_ACDIRMAX 0x0800 /* set max secs for dir attr cache */ 1420Sstevel@tonic-gate #define NFSMNT_SECURE 0x1000 /* secure mount */ 1430Sstevel@tonic-gate #define NFSMNT_NOCTO 0x2000 /* no close-to-open consistency */ 1440Sstevel@tonic-gate #define NFSMNT_KNCONF 0x4000 /* transport's knetconfig structure */ 1450Sstevel@tonic-gate #define NFSMNT_GRPID 0x8000 /* System V-style gid inheritance */ 1460Sstevel@tonic-gate #define NFSMNT_RPCTIMESYNC 0x10000 /* use RPC to do secure NFS time sync */ 1470Sstevel@tonic-gate #define NFSMNT_KERBEROS 0x20000 /* use kerberos credentials */ 1480Sstevel@tonic-gate #define NFSMNT_POSIX 0x40000 /* static pathconf kludge info */ 1490Sstevel@tonic-gate #define NFSMNT_LLOCK 0x80000 /* Local locking (no lock manager) */ 1500Sstevel@tonic-gate #define NFSMNT_LOOPBACK 0x100000 /* Is a loopback mount */ 1510Sstevel@tonic-gate #define NFSMNT_SEMISOFT 0x200000 /* read soft, modify hard */ 1520Sstevel@tonic-gate #define NFSMNT_NOPRINT 0x400000 /* don't print messages */ 1530Sstevel@tonic-gate #define NFSMNT_NEWARGS 0x800000 /* using nfs_args extented structure */ 1540Sstevel@tonic-gate #define NFSMNT_DIRECTIO 0x1000000 /* do direct I/O */ 1550Sstevel@tonic-gate #define NFSMNT_PUBLIC 0x2000000 /* mount was done with url/public */ 1560Sstevel@tonic-gate #define NFSMNT_SECDEFAULT 0x4000000 /* mount using default sec flavor */ 1570Sstevel@tonic-gate #define NFSMNT_TRYRDMA 0x8000000 /* Try RDMA mount,no proto advised */ 1580Sstevel@tonic-gate #define NFSMNT_DORDMA 0x10000000 /* Do an RDMA mount, regardless */ 159*5302Sth199096 #define NFSMNT_MIRRORMOUNT 0x20000000 /* Is a mirrormount */ 160*5302Sth199096 161*5302Sth199096 /* 162*5302Sth199096 * This will have to change when we do referrals. 163*5302Sth199096 */ 164*5302Sth199096 #define NFSMNT_EPHEMERAL NFSMNT_MIRRORMOUNT 1650Sstevel@tonic-gate 1660Sstevel@tonic-gate #ifdef __cplusplus 1670Sstevel@tonic-gate } 1680Sstevel@tonic-gate #endif 1690Sstevel@tonic-gate 1700Sstevel@tonic-gate #endif /* _NFS_MOUNT_H */ 171