equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * CDDL HEADER START |
2 * CDDL HEADER START |
3 * |
3 * |
4 * The contents of this file are subject to the terms of the |
4 * The contents of this file are subject to the terms of the |
5 * Common Development and Distribution License, Version 1.0 only |
5 * Common Development and Distribution License (the "License"). |
6 * (the "License"). You may not use this file except in compliance |
6 * You may not use this file except in compliance with the License. |
7 * with the License. |
|
8 * |
7 * |
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
10 * or http://www.opensolaris.org/os/licensing. |
9 * or http://www.opensolaris.org/os/licensing. |
11 * See the License for the specific language governing permissions |
10 * See the License for the specific language governing permissions |
12 * and limitations under the License. |
11 * and limitations under the License. |
17 * fields enclosed by brackets "[]" replaced with your own identifying |
16 * fields enclosed by brackets "[]" replaced with your own identifying |
18 * information: Portions Copyright [yyyy] [name of copyright owner] |
17 * information: Portions Copyright [yyyy] [name of copyright owner] |
19 * |
18 * |
20 * CDDL HEADER END |
19 * CDDL HEADER END |
21 */ |
20 */ |
|
21 |
22 /* |
22 /* |
23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved. |
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. |
24 * Use is subject to license terms. |
24 * Use is subject to license terms. |
25 */ |
25 */ |
26 |
26 |
27 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ |
27 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ |
28 /* All Rights Reserved */ |
28 /* All Rights Reserved */ |
30 /* |
30 /* |
31 * Portions of this source code were derived from Berkeley 4.3 BSD |
31 * Portions of this source code were derived from Berkeley 4.3 BSD |
32 * under license from the Regents of the University of California. |
32 * under license from the Regents of the University of California. |
33 */ |
33 */ |
34 |
34 |
|
35 /* |
|
36 * Note: <sharefs/share.h> must be included before this file. |
|
37 */ |
|
38 |
35 #ifndef _SHARETAB_H |
39 #ifndef _SHARETAB_H |
36 #define _SHARETAB_H |
40 #define _SHARETAB_H |
37 |
41 |
38 #pragma ident "%Z%%M% %I% %E% SMI" |
42 #pragma ident "%Z%%M% %I% %E% SMI" |
39 |
43 |
40 #ifdef __cplusplus |
44 #ifdef __cplusplus |
41 extern "C" { |
45 extern "C" { |
42 #endif |
46 #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 |
47 |
60 #define SHOPT_RO "ro" |
48 #define SHOPT_RO "ro" |
61 #define SHOPT_RW "rw" |
49 #define SHOPT_RW "rw" |
62 |
50 |
63 #define SHOPT_SEC "sec" |
51 #define SHOPT_SEC "sec" |
75 /* XXX The following are added for testing volatile fh's purposes only */ |
63 /* XXX The following are added for testing volatile fh's purposes only */ |
76 #ifdef VOLATILE_FH_TEST |
64 #ifdef VOLATILE_FH_TEST |
77 #define SHOPT_VOLFH "volfh" |
65 #define SHOPT_VOLFH "volfh" |
78 #endif /* VOLATILE_FH_TEST */ |
66 #endif /* VOLATILE_FH_TEST */ |
79 |
67 |
80 int getshare(FILE *, struct share **); |
68 int getshare(FILE *, share_t **); |
81 int putshare(FILE *, struct share *); |
69 char *getshareopt(char *, char *); |
82 int remshare(FILE *, char *, int *); |
70 share_t *sharedup(share_t *); |
83 char *getshareopt(char *, char *); |
71 void sharefree(share_t *); |
84 struct share *sharedup(struct share *); |
|
85 void sharefree(struct share *); |
|
86 |
72 |
87 #ifdef __cplusplus |
73 #ifdef __cplusplus |
88 } |
74 } |
89 #endif |
75 #endif |
90 |
76 |