Home | History | Annotate | Download | only in common
      1  0  stevel /*
      2  0  stevel  * CDDL HEADER START
      3  0  stevel  *
      4  0  stevel  * The contents of this file are subject to the terms of the
      5  0  stevel  * Common Development and Distribution License, Version 1.0 only
      6  0  stevel  * (the "License").  You may not use this file except in compliance
      7  0  stevel  * with the License.
      8  0  stevel  *
      9  0  stevel  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
     10  0  stevel  * or http://www.opensolaris.org/os/licensing.
     11  0  stevel  * See the License for the specific language governing permissions
     12  0  stevel  * and limitations under the License.
     13  0  stevel  *
     14  0  stevel  * When distributing Covered Code, include this CDDL HEADER in each
     15  0  stevel  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     16  0  stevel  * If applicable, add the following below this CDDL HEADER, with the
     17  0  stevel  * fields enclosed by brackets "[]" replaced with your own identifying
     18  0  stevel  * information: Portions Copyright [yyyy] [name of copyright owner]
     19  0  stevel  *
     20  0  stevel  * CDDL HEADER END
     21  0  stevel  */
     22  0  stevel /*
     23  0  stevel  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
     24  0  stevel  * Use is subject to license terms.
     25  0  stevel  */
     26  0  stevel 
     27  0  stevel #ifndef	_DICT_H
     28  0  stevel #define	_DICT_H
     29  0  stevel 
     30  0  stevel #pragma ident	"%Z%%M%	%I%	%E% SMI"
     31  0  stevel 
     32  0  stevel #ifdef	__cplusplus
     33  0  stevel extern "C" {
     34  0  stevel #endif
     35  0  stevel 
     36  0  stevel typedef struct dict_hdl dict_hdl_t;
     37  0  stevel 
     38  0  stevel /*
     39  0  stevel  * Hash functions
     40  0  stevel  */
     41  0  stevel 
     42  0  stevel extern uint64_t		hash_buf(const void *, size_t);
     43  0  stevel extern uint64_t		hash_str(const char *);
     44  0  stevel 
     45  0  stevel /*
     46  0  stevel  * Dictionary functions
     47  0  stevel  */
     48  0  stevel extern void		dict_free(dict_hdl_t **);
     49  0  stevel extern uint64_t		dict_length(dict_hdl_t *);
     50  0  stevel extern dict_hdl_t	*dict_new(int (*)(const void *, const void *),
     51  0  stevel     uint64_t (*)(const void *));
     52  0  stevel 
     53  0  stevel /*
     54  0  stevel  * Dictionary entry functions
     55  0  stevel  */
     56  0  stevel 
     57  0  stevel extern void		*dict_get(dict_hdl_t *, const void *);
     58  0  stevel extern void		*dict_put(dict_hdl_t *, const void *, void *);
     59  0  stevel extern void		*dict_remove(dict_hdl_t *, const void *);
     60  0  stevel 
     61  0  stevel extern void		dict_map(dict_hdl_t *,
     62  0  stevel     void (*)(const void *, void **, void *), void *);
     63  0  stevel 
     64  0  stevel /*
     65  0  stevel  * Dictionary conversion
     66  0  stevel  */
     67  0  stevel 
     68  0  stevel #ifdef	__cplusplus
     69  0  stevel }
     70  0  stevel #endif
     71  0  stevel 
     72  0  stevel #endif	/* _DICT_H */
     73