Watt-32 tcp/ip  2.2 dev-rel.10
bsddbug.h
Go to the documentation of this file.
1 
3 #ifndef _w32_BSDDBUG_H
4 #define _w32_BSDDBUG_H
5 
6 /*
7  * Debugging of BSD-socket API. Writes to "sk_debug.device"
8  * when dbug_init() is called or `SO_DEBUG' is set on socket.
9  */
10 #if defined(USE_DEBUG) && defined(USE_BSD_API)
11  extern int MS_CDECL _sock_debugf (const char *fmt, ...) ATTR_PRINTF (1,2);
12  extern void _sock_dbug_flush (void);
13  extern void _sock_dbug_init (void);
14  extern void _sock_dbug_open (void);
15  extern BOOL _sock_dbug_active (void);
16  extern void _sock_enter_scope (void);
17  extern void _sock_leave_scope (void);
18 
19  extern void bsd_fortify_print (const char *buf);
20 
21  #define SOCK_DEBUGF(x) _sock_debugf x
22  #define SOCK_DBUG_FLUSH() _sock_dbug_flush()
23  #define SOCK_ENTER_SCOPE() _sock_enter_scope()
24  #define SOCK_LEAVE_SCOPE() _sock_leave_scope()
25 #else
26  #define SOCK_DEBUGF(x) ((void)0)
27  #define SOCK_DBUG_FLUSH() ((void)0)
28  #define SOCK_ENTER_SCOPE() ((void)0)
29  #define SOCK_LEAVE_SCOPE() ((void)0)
30 #endif
31 
32 #endif