17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 57c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 67c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 77c478bd9Sstevel@tonic-gate * with the License. 87c478bd9Sstevel@tonic-gate * 97c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 107c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 117c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 127c478bd9Sstevel@tonic-gate * and limitations under the License. 137c478bd9Sstevel@tonic-gate * 147c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 157c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 167c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 177c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 187c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 197c478bd9Sstevel@tonic-gate * 207c478bd9Sstevel@tonic-gate * CDDL HEADER END 217c478bd9Sstevel@tonic-gate */ 227c478bd9Sstevel@tonic-gate /* 237c478bd9Sstevel@tonic-gate * Copyright 1993 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 27*5d54f3d8Smuffin #ifndef _sys_mount_h 28*5d54f3d8Smuffin #define _sys_mount_h 29*5d54f3d8Smuffin 307c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate /* 337c478bd9Sstevel@tonic-gate * mount options 347c478bd9Sstevel@tonic-gate */ 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate #define M_RDONLY 0x01 /* mount fs read only */ 377c478bd9Sstevel@tonic-gate #define M_NOSUID 0x02 /* mount fs with setuid not allowed */ 387c478bd9Sstevel@tonic-gate #define M_NEWTYPE 0x04 /* use type string instead of int */ 397c478bd9Sstevel@tonic-gate #define M_GRPID 0x08 /* Old BSD group-id on create */ 407c478bd9Sstevel@tonic-gate #define M_REMOUNT 0x10 /* change options on an existing mount */ 417c478bd9Sstevel@tonic-gate #define M_NOSUB 0x20 /* Disallow mounts beneath this mount */ 427c478bd9Sstevel@tonic-gate #define M_MULTI 0x40 /* Do multi-component lookup on files */ 437c478bd9Sstevel@tonic-gate #define M_SYS5 0x80 /* Mount with Sys 5-specific semantics */ 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gate struct ufs_args { 467c478bd9Sstevel@tonic-gate char *fspec; 477c478bd9Sstevel@tonic-gate }; 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gate #define _PC_LAST 9 /* highest value of any _PC_ */ 517c478bd9Sstevel@tonic-gate #define _BITS (8 * sizeof(short)) 527c478bd9Sstevel@tonic-gate #define _PC_N ((_PC_LAST + _BITS - 1) / _BITS) 537c478bd9Sstevel@tonic-gate #define _PC_ISSET(n, a) (a[(n) / _BITS] & (1 << ((n) % _BITS))) 547c478bd9Sstevel@tonic-gate #define _PC_SET(n, a) (a[(n) / _BITS] |= (1 << ((n) % _BITS))) 557c478bd9Sstevel@tonic-gate #define _PC_ERROR 0 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate struct pathcnf { 587c478bd9Sstevel@tonic-gate /* 597c478bd9Sstevel@tonic-gate * pathconf() information 607c478bd9Sstevel@tonic-gate */ 617c478bd9Sstevel@tonic-gate int pc_link_max; /* max links allowed */ 627c478bd9Sstevel@tonic-gate short pc_max_canon; /* max line len for a tty */ 637c478bd9Sstevel@tonic-gate short pc_max_input; /* input a tty can eat all once */ 647c478bd9Sstevel@tonic-gate short pc_name_max; /* max file name length (dir entry) */ 657c478bd9Sstevel@tonic-gate short pc_path_max; /* path name len (/x/y/z/...) */ 667c478bd9Sstevel@tonic-gate short pc_pipe_buf; /* size of a pipe (bytes) */ 677c478bd9Sstevel@tonic-gate cc_t pc_vdisable; /* safe char to turn off c_cc[i] */ 687c478bd9Sstevel@tonic-gate char pc_xxx; /* alignment padding; cc_t == char */ 697c478bd9Sstevel@tonic-gate short pc_mask[_PC_N]; /* see below */ 707c478bd9Sstevel@tonic-gate }; 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate 737c478bd9Sstevel@tonic-gate struct nfs_args { 747c478bd9Sstevel@tonic-gate struct sockaddr_in *addr; /* file server address */ 757c478bd9Sstevel@tonic-gate caddr_t fh; /* File handle to be mounted */ 767c478bd9Sstevel@tonic-gate int flags; /* flags */ 777c478bd9Sstevel@tonic-gate int wsize; /* write size in bytes */ 787c478bd9Sstevel@tonic-gate int rsize; /* read size in bytes */ 797c478bd9Sstevel@tonic-gate int timeo; /* initial timeout in .1 secs */ 807c478bd9Sstevel@tonic-gate int retrans; /* times to retry send */ 817c478bd9Sstevel@tonic-gate char *hostname; /* server's hostname */ 827c478bd9Sstevel@tonic-gate int acregmin; /* attr cache file min secs */ 837c478bd9Sstevel@tonic-gate int acregmax; /* attr cache file max secs */ 847c478bd9Sstevel@tonic-gate int acdirmin; /* attr cache dir min secs */ 857c478bd9Sstevel@tonic-gate int acdirmax; /* attr cache dir max secs */ 867c478bd9Sstevel@tonic-gate char *netname; /* server's netname */ 877c478bd9Sstevel@tonic-gate struct pathcnf *pathconf; /* static pathconf kludge */ 887c478bd9Sstevel@tonic-gate }; 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gate /* 917c478bd9Sstevel@tonic-gate * NFS mount option flags 927c478bd9Sstevel@tonic-gate */ 937c478bd9Sstevel@tonic-gate #define NFSMNT_SOFT 0x001 /* soft mount (hard is default) */ 947c478bd9Sstevel@tonic-gate #define NFSMNT_WSIZE 0x002 /* set write size */ 957c478bd9Sstevel@tonic-gate #define NFSMNT_RSIZE 0x004 /* set read size */ 967c478bd9Sstevel@tonic-gate #define NFSMNT_TIMEO 0x008 /* set initial timeout */ 977c478bd9Sstevel@tonic-gate #define NFSMNT_RETRANS 0x010 /* set number of request retrys */ 987c478bd9Sstevel@tonic-gate #define NFSMNT_HOSTNAME 0x020 /* set hostname for error printf */ 997c478bd9Sstevel@tonic-gate #define NFSMNT_INT 0x040 /* allow interrupts on hard mount */ 1007c478bd9Sstevel@tonic-gate #define NFSMNT_NOAC 0x080 /* don't cache attributes */ 1017c478bd9Sstevel@tonic-gate #define NFSMNT_ACREGMIN 0x0100 /* set min secs for file attr cache */ 1027c478bd9Sstevel@tonic-gate #define NFSMNT_ACREGMAX 0x0200 /* set max secs for file attr cache */ 1037c478bd9Sstevel@tonic-gate #define NFSMNT_ACDIRMIN 0x0400 /* set min secs for dir attr cache */ 1047c478bd9Sstevel@tonic-gate #define NFSMNT_ACDIRMAX 0x0800 /* set max secs for dir attr cache */ 1057c478bd9Sstevel@tonic-gate #define NFSMNT_SECURE 0x1000 /* secure mount */ 1067c478bd9Sstevel@tonic-gate #define NFSMNT_NOCTO 0x2000 /* no close-to-open consistency */ 1077c478bd9Sstevel@tonic-gate #define NFSMNT_POSIX 0x4000 /* static pathconf kludge info */ 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gate #endif /* !_sys_mount_h */ 110