aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/gb_proxy.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-05-23 20:48:07 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-07-22 16:07:01 +0200
commit736852825ab1e7f344a65e532bcb0cca54f5b630 (patch)
treebdf9c908a63dd153888dcfd7009eda778a2d74c4 /openbsc/include/openbsc/gb_proxy.h
parent91fb6802360608a0d2757d4898bfd2387a2ebdcc (diff)
gprs: Add APN patch support for LLC/GSM messages
Patch the APN in every 'Activate PDP Context Request' message to the value given by the 'core-access-point-name' command. If the command is given without an APN, the whole APN IE will be removed. If the command is being prefixed by a 'no', the APN IE remains unmodified. The patch mode 'llc-gsm' is added to selectively enable the patching of LLC session management messages. This is enabled implicitely by the patch mode 'llc'. Note that the patch mode should not be set to a value not enabling the patching of LLC GSM messages ('llc-gsm', 'llc', and 'default' are sufficient to patch 'Activate PDP Context Request' messages). 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gb_proxy.h b/openbsc/include/openbsc/gb_proxy.h
index 18ed81f37..9610ca6df 100644
--- a/openbsc/include/openbsc/gb_proxy.h
+++ b/openbsc/include/openbsc/gb_proxy.h
@@ -13,6 +13,7 @@ enum gbproxy_patch_mode {
GBPROX_PATCH_LLC_ATTACH_REQ, /*!< BSSGP and Attach Request */
GBPROX_PATCH_LLC_ATTACH, /*!< BSSGP and Attach Request/Response */
GBPROX_PATCH_LLC_GMM, /*!< BSSGP and all GMM msgs */
+ GBPROX_PATCH_LLC_GSM, /*!< BSSGP and all GMM and GSM msgs */
GBPROX_PATCH_LLC, /*!< BSSGP and all supported LLC msgs */
};
@@ -26,6 +27,8 @@ struct gbproxy_config {
/* force mcc/mnc */
int core_mnc;
int core_mcc;
+ uint8_t* core_apn;
+ size_t core_apn_size;
enum gbproxy_patch_mode patch_mode;
};
@@ -54,4 +57,7 @@ int gbprox_reset_persistent_nsvcs(struct gprs_ns_inst *nsi);
int gbprox_dump_global(FILE *stream, int indent);
int gbprox_dump_peers(FILE *stream, int indent);
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);
#endif