xref: /onnv-gate/usr/src/lib/libuutil/common/libuutil.h (revision 471:fb6202c3da23)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
50Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
60Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
70Sstevel@tonic-gate  * with the License.
80Sstevel@tonic-gate  *
90Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
100Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
110Sstevel@tonic-gate  * See the License for the specific language governing permissions
120Sstevel@tonic-gate  * and limitations under the License.
130Sstevel@tonic-gate  *
140Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
150Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
160Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
170Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
180Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
190Sstevel@tonic-gate  *
200Sstevel@tonic-gate  * CDDL HEADER END
210Sstevel@tonic-gate  */
220Sstevel@tonic-gate /*
23*471Shg115875  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate  * Use is subject to license terms.
250Sstevel@tonic-gate  */
260Sstevel@tonic-gate 
270Sstevel@tonic-gate #ifndef	_LIBUUTIL_H
280Sstevel@tonic-gate #define	_LIBUUTIL_H
290Sstevel@tonic-gate 
300Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
310Sstevel@tonic-gate 
320Sstevel@tonic-gate #include <sys/types.h>
330Sstevel@tonic-gate #include <stdarg.h>
340Sstevel@tonic-gate 
350Sstevel@tonic-gate #ifdef	__cplusplus
360Sstevel@tonic-gate extern "C" {
370Sstevel@tonic-gate #endif
380Sstevel@tonic-gate 
390Sstevel@tonic-gate /*
400Sstevel@tonic-gate  * Standard flags codes.
410Sstevel@tonic-gate  */
420Sstevel@tonic-gate #define	UU_DEFAULT		0
430Sstevel@tonic-gate 
440Sstevel@tonic-gate /*
450Sstevel@tonic-gate  * Standard error codes.
460Sstevel@tonic-gate  */
470Sstevel@tonic-gate #define	UU_ERROR_NONE		0	/* no error */
480Sstevel@tonic-gate #define	UU_ERROR_INVALID_ARGUMENT 1	/* invalid argument */
490Sstevel@tonic-gate #define	UU_ERROR_UNKNOWN_FLAG	2	/* passed flag invalid */
500Sstevel@tonic-gate #define	UU_ERROR_NO_MEMORY	3	/* out of memory */
510Sstevel@tonic-gate #define	UU_ERROR_CALLBACK_FAILED 4	/* callback-initiated error */
520Sstevel@tonic-gate #define	UU_ERROR_NOT_SUPPORTED	5	/* operation not supported */
530Sstevel@tonic-gate #define	UU_ERROR_EMPTY		6	/* no value provided */
540Sstevel@tonic-gate #define	UU_ERROR_UNDERFLOW	7	/* value is too small */
550Sstevel@tonic-gate #define	UU_ERROR_OVERFLOW	8	/* value is too value */
560Sstevel@tonic-gate #define	UU_ERROR_INVALID_CHAR	9	/* value contains unexpected char */
570Sstevel@tonic-gate #define	UU_ERROR_INVALID_DIGIT	10	/* value contains digit not in base */
580Sstevel@tonic-gate 
590Sstevel@tonic-gate #define	UU_ERROR_SYSTEM		99	/* underlying system error */
600Sstevel@tonic-gate #define	UU_ERROR_UNKNOWN	100	/* error status not known */
610Sstevel@tonic-gate 
620Sstevel@tonic-gate /*
630Sstevel@tonic-gate  * Standard program exit codes.
640Sstevel@tonic-gate  */
650Sstevel@tonic-gate #define	UU_EXIT_OK	(*(uu_exit_ok()))
660Sstevel@tonic-gate #define	UU_EXIT_FATAL	(*(uu_exit_fatal()))
670Sstevel@tonic-gate #define	UU_EXIT_USAGE	(*(uu_exit_usage()))
680Sstevel@tonic-gate 
690Sstevel@tonic-gate /*
700Sstevel@tonic-gate  * Exit status profiles.
710Sstevel@tonic-gate  */
720Sstevel@tonic-gate #define	UU_PROFILE_DEFAULT	0
730Sstevel@tonic-gate #define	UU_PROFILE_LAUNCHER	1
740Sstevel@tonic-gate 
750Sstevel@tonic-gate /*
760Sstevel@tonic-gate  * Error reporting functions.
770Sstevel@tonic-gate  */
780Sstevel@tonic-gate uint32_t uu_error(void);
790Sstevel@tonic-gate const char *uu_strerror(uint32_t);
800Sstevel@tonic-gate 
810Sstevel@tonic-gate /*
820Sstevel@tonic-gate  * Program notification functions.
830Sstevel@tonic-gate  */
840Sstevel@tonic-gate extern void uu_alt_exit(int);
850Sstevel@tonic-gate extern const char *uu_setpname(char *);
860Sstevel@tonic-gate extern const char *uu_getpname(void);
870Sstevel@tonic-gate /*PRINTFLIKE1*/
880Sstevel@tonic-gate extern void uu_warn(const char *, ...);
890Sstevel@tonic-gate extern void uu_vwarn(const char *, va_list);
900Sstevel@tonic-gate /*PRINTFLIKE1*/
91*471Shg115875 extern void uu_die(const char *, ...) __NORETURN;
92*471Shg115875 extern void uu_vdie(const char *, va_list) __NORETURN;
930Sstevel@tonic-gate /*PRINTFLIKE2*/
94*471Shg115875 extern void uu_xdie(int, const char *, ...) __NORETURN;
95*471Shg115875 extern void uu_vxdie(int, const char *, va_list) __NORETURN;
960Sstevel@tonic-gate 
970Sstevel@tonic-gate /*
980Sstevel@tonic-gate  * Exit status functions (not to be used directly)
990Sstevel@tonic-gate  */
1000Sstevel@tonic-gate extern int *uu_exit_ok(void);
1010Sstevel@tonic-gate extern int *uu_exit_fatal(void);
1020Sstevel@tonic-gate extern int *uu_exit_usage(void);
1030Sstevel@tonic-gate 
1040Sstevel@tonic-gate /*
1050Sstevel@tonic-gate  * string->number conversions
1060Sstevel@tonic-gate  */
1070Sstevel@tonic-gate extern int uu_strtoint(const char *, void *, size_t, int, int64_t, int64_t);
1080Sstevel@tonic-gate extern int uu_strtouint(const char *, void *, size_t, int, uint64_t, uint64_t);
1090Sstevel@tonic-gate 
1100Sstevel@tonic-gate /*
1110Sstevel@tonic-gate  * Debug print facility functions.
1120Sstevel@tonic-gate  */
1130Sstevel@tonic-gate typedef struct uu_dprintf uu_dprintf_t;
1140Sstevel@tonic-gate 
1150Sstevel@tonic-gate typedef enum {
1160Sstevel@tonic-gate 	UU_DPRINTF_SILENT,
1170Sstevel@tonic-gate 	UU_DPRINTF_FATAL,
1180Sstevel@tonic-gate 	UU_DPRINTF_WARNING,
1190Sstevel@tonic-gate 	UU_DPRINTF_NOTICE,
1200Sstevel@tonic-gate 	UU_DPRINTF_INFO,
1210Sstevel@tonic-gate 	UU_DPRINTF_DEBUG
1220Sstevel@tonic-gate } uu_dprintf_severity_t;
1230Sstevel@tonic-gate 
1240Sstevel@tonic-gate extern uu_dprintf_t *uu_dprintf_create(const char *, uu_dprintf_severity_t,
1250Sstevel@tonic-gate     uint_t);
1260Sstevel@tonic-gate /*PRINTFLIKE3*/
1270Sstevel@tonic-gate extern void uu_dprintf(uu_dprintf_t *, uu_dprintf_severity_t,
1280Sstevel@tonic-gate     const char *, ...);
1290Sstevel@tonic-gate extern void uu_dprintf_destroy(uu_dprintf_t *);
1300Sstevel@tonic-gate extern const char *uu_dprintf_getname(uu_dprintf_t *);
1310Sstevel@tonic-gate 
1320Sstevel@tonic-gate /*
1330Sstevel@tonic-gate  * Identifier test flags and function.
1340Sstevel@tonic-gate  */
1350Sstevel@tonic-gate #define	UU_NAME_DOMAIN		0x1	/* allow SUNW, or com.sun, prefix */
1360Sstevel@tonic-gate #define	UU_NAME_PATH		0x2	/* allow '/'-delimited paths */
1370Sstevel@tonic-gate 
1380Sstevel@tonic-gate int uu_check_name(const char *, uint_t);
1390Sstevel@tonic-gate 
1400Sstevel@tonic-gate /*
1410Sstevel@tonic-gate  * File creation functions.
1420Sstevel@tonic-gate  */
1430Sstevel@tonic-gate extern int uu_open_tmp(const char *dir, uint_t uflags);
1440Sstevel@tonic-gate 
1450Sstevel@tonic-gate /*
1460Sstevel@tonic-gate  * Convenience functions.
1470Sstevel@tonic-gate  */
1480Sstevel@tonic-gate /*PRINTFLIKE1*/
1490Sstevel@tonic-gate extern char *uu_msprintf(const char *format, ...);
1500Sstevel@tonic-gate extern void *uu_zalloc(size_t);
1510Sstevel@tonic-gate extern void uu_free(void *);
1520Sstevel@tonic-gate 
1530Sstevel@tonic-gate /*
1540Sstevel@tonic-gate  * Comparison function type definition.
1550Sstevel@tonic-gate  *   Developers should be careful in their use of the _private argument. If you
1560Sstevel@tonic-gate  *   break interface guarantees, you get undefined behavior.
1570Sstevel@tonic-gate  */
1580Sstevel@tonic-gate typedef int uu_compare_fn_t(const void *__left, const void *__right,
1590Sstevel@tonic-gate     void *__private);
1600Sstevel@tonic-gate 
1610Sstevel@tonic-gate /*
1620Sstevel@tonic-gate  * Walk variant flags.
1630Sstevel@tonic-gate  *   A data structure need not provide support for all variants and
1640Sstevel@tonic-gate  *   combinations.  Refer to the appropriate documentation.
1650Sstevel@tonic-gate  */
1660Sstevel@tonic-gate #define	UU_WALK_ROBUST		0x00000001	/* walk can survive removes */
1670Sstevel@tonic-gate #define	UU_WALK_REVERSE		0x00000002	/* reverse walk order */
1680Sstevel@tonic-gate 
1690Sstevel@tonic-gate #define	UU_WALK_PREORDER	0x00000010	/* walk tree in pre-order */
1700Sstevel@tonic-gate #define	UU_WALK_POSTORDER	0x00000020	/* walk tree in post-order */
1710Sstevel@tonic-gate 
1720Sstevel@tonic-gate /*
1730Sstevel@tonic-gate  * Walk callback function return codes.
1740Sstevel@tonic-gate  */
1750Sstevel@tonic-gate #define	UU_WALK_ERROR		-1
1760Sstevel@tonic-gate #define	UU_WALK_NEXT		0
1770Sstevel@tonic-gate #define	UU_WALK_DONE		1
1780Sstevel@tonic-gate 
1790Sstevel@tonic-gate /*
1800Sstevel@tonic-gate  * Walk callback function type definition.
1810Sstevel@tonic-gate  */
1820Sstevel@tonic-gate typedef int uu_walk_fn_t(void *_elem, void *_private);
1830Sstevel@tonic-gate 
1840Sstevel@tonic-gate /*
1850Sstevel@tonic-gate  * lists: opaque structures
1860Sstevel@tonic-gate  */
1870Sstevel@tonic-gate typedef struct uu_list_pool uu_list_pool_t;
1880Sstevel@tonic-gate typedef struct uu_list uu_list_t;
1890Sstevel@tonic-gate 
1900Sstevel@tonic-gate typedef struct uu_list_node {
1910Sstevel@tonic-gate 	uintptr_t uln_opaque[2];
1920Sstevel@tonic-gate } uu_list_node_t;
1930Sstevel@tonic-gate 
1940Sstevel@tonic-gate typedef struct uu_list_walk uu_list_walk_t;
1950Sstevel@tonic-gate 
1960Sstevel@tonic-gate typedef uintptr_t uu_list_index_t;
1970Sstevel@tonic-gate 
1980Sstevel@tonic-gate /*
1990Sstevel@tonic-gate  * lists: interface
2000Sstevel@tonic-gate  *
2010Sstevel@tonic-gate  * basic usage:
2020Sstevel@tonic-gate  *	typedef struct foo {
2030Sstevel@tonic-gate  *		...
2040Sstevel@tonic-gate  *		uu_list_node_t foo_node;
2050Sstevel@tonic-gate  *		...
2060Sstevel@tonic-gate  *	} foo_t;
2070Sstevel@tonic-gate  *
2080Sstevel@tonic-gate  *	static int
2090Sstevel@tonic-gate  *	foo_compare(void *l_arg, void *r_arg, void *private)
2100Sstevel@tonic-gate  *	{
2110Sstevel@tonic-gate  *		foo_t *l = l_arg;
2120Sstevel@tonic-gate  *		foo_t *r = r_arg;
2130Sstevel@tonic-gate  *
2140Sstevel@tonic-gate  *		if (... l greater than r ...)
2150Sstevel@tonic-gate  *			return (1);
2160Sstevel@tonic-gate  *		if (... l less than r ...)
2170Sstevel@tonic-gate  *			return (-1);
2180Sstevel@tonic-gate  *		return (0);
2190Sstevel@tonic-gate  *	}
2200Sstevel@tonic-gate  *
2210Sstevel@tonic-gate  *	...
2220Sstevel@tonic-gate  *		// at initialization time
2230Sstevel@tonic-gate  *		foo_pool = uu_list_pool_create("foo_pool",
2240Sstevel@tonic-gate  *		    sizeof (foo_t), offsetof(foo_t, foo_node), foo_compare,
2250Sstevel@tonic-gate  *		    debugging? 0 : UU_AVL_POOL_DEBUG);
2260Sstevel@tonic-gate  *	...
2270Sstevel@tonic-gate  */
2280Sstevel@tonic-gate uu_list_pool_t *uu_list_pool_create(const char *, size_t, size_t,
2290Sstevel@tonic-gate     uu_compare_fn_t *, uint32_t);
2300Sstevel@tonic-gate #define	UU_LIST_POOL_DEBUG	0x00000001
2310Sstevel@tonic-gate 
2320Sstevel@tonic-gate void uu_list_pool_destroy(uu_list_pool_t *);
2330Sstevel@tonic-gate 
2340Sstevel@tonic-gate /*
2350Sstevel@tonic-gate  * usage:
2360Sstevel@tonic-gate  *
2370Sstevel@tonic-gate  *	foo_t *a;
2380Sstevel@tonic-gate  *	a = malloc(sizeof(*a));
2390Sstevel@tonic-gate  *	uu_list_node_init(a, &a->foo_list, pool);
2400Sstevel@tonic-gate  *	...
2410Sstevel@tonic-gate  *	uu_list_node_fini(a, &a->foo_list, pool);
2420Sstevel@tonic-gate  *	free(a);
2430Sstevel@tonic-gate  */
2440Sstevel@tonic-gate void uu_list_node_init(void *, uu_list_node_t *, uu_list_pool_t *);
2450Sstevel@tonic-gate void uu_list_node_fini(void *, uu_list_node_t *, uu_list_pool_t *);
2460Sstevel@tonic-gate 
2470Sstevel@tonic-gate uu_list_t *uu_list_create(uu_list_pool_t *, void *_parent, uint32_t);
2480Sstevel@tonic-gate #define	UU_LIST_DEBUG	0x00000001
2490Sstevel@tonic-gate #define	UU_LIST_SORTED	0x00000002	/* list is sorted */
2500Sstevel@tonic-gate 
2510Sstevel@tonic-gate void uu_list_destroy(uu_list_t *);	/* list must be empty */
2520Sstevel@tonic-gate 
2530Sstevel@tonic-gate size_t uu_list_numnodes(uu_list_t *);
2540Sstevel@tonic-gate 
2550Sstevel@tonic-gate void *uu_list_first(uu_list_t *);
2560Sstevel@tonic-gate void *uu_list_last(uu_list_t *);
2570Sstevel@tonic-gate 
2580Sstevel@tonic-gate void *uu_list_next(uu_list_t *, void *);
2590Sstevel@tonic-gate void *uu_list_prev(uu_list_t *, void *);
2600Sstevel@tonic-gate 
2610Sstevel@tonic-gate int uu_list_walk(uu_list_t *, uu_walk_fn_t *, void *, uint32_t);
2620Sstevel@tonic-gate 
2630Sstevel@tonic-gate uu_list_walk_t *uu_list_walk_start(uu_list_t *, uint32_t);
2640Sstevel@tonic-gate void *uu_list_walk_next(uu_list_walk_t *);
2650Sstevel@tonic-gate void uu_list_walk_end(uu_list_walk_t *);
2660Sstevel@tonic-gate 
2670Sstevel@tonic-gate void *uu_list_find(uu_list_t *, void *, void *, uu_list_index_t *);
2680Sstevel@tonic-gate void uu_list_insert(uu_list_t *, void *, uu_list_index_t);
2690Sstevel@tonic-gate 
2700Sstevel@tonic-gate void *uu_list_nearest_next(uu_list_t *, uu_list_index_t);
2710Sstevel@tonic-gate void *uu_list_nearest_prev(uu_list_t *, uu_list_index_t);
2720Sstevel@tonic-gate 
2730Sstevel@tonic-gate void *uu_list_teardown(uu_list_t *, void **);
2740Sstevel@tonic-gate 
2750Sstevel@tonic-gate void uu_list_remove(uu_list_t *, void *);
2760Sstevel@tonic-gate 
2770Sstevel@tonic-gate /*
2780Sstevel@tonic-gate  * lists: interfaces for non-sorted lists only
2790Sstevel@tonic-gate  */
2800Sstevel@tonic-gate int uu_list_insert_before(uu_list_t *, void *_target, void *_elem);
2810Sstevel@tonic-gate int uu_list_insert_after(uu_list_t *, void *_target, void *_elem);
2820Sstevel@tonic-gate 
2830Sstevel@tonic-gate /*
2840Sstevel@tonic-gate  * avl trees: opaque structures
2850Sstevel@tonic-gate  */
2860Sstevel@tonic-gate typedef struct uu_avl_pool uu_avl_pool_t;
2870Sstevel@tonic-gate typedef struct uu_avl uu_avl_t;
2880Sstevel@tonic-gate 
2890Sstevel@tonic-gate typedef struct uu_avl_node {
2900Sstevel@tonic-gate #ifdef _LP64
2910Sstevel@tonic-gate 	uintptr_t uan_opaque[3];
2920Sstevel@tonic-gate #else
2930Sstevel@tonic-gate 	uintptr_t uan_opaque[4];
2940Sstevel@tonic-gate #endif
2950Sstevel@tonic-gate } uu_avl_node_t;
2960Sstevel@tonic-gate 
2970Sstevel@tonic-gate typedef struct uu_avl_walk uu_avl_walk_t;
2980Sstevel@tonic-gate 
2990Sstevel@tonic-gate typedef uintptr_t uu_avl_index_t;
3000Sstevel@tonic-gate 
3010Sstevel@tonic-gate /*
3020Sstevel@tonic-gate  * avl trees: interface
3030Sstevel@tonic-gate  *
3040Sstevel@tonic-gate  * basic usage:
3050Sstevel@tonic-gate  *	typedef struct foo {
3060Sstevel@tonic-gate  *		...
3070Sstevel@tonic-gate  *		uu_avl_node_t foo_node;
3080Sstevel@tonic-gate  *		...
3090Sstevel@tonic-gate  *	} foo_t;
3100Sstevel@tonic-gate  *
3110Sstevel@tonic-gate  *	static int
3120Sstevel@tonic-gate  *	foo_compare(void *l_arg, void *r_arg, void *private)
3130Sstevel@tonic-gate  *	{
3140Sstevel@tonic-gate  *		foo_t *l = l_arg;
3150Sstevel@tonic-gate  *		foo_t *r = r_arg;
3160Sstevel@tonic-gate  *
3170Sstevel@tonic-gate  *		if (... l greater than r ...)
3180Sstevel@tonic-gate  *			return (1);
3190Sstevel@tonic-gate  *		if (... l less than r ...)
3200Sstevel@tonic-gate  *			return (-1);
3210Sstevel@tonic-gate  *		return (0);
3220Sstevel@tonic-gate  *	}
3230Sstevel@tonic-gate  *
3240Sstevel@tonic-gate  *	...
3250Sstevel@tonic-gate  *		// at initialization time
3260Sstevel@tonic-gate  *		foo_pool = uu_avl_pool_create("foo_pool",
3270Sstevel@tonic-gate  *		    sizeof (foo_t), offsetof(foo_t, foo_node), foo_compare,
3280Sstevel@tonic-gate  *		    debugging? 0 : UU_AVL_POOL_DEBUG);
3290Sstevel@tonic-gate  *	...
3300Sstevel@tonic-gate  */
3310Sstevel@tonic-gate uu_avl_pool_t *uu_avl_pool_create(const char *, size_t, size_t,
3320Sstevel@tonic-gate     uu_compare_fn_t *, uint32_t);
3330Sstevel@tonic-gate #define	UU_AVL_POOL_DEBUG	0x00000001
3340Sstevel@tonic-gate 
3350Sstevel@tonic-gate void uu_avl_pool_destroy(uu_avl_pool_t *);
3360Sstevel@tonic-gate 
3370Sstevel@tonic-gate /*
3380Sstevel@tonic-gate  * usage:
3390Sstevel@tonic-gate  *
3400Sstevel@tonic-gate  *	foo_t *a;
3410Sstevel@tonic-gate  *	a = malloc(sizeof(*a));
3420Sstevel@tonic-gate  *	uu_avl_node_init(a, &a->foo_avl, pool);
3430Sstevel@tonic-gate  *	...
3440Sstevel@tonic-gate  *	uu_avl_node_fini(a, &a->foo_avl, pool);
3450Sstevel@tonic-gate  *	free(a);
3460Sstevel@tonic-gate  */
3470Sstevel@tonic-gate void uu_avl_node_init(void *, uu_avl_node_t *, uu_avl_pool_t *);
3480Sstevel@tonic-gate void uu_avl_node_fini(void *, uu_avl_node_t *, uu_avl_pool_t *);
3490Sstevel@tonic-gate 
3500Sstevel@tonic-gate uu_avl_t *uu_avl_create(uu_avl_pool_t *, void *_parent, uint32_t);
3510Sstevel@tonic-gate #define	UU_AVL_DEBUG	0x00000001
3520Sstevel@tonic-gate 
3530Sstevel@tonic-gate void uu_avl_destroy(uu_avl_t *);	/* list must be empty */
3540Sstevel@tonic-gate 
3550Sstevel@tonic-gate size_t uu_avl_numnodes(uu_avl_t *);
3560Sstevel@tonic-gate 
3570Sstevel@tonic-gate void *uu_avl_first(uu_avl_t *);
3580Sstevel@tonic-gate void *uu_avl_last(uu_avl_t *);
3590Sstevel@tonic-gate 
3600Sstevel@tonic-gate void *uu_avl_next(uu_avl_t *, void *);
3610Sstevel@tonic-gate void *uu_avl_prev(uu_avl_t *, void *);
3620Sstevel@tonic-gate 
3630Sstevel@tonic-gate int uu_avl_walk(uu_avl_t *, uu_walk_fn_t *, void *, uint32_t);
3640Sstevel@tonic-gate 
3650Sstevel@tonic-gate uu_avl_walk_t *uu_avl_walk_start(uu_avl_t *, uint32_t);
3660Sstevel@tonic-gate void *uu_avl_walk_next(uu_avl_walk_t *);
3670Sstevel@tonic-gate void uu_avl_walk_end(uu_avl_walk_t *);
3680Sstevel@tonic-gate 
3690Sstevel@tonic-gate void *uu_avl_find(uu_avl_t *, void *, void *, uu_avl_index_t *);
3700Sstevel@tonic-gate void uu_avl_insert(uu_avl_t *, void *, uu_avl_index_t);
3710Sstevel@tonic-gate 
3720Sstevel@tonic-gate void *uu_avl_nearest_next(uu_avl_t *, uu_avl_index_t);
3730Sstevel@tonic-gate void *uu_avl_nearest_prev(uu_avl_t *, uu_avl_index_t);
3740Sstevel@tonic-gate 
3750Sstevel@tonic-gate void *uu_avl_teardown(uu_avl_t *, void **);
3760Sstevel@tonic-gate 
3770Sstevel@tonic-gate void uu_avl_remove(uu_avl_t *, void *);
3780Sstevel@tonic-gate 
3790Sstevel@tonic-gate #ifdef	__cplusplus
3800Sstevel@tonic-gate }
3810Sstevel@tonic-gate #endif
3820Sstevel@tonic-gate 
3830Sstevel@tonic-gate #endif	/* _LIBUUTIL_H */
384