现在知道去哪找介绍文档的文字了。本头文件的主要作用就是定义SU模块的调试宏。
/**@ingroup su_log
* @file sofia-sip/su_debug.h
* @brief SU debugging macros
*
* The logging levels and macros to use are defined as follows:
* - SU_DEBUG_0() fatal errors, panic
* - SU_DEBUG_1() critical errors, minimal progress at subsystem level
* - SU_DEBUG_2() non-critical errors
* - SU_DEBUG_3() warnings, progress messages
* - SU_DEBUG_5() signaling protocol actions (incoming packets, etc.)
* - SU_DEBUG_7() media protocol actions (incoming packets, etc.)
* - SU_DEBUG_9() entering/exiting functions, very verbatim progress
*
* These macros are used to log with module-specific levels. The SU_LOG
* macro is redefined with a pointer to a module-specific #su_log_t
* structure, e.g., "iptsec_debug.h".
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @date Created: Tue Feb 8 10:06:33 2000 ppessi
*
* @sa @ref debug_logs, su_llog(), su_vllog(), #su_log_t,
*/
从文字可以看出来,将会定义SU_DEBUG_0至SU_DEBUG_9这十个宏。还会用一个指向su_log_t结构体的变量重新再定义SU_LOG宏。所谓的重新定义SU_LOG宏的意思是,su模块是个基础模块,其他功能模块将使用它提供的基础服务来实现高层功能。例如,其他功能模块都会使用su模块提供的日志服务。因此其他功能模块一般都会再建立一个xxx_debug.h头文件,在这个头文件内会申明一个su_log_t结构体变量,然后再用这个新的su_log_t结构体变量重新定义SU_LOG宏。具体可参考iptsec_de