summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-11-26 18:16:11 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-11-26 18:17:28 +0100
commit039c7adcd5af78ebe93e82df26c2ceaaa9071517 (patch)
treeb34756fe723b002b10364a5e3952188a7f01717b /tests
parent4698d27f4c035ab6bfedf6b0d72761648889369b (diff)
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/sccp/sccp_test.c21
1 files changed, 21 insertions, 0 deletions
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()