4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 2002-2003, Network Appliance, Inc. All rights reserved.
27 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
28 * Use is subject to license terms.
35 * PURPOSE: Utility defs & routines for the hash data structure
37 * $Id: dapl_hash.h,v 1.4 2003/06/13 12:21:09 sjs2 Exp $
59 * Default is small; use the larger sample values for hash tables
60 * known to be heavily used. The sample values chosen are the
61 * largest primes below 2^8, 2^9, and 2^10.
63 #define DAPL_DEF_HASHSIZE 251
64 #define DAPL_MED_HASHSIZE 509
65 #define DAPL_LRG_HASHSIZE 1021
67 #define DAPL_HASH_TABLE_DEFAULT_CAPACITY DAPL_DEF_HASHSIZE
70 DAPL_HASH_ITERATE_INIT
= 1,
71 DAPL_HASH_ITERATE_NEXT
83 IN DAT_COUNT capacity
,
84 IN DAT_BOOLEAN locking_required
,
85 OUT DAPL_HASH_TABLE
**pp_table
);
89 IN DAPL_HASH_TABLE
*p_table
);
93 IN DAPL_HASH_TABLE
*p_table
,
94 OUT DAT_COUNT
*p_size
);
98 IN DAPL_HASH_TABLE
*p_table
,
100 IN DAPL_HASH_DATA data
);
104 IN DAPL_HASH_TABLE
*p_table
,
105 IN DAPL_HASH_KEY key
,
106 OUT DAPL_HASH_DATA
*p_data
);
110 IN DAPL_HASH_TABLE
*p_table
,
111 IN DAPL_HASH_KEY key
,
112 OUT DAPL_HASH_DATA
*p_data
);
116 IN DAPL_HASH_TABLE
*p_table
,
117 IN DAPL_HASH_ITERATOR op
,
118 OUT DAPL_HASH_DATA
*p_data
);
124 #endif /* _DAPL_HASH_H_ */