1a237e38eSth /*
2a237e38eSth  * CDDL HEADER START
3a237e38eSth  *
4a237e38eSth  * The contents of this file are subject to the terms of the
5a237e38eSth  * Common Development and Distribution License (the "License").
6a237e38eSth  * You may not use this file except in compliance with the License.
7a237e38eSth  *
8a237e38eSth  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9a237e38eSth  * or http://www.opensolaris.org/os/licensing.
10a237e38eSth  * See the License for the specific language governing permissions
11a237e38eSth  * and limitations under the License.
12a237e38eSth  *
13a237e38eSth  * When distributing Covered Code, include this CDDL HEADER in each
14a237e38eSth  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15a237e38eSth  * If applicable, add the following below this CDDL HEADER, with the
16a237e38eSth  * fields enclosed by brackets "[]" replaced with your own identifying
17a237e38eSth  * information: Portions Copyright [yyyy] [name of copyright owner]
18a237e38eSth  *
19a237e38eSth  * CDDL HEADER END
20a237e38eSth  */
21a237e38eSth /*
22*0616fd7fSPavel Filipensky  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
23a237e38eSth  */
24a237e38eSth 
25a237e38eSth #ifndef _SHAREFS_SHARETAB_H
26a237e38eSth #define	_SHAREFS_SHARETAB_H
27a237e38eSth 
28*0616fd7fSPavel Filipensky #include <sys/pkp_hash.h>
29a237e38eSth 
30a237e38eSth /*
31a237e38eSth  * This header defines the glue to keeping a sharetab in memory.
32a237e38eSth  * It is broken out from sharefs.h in the case that it will be
33a237e38eSth  * reused in userland.
34a237e38eSth  */
35a237e38eSth 
36a237e38eSth /*
37a237e38eSth  * Note:
38a237e38eSth  * Must include share/share.h before this header.
39a237e38eSth  */
40a237e38eSth 
41a237e38eSth #ifdef __cplusplus
42a237e38eSth extern "C" {
43a237e38eSth #endif
44a237e38eSth 
45a237e38eSth typedef struct sh_list {		/* cached share list */
46a237e38eSth 	struct sh_list	*shl_next;
47a237e38eSth 	share_t		*shl_sh;
48a237e38eSth } sh_list_t;
49a237e38eSth 
50a237e38eSth typedef struct sharefs_hash_head {
51a237e38eSth 	share_t		*ssh_sh;
52a237e38eSth 	uint_t		ssh_count;
53a237e38eSth } sharefs_hash_head_t;
54a237e38eSth 
55*0616fd7fSPavel Filipensky #define	SHARETAB_HASHES		PKP_HASH_SIZE
56a237e38eSth 
57a237e38eSth typedef struct sharetab {
58a237e38eSth 	sharefs_hash_head_t	s_buckets[SHARETAB_HASHES];
59a237e38eSth 	char			*s_fstype;
60a237e38eSth 	struct sharetab		*s_next;
61a237e38eSth 	uint_t			s_count;
62a237e38eSth } sharetab_t;
63a237e38eSth 
64a237e38eSth #ifdef __cplusplus
65a237e38eSth }
66a237e38eSth #endif
67a237e38eSth 
68a237e38eSth #endif /* !_SHAREFS_SHARETAB_H */
69