diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-01-15 11:50:08 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-01-18 18:33:13 +0100 |
commit | 69d271376cce7d26a0469bbb948f272c399ac6c7 (patch) | |
tree | e2054565f15357ad1039192a554e6fa16ac617d4 /openbsc/tests | |
parent | cde0bb27a14553bba2f680cd1307a5f9b3581f0e (diff) |
gprs: Implement PURGE_MS GSUP messages
This commit implements the encoding and decoding of the messages
- Purge MS Request
- Purge MS Error
- Purge MS Result
and adds corresponding tests.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/tests')
-rw-r--r-- | openbsc/tests/gprs/gprs_test.c | 23 | ||||
-rw-r--r-- | openbsc/tests/gprs/gprs_test.ok | 3 |
2 files changed, 26 insertions, 0 deletions
diff --git a/openbsc/tests/gprs/gprs_test.c b/openbsc/tests/gprs/gprs_test.c index b8e9cbe58..37dc83285 100644 --- a/openbsc/tests/gprs/gprs_test.c +++ b/openbsc/tests/gprs/gprs_test.c @@ -471,6 +471,23 @@ static void test_gsup_messages_dec_enc(void) TEST_IMSI_IE, }; + static const uint8_t purge_ms_req[] = { + 0x0c, + TEST_IMSI_IE, + }; + + static const uint8_t purge_ms_err[] = { + 0x0c, + TEST_IMSI_IE, + 0x02, 0x01, 0x03, /* Illegal MS */ + }; + + static const uint8_t purge_ms_res[] = { + 0x0c, + TEST_IMSI_IE, + 0x07, 0x00, + }; + static const struct test { char *name; const uint8_t *data; @@ -494,6 +511,12 @@ static void test_gsup_messages_dec_enc(void) location_cancellation_err, sizeof(location_cancellation_err)}, {"Location Cancellation Result", location_cancellation_res, sizeof(location_cancellation_res)}, + {"Purge MS Request", + purge_ms_req, sizeof(purge_ms_req)}, + {"Purge MS Error", + purge_ms_err, sizeof(purge_ms_err)}, + {"Purge MS Result", + purge_ms_res, sizeof(purge_ms_res)}, }; printf("Test GSUP message decoding/encoding\n"); diff --git a/openbsc/tests/gprs/gprs_test.ok b/openbsc/tests/gprs/gprs_test.ok index eda1f36cf..4825b67cd 100644 --- a/openbsc/tests/gprs/gprs_test.ok +++ b/openbsc/tests/gprs/gprs_test.ok @@ -24,4 +24,7 @@ Test GSUP message decoding/encoding Testing Location Cancellation Request Testing Location Cancellation Error Testing Location Cancellation Result + Testing Purge MS Request + Testing Purge MS Error + Testing Purge MS Result Done. |