1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ 28 /* All Rights Reserved */ 29 30 /* 31 * Portions of this source code were derived from Berkeley 4.3 BSD 32 * under license from the Regents of the University of California. 33 */ 34 35 #ifndef _SHARETAB_H 36 #define _SHARETAB_H 37 38 #pragma ident "%Z%%M% %I% %E% SMI" 39 40 #ifdef __cplusplus 41 extern "C" { 42 #endif 43 44 struct share { 45 char *sh_path; 46 char *sh_res; 47 char *sh_fstype; 48 char *sh_opts; 49 char *sh_descr; 50 }; 51 52 struct sh_list { /* cached share list */ 53 struct sh_list *shl_next; 54 struct share *shl_sh; 55 }; 56 57 #define SHARETAB "/etc/dfs/sharetab" 58 #define MAXBUFSIZE 65536 59 60 #define SHOPT_RO "ro" 61 #define SHOPT_RW "rw" 62 63 #define SHOPT_SEC "sec" 64 #define SHOPT_SECURE "secure" 65 #define SHOPT_ROOT "root" 66 #define SHOPT_ANON "anon" 67 #define SHOPT_WINDOW "window" 68 #define SHOPT_NOSUB "nosub" 69 #define SHOPT_NOSUID "nosuid" 70 #define SHOPT_ACLOK "aclok" 71 #define SHOPT_PUBLIC "public" 72 #define SHOPT_INDEX "index" 73 #define SHOPT_LOG "log" 74 75 /* XXX The following are added for testing volatile fh's purposes only */ 76 #ifdef VOLATILE_FH_TEST 77 #define SHOPT_VOLFH "volfh" 78 #endif /* VOLATILE_FH_TEST */ 79 80 int getshare(FILE *, struct share **); 81 int putshare(FILE *, struct share *); 82 int remshare(FILE *, char *, int *); 83 char *getshareopt(char *, char *); 84 struct share *sharedup(struct share *); 85 void sharefree(struct share *); 86 87 #ifdef __cplusplus 88 } 89 #endif 90 91 #endif /* !_SHARETAB_H */ 92