2008-12-23 20:25:15 +00:00
|
|
|
#ifndef _DEBUG_H
|
|
|
|
#define _DEBUG_H
|
|
|
|
|
2009-12-22 21:32:51 +00:00
|
|
|
#include <stdio.h>
|
split 'libosmocore' from openbsc codebase
This library is intended to collect all generic/common funcitionality
of all Osmocom.org projects, including OpenBSC but also OsmocomBB
The library currently includes the following modules:
bitvec, comp128, gsm_utils, msgb, select, signal, statistics, talloc, timer,
tlv_parse, linuxlist
msgb allocation error debugging had to be temporarily disabled as it depends on
'debug.c' functionality which at the moment remains in OpenBSC
2010-02-20 15:24:02 +00:00
|
|
|
#include <osmocore/linuxlist.h>
|
2009-02-18 03:27:39 +00:00
|
|
|
|
2009-12-22 21:32:51 +00:00
|
|
|
#define DEBUG
|
2010-03-26 13:28:59 +00:00
|
|
|
#include <osmocore/logging.h>
|
2009-11-20 12:05:48 +00:00
|
|
|
|
2009-12-22 21:32:51 +00:00
|
|
|
/* Debug Areas of the code */
|
|
|
|
enum {
|
|
|
|
DRLL,
|
|
|
|
DCC,
|
|
|
|
DMM,
|
|
|
|
DRR,
|
|
|
|
DRSL,
|
|
|
|
DNM,
|
|
|
|
DMNCC,
|
|
|
|
DSMS,
|
|
|
|
DPAG,
|
|
|
|
DMEAS,
|
|
|
|
DMI,
|
|
|
|
DMIB,
|
|
|
|
DMUX,
|
|
|
|
DINP,
|
|
|
|
DSCCP,
|
|
|
|
DMSC,
|
|
|
|
DMGCP,
|
|
|
|
DHO,
|
2009-12-24 10:39:14 +00:00
|
|
|
DDB,
|
2009-12-24 10:46:44 +00:00
|
|
|
DREF,
|
2010-03-14 07:45:01 +00:00
|
|
|
DGPRS,
|
2010-05-11 03:54:22 +00:00
|
|
|
DNS,
|
|
|
|
DBSSGP,
|
2010-05-13 17:47:01 +00:00
|
|
|
DLLC,
|
|
|
|
DSNDCP,
|
2009-12-22 21:32:51 +00:00
|
|
|
Debug_LastEntry,
|
|
|
|
};
|
2009-12-16 23:31:10 +00:00
|
|
|
|
2009-12-22 21:32:51 +00:00
|
|
|
/* context */
|
|
|
|
#define BSC_CTX_LCHAN 0
|
|
|
|
#define BSC_CTX_SUBSCR 1
|
|
|
|
#define BSC_CTX_BTS 2
|
|
|
|
#define BSC_CTX_SCCP 3
|
2010-05-15 21:52:02 +00:00
|
|
|
#define BSC_CTX_NSVC 4
|
2010-05-17 21:41:43 +00:00
|
|
|
#define BSC_CTX_BVC 5
|
2010-05-15 21:52:02 +00:00
|
|
|
|
2009-12-22 21:32:51 +00:00
|
|
|
/* target */
|
|
|
|
|
|
|
|
enum {
|
2010-03-26 13:28:59 +00:00
|
|
|
//DEBUG_FILTER_ALL = 1 << 0,
|
|
|
|
LOG_FILTER_IMSI = 1 << 1,
|
2010-05-15 21:52:02 +00:00
|
|
|
LOG_FILTER_NSVC = 1 << 2,
|
2010-05-17 21:41:43 +00:00
|
|
|
LOG_FILTER_BVC = 1 << 3,
|
2009-12-22 21:32:51 +00:00
|
|
|
};
|
|
|
|
|
2010-05-15 21:52:02 +00:00
|
|
|
/* we don't need a header dependency for this... */
|
|
|
|
struct gprs_nsvc;
|
2010-05-17 21:41:43 +00:00
|
|
|
struct bssgp_bvc_ctx;
|
2010-05-15 21:52:02 +00:00
|
|
|
|
2010-03-26 13:28:59 +00:00
|
|
|
void log_set_imsi_filter(struct log_target *target, const char *imsi);
|
2010-05-15 21:52:02 +00:00
|
|
|
void log_set_nsvc_filter(struct log_target *target,
|
2010-05-23 12:59:55 +00:00
|
|
|
struct gprs_nsvc *nsvc);
|
2010-05-17 21:41:43 +00:00
|
|
|
void log_set_bvc_filter(struct log_target *target,
|
2010-05-23 12:59:55 +00:00
|
|
|
struct bssgp_bvc_ctx *bctx);
|
2009-12-22 21:32:51 +00:00
|
|
|
|
2010-03-26 13:28:59 +00:00
|
|
|
extern const struct log_info log_info;
|
2009-12-22 21:32:51 +00:00
|
|
|
|
2008-12-23 20:25:15 +00:00
|
|
|
#endif /* _DEBUG_H */
|