1*3302Sagiri /* 2*3302Sagiri * CDDL HEADER START 3*3302Sagiri * 4*3302Sagiri * The contents of this file are subject to the terms of the 5*3302Sagiri * Common Development and Distribution License (the "License"). 6*3302Sagiri * You may not use this file except in compliance with the License. 7*3302Sagiri * 8*3302Sagiri * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*3302Sagiri * or http://www.opensolaris.org/os/licensing. 10*3302Sagiri * See the License for the specific language governing permissions 11*3302Sagiri * and limitations under the License. 12*3302Sagiri * 13*3302Sagiri * When distributing Covered Code, include this CDDL HEADER in each 14*3302Sagiri * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*3302Sagiri * If applicable, add the following below this CDDL HEADER, with the 16*3302Sagiri * fields enclosed by brackets "[]" replaced with your own identifying 17*3302Sagiri * information: Portions Copyright [yyyy] [name of copyright owner] 18*3302Sagiri * 19*3302Sagiri * CDDL HEADER END 20*3302Sagiri */ 21*3302Sagiri /* 22*3302Sagiri * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23*3302Sagiri * Use is subject to license terms. 24*3302Sagiri */ 25*3302Sagiri 26*3302Sagiri #ifndef _RDSIB_DEBUG_H 27*3302Sagiri #define _RDSIB_DEBUG_H 28*3302Sagiri 29*3302Sagiri #pragma ident "%Z%%M% %I% %E% SMI" 30*3302Sagiri 31*3302Sagiri #ifdef __cplusplus 32*3302Sagiri extern "C" { 33*3302Sagiri #endif 34*3302Sagiri 35*3302Sagiri #define LABEL "RDS" 36*3302Sagiri 37*3302Sagiri /* 38*3302Sagiri * warnings, console & syslog buffer. 39*3302Sagiri * For Non recoverable or Major Errors 40*3302Sagiri */ 41*3302Sagiri #define RDS_LOG_L0 0 42*3302Sagiri 43*3302Sagiri /* 44*3302Sagiri * syslog buffer or RDS trace buffer (console if booted /w debug) 45*3302Sagiri * For additional information on Non recoverable errors and 46*3302Sagiri * warnings/informational message for sys-admin types. 47*3302Sagiri */ 48*3302Sagiri #define RDS_LOG_L1 1 49*3302Sagiri 50*3302Sagiri /* 51*3302Sagiri * debug only 52*3302Sagiri * for more verbose trace than L1, for e.g. recoverable errors, 53*3302Sagiri * or intersting trace 54*3302Sagiri */ 55*3302Sagiri #define RDS_LOG_L2 2 56*3302Sagiri 57*3302Sagiri /* 58*3302Sagiri * debug only 59*3302Sagiri * for more verbose trace than L2, for e.g. informational messages 60*3302Sagiri */ 61*3302Sagiri #define RDS_LOG_L3 3 62*3302Sagiri 63*3302Sagiri /* 64*3302Sagiri * debug only 65*3302Sagiri * for more verbose trace than L3, for e.g. printing function entries... 66*3302Sagiri */ 67*3302Sagiri #define RDS_LOG_L4 4 68*3302Sagiri 69*3302Sagiri /* 70*3302Sagiri * debug only 71*3302Sagiri * most verbose level. Used only for excessive trace, for e.g. 72*3302Sagiri * printing structures etc. 73*3302Sagiri */ 74*3302Sagiri #define RDS_LOG_L5 5 75*3302Sagiri 76*3302Sagiri /* 77*3302Sagiri * debug only 78*3302Sagiri * for messages from softints, taskqs, intr handlers, timeout handlers etc. 79*3302Sagiri */ 80*3302Sagiri #define RDS_LOG_LINTR 6 81*3302Sagiri 82*3302Sagiri 83*3302Sagiri #ifdef DEBUG 84*3302Sagiri #define RDS_DPRINTF_INTR rds_dprintf_intr 85*3302Sagiri #define RDS_DPRINTF5 rds_dprintf5 86*3302Sagiri #define RDS_DPRINTF4 rds_dprintf4 87*3302Sagiri #define RDS_DPRINTF3 rds_dprintf3 88*3302Sagiri 89*3302Sagiri void rds_dprintf_intr( 90*3302Sagiri char *name, 91*3302Sagiri char *fmt, ...); 92*3302Sagiri void rds_dprintf5( 93*3302Sagiri char *name, 94*3302Sagiri char *fmt, ...); 95*3302Sagiri void rds_dprintf4( 96*3302Sagiri char *name, 97*3302Sagiri char *fmt, ...); 98*3302Sagiri void rds_dprintf3( 99*3302Sagiri char *name, 100*3302Sagiri char *fmt, ...); 101*3302Sagiri #else 102*3302Sagiri #define RDS_DPRINTF_INTR 0 && 103*3302Sagiri #define RDS_DPRINTF5 0 && 104*3302Sagiri #define RDS_DPRINTF4 0 && 105*3302Sagiri #define RDS_DPRINTF3 0 && 106*3302Sagiri #endif 107*3302Sagiri 108*3302Sagiri #define RDS_DPRINTF2 rds_dprintf2 109*3302Sagiri #define RDS_DPRINTF1 rds_dprintf1 110*3302Sagiri #define RDS_DPRINTF0 rds_dprintf0 111*3302Sagiri 112*3302Sagiri void rds_dprintf2( 113*3302Sagiri char *name, 114*3302Sagiri char *fmt, ...); 115*3302Sagiri void rds_dprintf1( 116*3302Sagiri char *name, 117*3302Sagiri char *fmt, ...); 118*3302Sagiri void rds_dprintf0( 119*3302Sagiri char *name, 120*3302Sagiri char *fmt, ...); 121*3302Sagiri 122*3302Sagiri #ifdef __cplusplus 123*3302Sagiri } 124*3302Sagiri #endif 125*3302Sagiri 126*3302Sagiri #endif /* _RDSIB_DEBUG_H */ 127