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