Jonathan Santos | 03fd8d0 | 2011-05-25 13:54:02 -0400 | [diff] [blame^] | 1 | #ifndef _DEBUG_H |
| 2 | #define _DEBUG_H |
| 3 | |
| 4 | #include <stdio.h> |
| 5 | #include <osmocore/linuxlist.h> |
| 6 | |
| 7 | #define DEBUG |
| 8 | #include <osmocore/logging.h> |
| 9 | |
| 10 | /* Debug Areas of the code */ |
| 11 | enum { |
| 12 | DRLL, |
| 13 | DCC, |
| 14 | DMM, |
| 15 | DRR, |
| 16 | DRSL, |
| 17 | DNM, |
| 18 | DMNCC, |
| 19 | DSMS, |
| 20 | DPAG, |
| 21 | DMEAS, |
| 22 | DMI, |
| 23 | DMIB, |
| 24 | DMUX, |
| 25 | DINP, |
| 26 | DSCCP, |
| 27 | DMSC, |
| 28 | DMGCP, |
| 29 | DHO, |
| 30 | DDB, |
| 31 | DREF, |
| 32 | DGPRS, |
| 33 | DNS, |
| 34 | DBSSGP, |
| 35 | DLLC, |
| 36 | DSNDCP, |
| 37 | DNAT, |
| 38 | Debug_LastEntry, |
| 39 | }; |
| 40 | |
| 41 | /* context */ |
| 42 | #define BSC_CTX_LCHAN 0 |
| 43 | #define BSC_CTX_SUBSCR 1 |
| 44 | #define BSC_CTX_BTS 2 |
| 45 | #define BSC_CTX_SCCP 3 |
| 46 | #define BSC_CTX_NSVC 4 |
| 47 | #define BSC_CTX_BVC 5 |
| 48 | |
| 49 | /* target */ |
| 50 | |
| 51 | enum { |
| 52 | //DEBUG_FILTER_ALL = 1 << 0, |
| 53 | LOG_FILTER_IMSI = 1 << 1, |
| 54 | LOG_FILTER_NSVC = 1 << 2, |
| 55 | LOG_FILTER_BVC = 1 << 3, |
| 56 | }; |
| 57 | |
| 58 | /* we don't need a header dependency for this... */ |
| 59 | struct gprs_nsvc; |
| 60 | struct bssgp_bvc_ctx; |
| 61 | |
| 62 | void log_set_imsi_filter(struct log_target *target, const char *imsi); |
| 63 | void log_set_nsvc_filter(struct log_target *target, |
| 64 | struct gprs_nsvc *nsvc); |
| 65 | void log_set_bvc_filter(struct log_target *target, |
| 66 | struct bssgp_bvc_ctx *bctx); |
| 67 | |
| 68 | extern const struct log_info log_info; |
| 69 | |
| 70 | #endif /* _DEBUG_H */ |