summaryrefslogtreecommitdiffstats
path: root/openbsc/tests/gsm0408/gsm0408_test.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-03-04 10:55:40 +0100
committerHarald Welte <laforge@gnumonks.org>2010-03-04 10:55:40 +0100
commitafedeabd919972dcc3968b0d9743dc0b1a80774c (patch)
tree0626cdf58fa03d855f30ed6bb4e56a1a243e3285 /openbsc/tests/gsm0408/gsm0408_test.c
parentfbc5ca080beedf8ca032cdd409db30838843f79b (diff)
move some gsm48 utility functions to libosmocore
* gsm48_generate_lai() gsm48_generate_mid_from_tmsi() gsm48_generate_mid_from_imsi() * gsm48_cc_msg_names[]
Diffstat (limited to 'openbsc/tests/gsm0408/gsm0408_test.c')
-rw-r--r--openbsc/tests/gsm0408/gsm0408_test.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c
index bbf812965..287d4ee99 100644
--- a/openbsc/tests/gsm0408/gsm0408_test.c
+++ b/openbsc/tests/gsm0408/gsm0408_test.c
@@ -23,6 +23,8 @@
#include <stdio.h>
#include <stdlib.h>
+#include <arpa/inet.h>
+
#include <openbsc/gsm_04_08.h>
#include <openbsc/gsm_subscriber.h>
#include <openbsc/debug.h>
@@ -52,13 +54,13 @@ static void test_location_area_identifier(void)
* Test the default/test setup. Coming from
* bsc_hack.c dumps
*/
- gsm0408_generate_lai(&lai48, 1, 1, 1);
+ gsm48_generate_lai(&lai48, 1, 1, 1);
COMPARE(lai48.digits[0], ==, 0x00);
COMPARE(lai48.digits[1], ==, 0xF1);
COMPARE(lai48.digits[2], ==, 0x10);
COMPARE(lai48.lac, ==, htons(0x0001));
- gsm0408_generate_lai(&lai48, 602, 1, 15);
+ gsm48_generate_lai(&lai48, 602, 1, 15);
COMPARE(lai48.digits[0], ==, 0x06);
COMPARE(lai48.digits[1], ==, 0xF2);
COMPARE(lai48.digits[2], ==, 0x10);
@@ -97,6 +99,8 @@ int main(int argc, char** argv)
{
test_location_area_identifier();
test_mi_functionality();
+
+ exit(0);
}