|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights ! 7: * Reserved. This file contains Original Code and/or Modifications of ! 8: * Original Code as defined in and that are subject to the Apple Public ! 9: * Source License Version 1.1 (the "License"). You may not use this file ! 10: * except in compliance with the License. Please obtain a copy of the ! 11: * License at http://www.apple.com/publicsource and read it before using ! 12: * this file. ! 13: * ! 14: * The Original Code and all software distributed under the License are ! 15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 19: * License for the specific language governing rights and limitations ! 20: * under the License. ! 21: * ! 22: * @APPLE_LICENSE_HEADER_END@ ! 23: */ ! 24: ! 25: #ifndef __DEBUG_H__ ! 26: #define __DEBUG_H__ ! 27: ! 28: ! 29: #define D_L_FATAL 0x00000001 ! 30: #define D_L_ERROR 0x00000002 ! 31: #define D_L_WARNING 0x00000004 ! 32: #define D_L_INFO 0x00000008 ! 33: #define D_L_VERBOSE 0x00000010 ! 34: #define D_L_STARTUP 0x00000020 ! 35: #define D_L_STARTUP_LOW 0x00000040 ! 36: #define D_L_SHUTDN 0x00000080 ! 37: #define D_L_SHUTDN_LOW 0x00000100 ! 38: #define D_L_INPUT 0x00000200 ! 39: #define D_L_OUTPUT 0x00000400 ! 40: #define D_L_STATS 0x00000800 ! 41: #define D_L_STATE_CHG 0x00001000 /* re-aarp, ifState etc. */ ! 42: #define D_L_ROUTING 0x00002000 ! 43: #define D_L_DNSTREAM 0x00004000 ! 44: #define D_L_UPSTREAM 0x00008000 ! 45: #define D_L_STARTUP_INFO 0x00010000 ! 46: #define D_L_SHUTDN_INFO 0x00020000 ! 47: #define D_L_ROUTING_AT 0x00040000 /* atalk address routing */ ! 48: #define D_L_USR1 0x01000000 ! 49: #define D_L_USR2 0x02000000 ! 50: #define D_L_USR3 0x04000000 ! 51: #define D_L_USR4 0x08000000 ! 52: #define D_L_TRACE 0x10000000 ! 53: ! 54: ! 55: #define D_M_PAT 0x00000001 ! 56: #define D_M_PAT_LOW 0x00000002 ! 57: #define D_M_ELAP 0x00000004 ! 58: #define D_M_ELAP_LOW 0x00000008 ! 59: #define D_M_DDP 0x00000010 ! 60: #define D_M_DDP_LOW 0x00000020 ! 61: #define D_M_NBP 0x00000040 ! 62: #define D_M_NBP_LOW 0x00000080 ! 63: #define D_M_ZIP 0x00000100 ! 64: #define D_M_ZIP_LOW 0x00000200 ! 65: #define D_M_RTMP 0x00000400 ! 66: #define D_M_RTMP_LOW 0x00000800 ! 67: #define D_M_ATP 0x00001000 ! 68: #define D_M_ATP_LOW 0x00002000 ! 69: #define D_M_ADSP 0x00004000 ! 70: #define D_M_ADSP_LOW 0x00008000 ! 71: #define D_M_AEP 0x00010000 ! 72: #define D_M_AARP 0x00020000 ! 73: #define D_M_ASP 0x00040000 ! 74: #define D_M_ASP_LOW 0x00080000 ! 75: #define D_M_AURP 0x00100000 ! 76: #define D_M_AURP_LOW 0x00200000 ! 77: #define D_M_TRACE 0x10000000 ! 78: ! 79: ! 80: #define DBG_SET 1 /* cmds for kernelDbg() */ ! 81: #define DBG_SET_FROM_FILE 2 ! 82: #define DBG_GET 3 ! 83: ! 84: #define DEBUG_STAT_FILE "/tmp/dbgbits.dat" ! 85: ! 86: /* macros for working with atp data at the lap level. ! 87: * These are for tracehook performance measurements only!!! ! 88: * It is assumed that the ddp & atp headers are at the top of the ! 89: * mblk, occupy contiguous memory and the atp headers are of the ! 90: * extended type only. ! 91: */ ! 92: ! 93: typedef struct dbgBits { ! 94: unsigned long dbgMod; /* debug module bitmap (used in dPrintf) */ ! 95: unsigned long dbgLev; /* debug level bitmap */ ! 96: } dbgBits_t; ! 97: ! 98: extern dbgBits_t dbgBits; ! 99: ! 100: /* macros for debugging */ ! 101: #ifdef DEBUG ! 102: #define dPrintf(mod, lev, p) \ ! 103: if (((mod) & dbgBits.dbgMod) && ((lev) & dbgBits.dbgLev)) {\ ! 104: kprintf p; \ ! 105: } ! 106: #define PRINTF printf ! 107: #define FPRINTF fprintf ! 108: #else ! 109: #define dPrintf(mod, lev, p) ! 110: #define PRINTF ! 111: #define FPRINTF ! 112: #endif ! 113: #endif /* __DEBUG_H__ */ ! 114:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.