⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sctp_debug.h

📁 No7信令,我需要交换类似的代码, 请店长审核,谢谢了,急着交换,谢谢
💻 H
字号:
/***************************************************************************** @(#) sctp_debug.h,v 0.7.8.1 2001/12/11 13:26:33 brian Exp ----------------------------------------------------------------------------- Copyright (C) 2001  OpenSS7 Corporation <http://www.openss7.com> All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------------------------------------------------------------------------- U.S. GOVERNMENT RESTRICTED RIGHTS.  If you are licensing this Software on behalf of the U.S. Government ("Government"), the following provisions apply to you.  If the Software is supplied by the Department of Defense ("DoD"), it is classified as "Commercial Computer Software" under paragraph 252.227-7014 of the DoD Supplement to the Federal Acquisition Regulations ("DFARS") (or any successor regulations) and the Government is acquiring only the license rights granted herein (the license rights customarily provided to non-Government users).  If the Software is supplied to any unit or agency of the Government other than DoD, it is classified as "Restricted Computer Software" and the Government's rights in the Software are defined in paragraph 52.227-19 of the Federal Acquisition Regulations ("FAR") (or any success regulations) or, in the cases of NASA, in paragraph 18.52.227-86 of the NASA Supplement to the FAR (or any successor regulations). ----------------------------------------------------------------------------- Last Modified 2001/12/11 13:26:33 by brian *****************************************************************************/#ifndef __SCTP_DEBUG_H__#define __SCTP_DEBUG_H__#if 1#define DDTRACE          do { printk("%s [%s %d] trace\n",__FUNCTION__,__FILE__, __LINE__); } while(0)#define DDPRINT(n,args)  do { printk args; } while(0)#ifdef  _DEBUG#define DTRACE           do { if ( DEBUG_LEVEL ) { printk("%s [%s %d] trace\n",__FUNCTION__,__FILE__, __LINE__); } } while(0)#define DPRINT(n,args)   do { if (DEBUG_LEVEL>n) { printk args; } } while(0)#define DBLOCK(n,block)     { if (DEBUG_LEVEL>n) { block } }#else#define DTRACE    #define DPRINT(n,args)#define DBLOCK(n,block)#endif#endif#define __never() \do { printk(KERN_EMERG __FUNCTION__ ": never() at "__FILE__ " +%d\n", __LINE__); *(int *)0 = 0; } while(0)#define __rare() \do { printk(KERN_NOTICE __FUNCTION__ ": rare() at "__FILE__ " +%d\n", __LINE__); } while(0)#define __seldom() \do { printk(KERN_NOTICE __FUNCTION__ ": seldom() at "__FILE__ " +%d\n", __LINE__); } while(0)#define __usual(__exp) \do { if (!(__exp)) printk(KERN_WARNING __FUNCTION__ ": usual(" #__exp ") failed at " __FILE__ " +%d\n",__LINE__); } while(0)#define __normal(__exp) \do { if (!(__exp)) printk(KERN_WARNING __FUNCTION__ ": normal(" #__exp ") failed at " __FILE__ " +%d\n",__LINE__); } while(0)#define __assert(__exp) \do { if (!(__exp)) { printk(KERN_EMERG __FUNCTION__ ": assert(" #__exp ") failed at " __FILE__ " +%d\n",__LINE__); *(int *)0 = 0; } } while(0)#define __assure(__exp) \do { if (!(__exp)) printk(KERN_WARNING __FUNCTION__ ": assure(" #__exp ") failed at " __FILE__ " +%d\n",__LINE__); } while(0)#define __ensure(__exp,__sta) \do { if (!(__exp)) { printk(KERN_WARNING __FUNCTION__ ": ensure(" #__exp ") failed at " __FILE__ " +%d\n",__LINE__); __sta; } } while(0)#define __trace() \do { printk(KERN_INFO __FUNCTION__ ": trace() at " __FILE__ " +%d\n", __LINE__); } while(0)#define __ptrace(__pkspec) \do { printk(KERN_INFO __FUNCTION__ ": ptrace() at " __FILE__ " +%d\n", __LINE__); printk __pkspec; } while(0)#define __fixme(__pkspec) \do { printk(KERN_INFO __FUNCTION__ ": fixme() at " __FILE__ " +%d\n", __LINE__); printk __pkspec; } while(0)#define __ctrace(__fnc) \({ printk(KERN_INFO __FUNCTION__ ": calling " #__fnc " at " __FILE__ "+%d\n", __LINE__); __fnc; })#ifdef _DEBUG#define   never()		__never()#define    rare()		__rare()#define  seldom()		__seldom()#define   usual(__exp)		__usual(__exp)#define unusual(__exp)		__usual(!(__exp))#define  normal(__exp)		__normal(__exp)#define abnormal(__exp)		__normal(!(__exp))#define  assert(__exp)		__assert(__exp)#define  assure(__exp)		__assure(__exp)#define  ensure(__exp,__sta)	__ensure(__exp,__sta)#define  unless(__exp,__sta)	__ensure(!(__exp),__sta)#define   trace()		__trace()#define  ptrace(__pks)		__ptrace(__pks)#define   fixme(__pks)		__fixme(__pks)#else#ifdef _SAFE#define   never()		do { *(int *)0 = 0; } while(0)#define    rare()		do { } while(0)#define  seldom()		do { } while(0)#define   usual(__exp)		do { } while(0)#define unusual(__exp)		do { } while(0)#define  normal(__exp)		do { } while(0)#define abnormal(__exp)		do { } while(0)#define  assert(__exp)		{ if (!(__exp)) *(int *)0 = 0; } while(0)#define  assure(__exp)		__assure(__exp)#define  ensure(__exp,__sta)	__ensure(__exp,__sta)#define  unless(__exp,__sta)	__ensure(!(__exp),__sta)#define   trace()		do { } while(0)#define  ptrace(__pks)		do { } while(0)#define   fixme(__pks)		__fixme(__pks)#else#define   never()		do { } while(0)#define	   rare()		do { } while(0)#define	 seldom()		do { } while(0)#define   usual(__exp)		do { } while(0)#define unusual(__exp)		do { } while(0)#define  normal(__exp)		do { } while(0)#define abnormal(__exp)		do { } while(0)#define  assert(__exp)		do { } while(0)#define  assure(__exp)		do { } while(0)#define  ensure(__exp,__sta)	do { } while(0)#define  unless(__exp,__sta)	do { } while(0)#define  trace()		do { } while(0)#define  ptrace(__pks)		do { } while(0)#define   fixme(__pks)		__fixme(__pks)#endif#endif#endif  __SCTP_DEBUG_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -