diff options
author | Harald Welte <laforge@gnumonks.org> | 2012-06-17 12:25:53 +0800 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2012-06-17 12:38:07 +0800 |
commit | f543036719ccbb2431563d6af968502f9097db98 (patch) | |
tree | d461318f5a8eddf9283b9098e44e7606b0d20adf /openbsc/src/libgb/common_vty.c | |
parent | 15a36434e9d51e57514b2b9357a41293b063e970 (diff) |
libgb: prefix all NS related functions with gprs_
Diffstat (limited to 'openbsc/src/libgb/common_vty.c')
-rw-r--r-- | openbsc/src/libgb/common_vty.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/openbsc/src/libgb/common_vty.c b/openbsc/src/libgb/common_vty.c index a16e9957..408dddf7 100644 --- a/openbsc/src/libgb/common_vty.c +++ b/openbsc/src/libgb/common_vty.c @@ -28,6 +28,10 @@ #include <osmocom/vty/buffer.h> #include <osmocom/vty/vty.h> +#include <osmocom/gprs/gprs_msgb.h> + +#include "common_vty.h" + /* Down vty node level. */ gDEFUN(libgb_exit, libgb_exit_cmd, "exit", "Exit current mode and down to previous mode\n") @@ -62,4 +66,24 @@ gDEFUN(libgb_end, return CMD_SUCCESS; } +int gprs_log_filter_fn(const struct log_context *ctx, + struct log_target *tar) +{ + const struct gprs_nsvc *nsvc = ctx->ctx[GPRS_CTX_NSVC]; + const struct gprs_nsvc *bvc = ctx->ctx[GPRS_CTX_BVC]; + + /* Filter on the NS Virtual Connection */ + if ((tar->filter_map & (1 << FLT_NSVC)) != 0 + && nsvc && (nsvc == tar->filter_data[FLT_NSVC])) + return 1; + + /* Filter on the NS Virtual Connection */ + if ((tar->filter_map & (1 << FLT_BVC)) != 0 + && bvc && (bvc == tar->filter_data[FLT_BVC])) + return 1; + + return 0; +} + + int DNS, DBSSGP; |