aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/gb_proxy.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-06-06 18:49:23 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-07-22 16:56:33 +0200
commit7c101d922e54af3b990a2a8d86ded18c3f3b89c7 (patch)
treec4ac8dd4f4ac0d7024a81de5f87e89f4bc2f66d7 /openbsc/include/openbsc/gb_proxy.h
parent006c038212e1d79938810812c218a4fe4aad737c (diff)
gprs: Track IMSI/TLLI to control APN patching
This patch adds IMSI/TLLI connection tracking and uses it to control APN patching based on the IMSI. TLLI entries can expire based on age and/or by limiting the TLLI list size. VTY config-gbproxy: no core-access-point-name disable APN patching core-access-point-name none remove APN if present core-access-point-name APN replace APN if present core-access-point-name none match-imsi RE remove if IMSI matches core-access-point-name APN match-imsi RE replace if IMSI matches tlli-list max-age SECONDS expire after SECONDS no tlli-list max-age don't expire by age tlli-list max-length N keep N entries only no tlli-list max-length don't limit list length RE is an extended regular expression, e.g. ^12345|^23456 Ticket: OW#1192 Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/include/openbsc/gb_proxy.h')
-rw-r--r--openbsc/include/openbsc/gb_proxy.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gb_proxy.h b/openbsc/include/openbsc/gb_proxy.h
index 9610ca6df..25e7265f1 100644
--- a/openbsc/include/openbsc/gb_proxy.h
+++ b/openbsc/include/openbsc/gb_proxy.h
@@ -29,7 +29,10 @@ struct gbproxy_config {
int core_mcc;
uint8_t* core_apn;
size_t core_apn_size;
+ char * match_re;
enum gbproxy_patch_mode patch_mode;
+ int tlli_max_age;
+ int tlli_max_len;
};
extern struct gbproxy_config gbcfg;
@@ -60,4 +63,6 @@ void gbprox_reset();
char *gbprox_apn_to_str(char *str, const uint8_t *apn_enc, size_t max_chars);
int gbprox_str_to_apn(uint8_t *apn_enc, const char *str, size_t max_chars);
+
+int gbprox_set_patch_filter(const char *filter, const char **err_msg);
#endif