From 039c7adcd5af78ebe93e82df26c2ceaaa9071517 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 26 Nov 2010 18:16:11 +0100 Subject: sccp: Add a test case for GTI creation, set the SSN indicator bit Make sure that creating an address that should be routed based on the GTI can be created properly. --- tests/sccp/sccp_test.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'tests') diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c index da1b081..8ef223e 100644 --- a/tests/sccp/sccp_test.c +++ b/tests/sccp/sccp_test.c @@ -914,6 +914,22 @@ static uint8_t poi_out[] = { 0x04, 0x43, 0x01, 0x00, 0xfe, }; +static uint8_t gti_dat[] = { + 0x00, 0x12, 0x04, 0x53, 0x84, 0x09, 0x00, 0x17, +}; + +const struct sockaddr_sccp sccp_gti_bssap = { + .sccp_family = 0, + .sccp_ssn = 7, + .gti_ind = 4, + .gti_len = ARRAY_SIZE(gti_dat), + .gti = gti_dat, +}; + +static uint8_t gti_out[] = { + 0x0a, 0x12, 0x07, 0x00, 0x12, 0x04, 0x53, 0x84, 0x09, 0x00, 0x17, +}; + static struct sccp_addr_tst sccp_addr_tst[] = { { .addr = &sccp_ssn_bssap, @@ -925,6 +941,11 @@ static struct sccp_addr_tst sccp_addr_tst[] = { .output = poi_out, .output_len = ARRAY_SIZE(poi_out), }, + { + .addr = &sccp_gti_bssap, + .output = gti_out, + .output_len = ARRAY_SIZE(gti_out), + }, }; static void test_sccp_address() -- cgit v1.2.3