aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-01-01 11:25:09 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-01-07 15:02:34 +0100
commit1f8276e5885f070ec1b0d74c28fc9464bbfe5f8a (patch)
tree6a0f7b3b5d57a009935dd268e1e1c5eb80740c03 /openbsc/include
parent0434faedc947d92a5e575c20cf3c4da568a4615a (diff)
nat: Introduce a global IMSI barr list using red-black trees
Diffstat (limited to 'openbsc/include')
-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 71cd121f4..1698fa47f 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -287,6 +287,10 @@ struct bsc_nat {
/* filter */
char *acc_lst_name;
+ /* Barring of subscribers with a rb tree */
+ struct rb_root imsi_black_list;
+ char *imsi_black_list_fn;
+
/* number rewriting */
char *num_rewr_name;
struct llist_head num_rewr;
@@ -448,6 +452,17 @@ struct bsc_nat_num_rewr_entry {
void bsc_nat_num_rewr_entry_adapt(void *ctx, struct llist_head *head, const struct osmo_config_list *);
+struct bsc_nat_barr_entry {
+ struct rb_node node;
+
+ char *imsi;
+ int cm_reject_cause;
+ int lu_reject_cause;
+};
+
+int bsc_nat_barr_adapt(void *ctx, struct rb_root *rbtree, const struct osmo_config_list *);
+int bsc_nat_barr_find(struct rb_root *root, const char *imsi, int *cm, int *lu);
+
struct ctrl_handle *bsc_nat_controlif_setup(struct bsc_nat *nat, int port);
void bsc_nat_ctrl_del_pending(struct bsc_cmd_list *pending);
int bsc_nat_handle_ctrlif_msg(struct bsc_connection *bsc, struct msgb *msg);