Path: blob/main/cddl/contrib/opensolaris/tools/ctf/cvt/traverse.h
39586 views
/*1* CDDL HEADER START2*3* The contents of this file are subject to the terms of the4* Common Development and Distribution License, Version 1.0 only5* (the "License"). You may not use this file except in compliance6* with the License.7*8* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE9* or http://www.opensolaris.org/os/licensing.10* See the License for the specific language governing permissions11* and limitations under the License.12*13* When distributing Covered Code, include this CDDL HEADER in each14* file and include the License file at usr/src/OPENSOLARIS.LICENSE.15* If applicable, add the following below this CDDL HEADER, with the16* fields enclosed by brackets "[]" replaced with your own identifying17* information: Portions Copyright [yyyy] [name of copyright owner]18*19* CDDL HEADER END20*/21/*22* Copyright 2004 Sun Microsystems, Inc. All rights reserved.23* Use is subject to license terms.24*/2526#ifndef _TRAVERSE_H27#define _TRAVERSE_H2829#pragma ident "%Z%%M% %I% %E% SMI"3031/*32* Routines used to traverse tdesc trees, invoking user-supplied callbacks33* as the tree is traversed.34*/3536#ifdef __cplusplus37extern "C" {38#endif3940#include "ctftools.h"4142typedef int (*tdtrav_cb_f)(tdesc_t *, tdesc_t **, void *);4344typedef struct tdtrav_data {45int vgen;4647tdtrav_cb_f *firstops;48tdtrav_cb_f *preops;49tdtrav_cb_f *postops;5051void *private;52} tdtrav_data_t;5354void tdtrav_init(tdtrav_data_t *, int *, tdtrav_cb_f *, tdtrav_cb_f *,55tdtrav_cb_f *, void *);56int tdtraverse(tdesc_t *, tdesc_t **, tdtrav_data_t *);5758int iitraverse(iidesc_t *, int *, tdtrav_cb_f *, tdtrav_cb_f *, tdtrav_cb_f *,59void *);60int iitraverse_hash(hash_t *, int *, tdtrav_cb_f *, tdtrav_cb_f *,61tdtrav_cb_f *, void *);62int iitraverse_td(void *, void *);6364int tdtrav_assert(tdesc_t *, tdesc_t **, void *);6566#ifdef __cplusplus67}68#endif6970#endif /* _TRAVERSE_H */717273