1 2 /* Note : those values should only be modified by netwib developers */ 3 4 /*-------------------------------------------------------------*/ 5 #define NETWIB_DEBUG_UNSUPPORTED_ALLOWCOMPIL 0 6 #define NETWIB_DEBUG_CONF_FAKE 0 7 8 #define NETWIB_DEBUG 0 9 #define NETWIB_DEBUG_ERROR_THREADID 0 10 #define NETWIB_DEBUG_ERROR_BT 0 11 #define NETWIB_DEBUG_TYPE_NOTSET 0 12 #define NETWIB_DEBUG_LEAK 0 13 #define NETWIB_DEBUG_MEM_CORRUPT 0 14 #define NETWIB_DEBUG_FD_OPEN 0 15 #define NETWIB_DEBUG_SIGHDL_REPORT_LEAKMEMFD 0 16 #define NETWIB_DEBUG_RING_CHECK 0 17 #define NETWIB_DEBUG_HASH_CHECK 0 18 #define NETWIB_DEBUG_RANGES_CHECK 0 19 20 /*-------------------------------------------------------------*/ 21 /* 22 23 NETWIB_DEBUG_UNSUPPORTED_ALLOWCOMPIL 24 Allow compilation to test Unsupported_0_xyz. 25 0 : do not allow (NETWIB_DEBUG_UNSUPPORTED_TAKEDECISION in use) 26 1 : allow 27 28 NETWIB_DEBUG_CONF_FAKE 29 Use a fake network configuration. 30 0 : no 31 1 : yes 32 33 NETWIB_DEBUG 34 Activate several debugging functions. 35 0 : no 36 1 : yes 37 38 NETWIB_DEBUG_ERROR_THREADID 39 Display thread id in error messages. 40 0 : no 41 1 : yes 42 43 NETWIB_DEBUG_ERROR_BT 44 Display backtrace of function where the error was first printed. 45 0 : no display 46 1 : display 47 48 NETWIB_DEBUG_TYPE_NOTSET 49 Using functions netwib_priv_notset_xyz, user can mark variables 50 as not set. 51 0 : do not mark 52 1 : mark 53 54 NETWIB_DEBUG_LEAK 55 Debug resource leaks. 56 0 : no 57 1 : yes 58 59 NETWIB_DEBUG_MEM_CORRUPT 60 To detect memory corruption. 61 0 : no debug 62 1 : uninitialized data : 63 - read : read data contain a fake uninit_pattern 64 - write : no check, this is logical 65 bottom data (before allocated data zone) : 66 - read : no debug 67 - write : check outer_pattern modifications 68 top data (after allocated data zone) : 69 - read : no debug 70 - write : check outer_pattern modifications 71 free : 72 - read : read data contain a fake free_pattern 73 - write : check free_pattern modifications 74 2 : uninitialized data : 75 - read : read data contain a fake uninit_pattern 76 - write : no check, this is logical 77 bottom data (before allocated data zone) : 78 - read : no debug 79 - write : check outer_pattern modifications 80 top data (after allocated data zone) : 81 - read : protected memory 82 - write : protected memory 83 free : 84 - read : protected memory 85 - write : protected memory 86 3 : uninitialized data : 87 - read : read data contain a fake uninit_pattern 88 - write : no check, this is logical 89 bottom data (before allocated data zone) : 90 - read : protected memory 91 - write : protected memory 92 top data (after allocated data zone) : 93 - read : no debug 94 - write : check outer_pattern modifications 95 free : 96 - read : protected memory 97 - write : protected memory 98 99 NETWIB_DEBUG_FD_OPEN 100 To detect open file descriptors at the end of process. 101 0 : no detect 102 1 : detect 103 104 NETWIB_DEBUG_SIGHDL_REPORT_LEAKMEMFD 105 When a signal (Control-C) is received, report memory leaks, corrupted 106 memory and fd leaks. 107 0 : no 108 1 : yes 109 110 NETWIB_DEBUG_RING_CHECK 111 Debug netwib_ring. 112 0 : no 113 1 : yes 114 115 NETWIB_DEBUG_HASH_CHECK 116 Debug netwib_hash. 117 0 : no 118 1 : yes 119 120 NETWIB_DEBUG_RANGES_CHECK 121 Debug netwib_ip4s, netwib_eths, netwib_ports. 122 0 : no 123 1 : yes 124 125 */ 126 127 /*-------------------------------------------------------------*/ 128 #if NETWIB_DEBUG_UNSUPPORTED_ALLOWCOMPIL==0 129 #define NETWIB_UNSUPPORTED_TAKEDECISION takeadecision+takeadecision; 130 #else 131 #define NETWIB_UNSUPPORTED_TAKEDECISION 132 #endif 133 134