blob: ee95e19da64eea639c94049dfc46c3e5fe120dcb [file] [log] [blame]
Ivan Kluchnikov60437182012-05-24 22:07:15 +04001/* gprs_debug.h
2 *
3 * Copyright (C) 2012 Ivan Klyuchnikov
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */
19
20#ifndef GPRS_DEBUG_H
21#define GPRS_DEBUG_H
22
23#include <stdio.h>
24extern "C" {
25#include <osmocom/core/linuxlist.h>
26#include <osmocom/core/logging.h>
27};
28/* Debug Areas of the code */
29enum {
30 DCSN1,
31 DL1IF,
32 DRLCMAC,
33 DRLCMACDATA,
34 DBSSGP,
35 DPCU,
36 aDebug_LastEntry
37};
38
39/* context */
40#define BSC_CTX_SUBSCR 1
41#define BSC_CTX_NSVC 4
42#define BSC_CTX_BVC 5
43
44/* target */
45
46enum {
47 //DEBUG_FILTER_ALL = 1 << 0,
48 LOG_FILTER_IMSI = 1 << 1,
49 LOG_FILTER_NSVC = 1 << 2,
50 LOG_FILTER_BVC = 1 << 3,
51};
52
53/* we don't need a header dependency for this... */
54
55struct gprs_nsvc;
56struct bssgp_bvc_ctx;
57
58void log_set_imsi_filter(struct log_target *target, const char *imsi);
59void log_set_nsvc_filter(struct log_target *target,
60 struct gprs_nsvc *nsvc);
61void log_set_bvc_filter(struct log_target *target,
62 struct bssgp_bvc_ctx *bctx);
63
64extern const struct log_info gprs_log_info;
65
66
67
68#endif // GPRS_DEBUG_H