aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-13 09:24:37 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-13 09:50:38 +0200
commit00c531709a0b1b2c94c673a683fa984648b416c0 (patch)
tree848676f1968ea29b4e6dbf9519c3a26df513b909 /openbsc/include/openbsc
parenta094108f846a0e827a7eca63ce4992999a05ff2c (diff)
nat: Add config option to filter/handle certain imsi'es.
Diffstat (limited to 'openbsc/include/openbsc')
-rw-r--r--openbsc/include/openbsc/bsc_nat.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h
index df6472330..4ad54951d 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -33,6 +33,8 @@
#include <osmocore/write_queue.h>
#include <osmocore/statistics.h>
+#include <regex.h>
+
#define DIR_BSC 1
#define DIR_MSC 2
@@ -138,6 +140,13 @@ struct bsc_config {
unsigned int lac;
int nr;
+ /* imsi white and blacklist */
+ char *imsi_allow;
+ regex_t imsi_allow_re;
+ char *imsi_deny;
+ regex_t imsi_deny_re;
+
+ /* backpointer */
struct bsc_nat *nat;
struct bsc_config_stats stats;
@@ -199,6 +208,12 @@ struct bsc_nat {
struct bsc_endpoint *bsc_endpoints;
+ /* filter */
+ char *imsi_allow;
+ regex_t imsi_allow_re;
+ char *imsi_deny;
+ regex_t imsi_deny_re;
+
/* statistics */
struct bsc_nat_statistics stats;
};