Ivan Kluchnikov | 6043718 | 2012-05-24 22:07:15 +0400 | [diff] [blame] | 1 | /* 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> |
Andreas Eversberg | a23c7ee | 2012-12-18 10:47:28 +0100 | [diff] [blame] | 24 | #ifdef __cplusplus |
Ivan Kluchnikov | 6043718 | 2012-05-24 22:07:15 +0400 | [diff] [blame] | 25 | extern "C" { |
Andreas Eversberg | a23c7ee | 2012-12-18 10:47:28 +0100 | [diff] [blame] | 26 | #endif |
Ivan Kluchnikov | 6043718 | 2012-05-24 22:07:15 +0400 | [diff] [blame] | 27 | #include <osmocom/core/linuxlist.h> |
| 28 | #include <osmocom/core/logging.h> |
Andreas Eversberg | a23c7ee | 2012-12-18 10:47:28 +0100 | [diff] [blame] | 29 | #ifdef __cplusplus |
Ivan Kluchnikov | 6043718 | 2012-05-24 22:07:15 +0400 | [diff] [blame] | 30 | }; |
Andreas Eversberg | a23c7ee | 2012-12-18 10:47:28 +0100 | [diff] [blame] | 31 | #endif |
Ivan Kluchnikov | 6043718 | 2012-05-24 22:07:15 +0400 | [diff] [blame] | 32 | /* Debug Areas of the code */ |
| 33 | enum { |
| 34 | DCSN1, |
| 35 | DL1IF, |
| 36 | DRLCMAC, |
| 37 | DRLCMACDATA, |
Andreas Eversberg | e6228b3 | 2012-07-03 13:36:03 +0200 | [diff] [blame] | 38 | DRLCMACDL, |
| 39 | DRLCMACUL, |
Andreas Eversberg | 5dac2f0 | 2012-06-27 15:52:04 +0200 | [diff] [blame] | 40 | DRLCMACSCHED, |
Andreas Eversberg | 050ace2 | 2013-03-16 16:22:02 +0100 | [diff] [blame] | 41 | DRLCMACMEAS, |
Jacob Erlbeck | 56af6d5 | 2015-08-17 14:06:21 +0200 | [diff] [blame] | 42 | DNS, |
Ivan Kluchnikov | 6043718 | 2012-05-24 22:07:15 +0400 | [diff] [blame] | 43 | DBSSGP, |
| 44 | DPCU, |
| 45 | aDebug_LastEntry |
| 46 | }; |
| 47 | |
| 48 | /* context */ |
| 49 | #define BSC_CTX_SUBSCR 1 |
| 50 | #define BSC_CTX_NSVC 4 |
| 51 | #define BSC_CTX_BVC 5 |
| 52 | |
| 53 | /* target */ |
| 54 | |
| 55 | enum { |
| 56 | //DEBUG_FILTER_ALL = 1 << 0, |
| 57 | LOG_FILTER_IMSI = 1 << 1, |
| 58 | LOG_FILTER_NSVC = 1 << 2, |
| 59 | LOG_FILTER_BVC = 1 << 3, |
| 60 | }; |
| 61 | |
| 62 | /* we don't need a header dependency for this... */ |
| 63 | |
| 64 | struct gprs_nsvc; |
| 65 | struct bssgp_bvc_ctx; |
| 66 | |
| 67 | void log_set_imsi_filter(struct log_target *target, const char *imsi); |
| 68 | void log_set_nsvc_filter(struct log_target *target, |
| 69 | struct gprs_nsvc *nsvc); |
| 70 | void log_set_bvc_filter(struct log_target *target, |
| 71 | struct bssgp_bvc_ctx *bctx); |
| 72 | |
| 73 | extern const struct log_info gprs_log_info; |
| 74 | |
| 75 | |
| 76 | |
| 77 | #endif // GPRS_DEBUG_H |