root/src/router/openlldp/src/lldp_debug.h

Revision 8348, 1.5 kB (checked in by BrainSlayer, 2 years ago)

no debug crap

Line 
1 /** @file lldp_debug.h
2  *
3  * OpenLLDP Debug Header
4  *
5  * Licensed under a dual GPL/Proprietary license. 
6  * See LICENSE file for more info.
7  *
8  * File: lldp_debug.h
9  *
10  * Authors: Terry Simons (terry.simons@gmail.com)
11  *
12  *******************************************************************/
13
14 #ifndef LLDP_DEBUG_H
15 #define LLDP_DEBUG_H
16
17 #include <stdio.h>
18
19 /* Borrowed from Open1X */
20 #define DEBUG_NORMAL     0
21
22 #define NUM_DEBUG_CONFIG     1
23 #define DEBUG_CONFIG         0x01
24
25 #define NUM_DEBUG_STATE      2
26 #define DEBUG_STATE          0x02
27
28 #define NUM_DEBUG_TLV        3
29 #define DEBUG_TLV            0x04
30
31 #define NUM_DEBUG_INT        4
32 #define DEBUG_INT            0x08
33
34 #define NUM_DEBUG_SNMP       5
35 #define DEBUG_SNMP           0x10
36
37 #define NUM_DEBUG_EVERYTHING 6
38 #define DEBUG_EVERYTHING     0x20
39
40 #define NUM_DEBUG_EXCESSIVE  7
41 #define DEBUG_EXCESSIVE      0x40
42
43 /* Borrowed from Open1X */
44 int logfile_setup(char *);
45 void logfile_cleanup();
46 void lowercase(char *);
47 void debug_setdaemon(int);
48
49 #define debug_printf(a, n, ...)
50 #define debug_printf_nl(a, n, ...)
51 #define debug_hex_printf(a, n, ...)
52 #define debug_hex_dump(a, n, ...)
53 void debug_set_flags(int);
54 void debug_alpha_set_flags(char *);
55 int xsup_assert_long(int, char *, int, char *, int, const char *);
56 int debug_getlevel();
57 void ufprintf(FILE *fh, char *instr, int level);
58
59 #ifndef LLDP_FUNCTION_DEBUG
60 #define LLDP_FUNCTION_DEBUG debug_printf(DEBUG_EXCESSIVE, "[DEBUG] %s:%d:%s()\n", __FILE__, __LINE__, __FUNCTION__);
61 #endif
62
63 #endif /* LLDP_DEBUG_H */
Note: See TracBrowser for help on using the browser.