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 /* 231414Scindi * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 240Sstevel@tonic-gate * Use is subject to license terms. 250Sstevel@tonic-gate * 260Sstevel@tonic-gate * ptree.h -- public definitions for tree print module 270Sstevel@tonic-gate * 280Sstevel@tonic-gate * these routines are used to print the "struct node" data 290Sstevel@tonic-gate * structures from tree.h. they call out() to do the printing. 300Sstevel@tonic-gate */ 310Sstevel@tonic-gate 320Sstevel@tonic-gate #ifndef _ESC_COMMON_PTREE_H 330Sstevel@tonic-gate #define _ESC_COMMON_PTREE_H 340Sstevel@tonic-gate 350Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 360Sstevel@tonic-gate 370Sstevel@tonic-gate #ifdef __cplusplus 380Sstevel@tonic-gate extern "C" { 390Sstevel@tonic-gate #endif 400Sstevel@tonic-gate 41*1426Scindi #include <tree.h> 420Sstevel@tonic-gate 430Sstevel@tonic-gate /* 440Sstevel@tonic-gate * Use a pointer to one of these structs as the "arg" argument when 450Sstevel@tonic-gate * lut_walk()-ing with ptree_plut() as the callback. "plut" is a 460Sstevel@tonic-gate * property lut, where the lhs is expected to be a const char * and 470Sstevel@tonic-gate * the rhs is a struct node. 480Sstevel@tonic-gate * 490Sstevel@tonic-gate * flags is passed to out() 500Sstevel@tonic-gate * first = 1 indicates the first in a list, first != 1 implies a later 510Sstevel@tonic-gate * element and thus ptree_plut() adds a preceding comma 520Sstevel@tonic-gate * 530Sstevel@tonic-gate */ 540Sstevel@tonic-gate struct plut_wlk_data { 550Sstevel@tonic-gate int flags; 560Sstevel@tonic-gate int first; 570Sstevel@tonic-gate }; 580Sstevel@tonic-gate 590Sstevel@tonic-gate void ptree(int flags, struct node *np, int no_iterators, int fileline); 600Sstevel@tonic-gate void ptree_name(int flags, struct node *np); 610Sstevel@tonic-gate void ptree_name_iter(int flags, struct node *np); 620Sstevel@tonic-gate void ptree_all(int flags, const char *pat); 630Sstevel@tonic-gate void ptree_fault(int flags, const char *pat); 640Sstevel@tonic-gate void ptree_upset(int flags, const char *pat); 650Sstevel@tonic-gate void ptree_defect(int flags, const char *pat); 660Sstevel@tonic-gate void ptree_error(int flags, const char *pat); 670Sstevel@tonic-gate void ptree_ereport(int flags, const char *pat); 680Sstevel@tonic-gate void ptree_serd(int flags, const char *pat); 691414Scindi void ptree_stat(int flags, const char *pat); 700Sstevel@tonic-gate void ptree_config(int flags, const char *pat); 710Sstevel@tonic-gate void ptree_prop(int flags, const char *pat); 720Sstevel@tonic-gate void ptree_mask(int flags, const char *pat); 730Sstevel@tonic-gate void ptree_timeval(int flags, unsigned long long *ullp); 740Sstevel@tonic-gate void ptree_plut(void *name, void *val, void *arg); 750Sstevel@tonic-gate const char *ptree_nodetype2str(enum nodetype t); 760Sstevel@tonic-gate const char *ptree_nametype2str(enum nametype t); 770Sstevel@tonic-gate 780Sstevel@tonic-gate #ifdef __cplusplus 790Sstevel@tonic-gate } 800Sstevel@tonic-gate #endif 810Sstevel@tonic-gate 820Sstevel@tonic-gate #endif /* _ESC_COMMON_PTREE_H */ 83