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