aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/gbproxy/gbproxy_test.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-08-06 15:16:45 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2014-08-13 09:55:27 +0200
commit690768a1717cda1fbc027ed75c818e886da50f7c (patch)
tree79065f9a592ada4b93815c2bc5ca4b6d84efae69 /openbsc/tests/gbproxy/gbproxy_test.c
parent2db2512f4de4bc88c934293eb260e4888c240b3e (diff)
gbproxy: Parse additional IMSI/PTMSI/TLLI fields
This adds parsing support for the following messages: - Attach Request: IMSI/PTMSI - Identity Response: IMSI/PTMSI - BSSGP: Optional TLLI IE - BSSGP/PAGING_PS: PTMSI A new new_ptmsi_enc field is added for newly assigned PTMSI in SGSN->BSS messages (instead of ptmsi_enc). The ptmsi_enc field is now used for informational PTMSI IE in messages. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/tests/gbproxy/gbproxy_test.c')
-rw-r--r--openbsc/tests/gbproxy/gbproxy_test.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c
index a3768ae17..769dc675d 100644
--- a/openbsc/tests/gbproxy/gbproxy_test.c
+++ b/openbsc/tests/gbproxy/gbproxy_test.c
@@ -146,6 +146,22 @@ static const unsigned char bssgp_attach_req[75] = {
0x16, 0x6d, 0x01
};
+/* Base Station Subsystem GPRS Protocol: GSM A-I/F DTAP - Identity Request */
+static const unsigned char bssgp_identity_req[] = {
+ 0x00, 0xbb, 0xc5, 0x46, 0x79, 0x00, 0x50, 0x20,
+ 0x16, 0x82, 0x02, 0x58, 0x0e, 0x89, 0x41, 0xc0,
+ 0x01, 0x08, 0x15, 0x01, 0xff, 0x6c, 0xba
+};
+
+/* Base Station Subsystem GPRS Protocol: GSM A-I/F DTAP - Identity Response */
+static const unsigned char bssgp_identity_resp[] = {
+ 0x01, 0xbb, 0xc5, 0x46, 0x79, 0x00, 0x00, 0x04,
+ 0x08, 0x88, 0x11, 0x22, 0x33, 0x40, 0x50, 0x60,
+ 0x75, 0x30, 0x00, 0x80, 0x0e, 0x00, 0x11, 0x01,
+ 0xc0, 0x0d, 0x08, 0x16, 0x08, 0x11, 0x12, 0x13,
+ 0x14, 0x15, 0x16, 0x17, 0x18, 0xb7, 0x1b, 0x9a
+};
+
/* Base Station Subsystem GPRS Protocol: GSM A-I/F DTAP - Attach Accept */
static const unsigned char bssgp_attach_acc[88] = {
0x00, 0xbb, 0xc5, 0x46, 0x79, 0x00, 0x50, 0x20,
@@ -984,6 +1000,12 @@ static void test_gbproxy_ra_patching()
send_ns_unitdata(nsi, "ATTACH REQUEST", &bss_peer[0], 0x1002,
bssgp_attach_req, sizeof(bssgp_attach_req));
+ send_ns_unitdata(nsi, "IDENT REQUEST", &sgsn_peer, 0x1002,
+ bssgp_identity_req, sizeof(bssgp_identity_req));
+
+ send_ns_unitdata(nsi, "IDENT RESPONSE", &bss_peer[0], 0x1002,
+ bssgp_identity_resp, sizeof(bssgp_identity_resp));
+
send_ns_unitdata(nsi, "ATTACH ACCEPT", &sgsn_peer, 0x1002,
bssgp_attach_acc, sizeof(bssgp_attach_acc));