[PATCH 1/2] gbproxy: Add test for NSEI and NSVCI changes

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Jacob Erlbeck jerlbeck at sysmocom.de
Thu Oct 24 10:48:55 UTC 2013


This checks the behavior of the gbproxy when the BSS peer changes the
NSEI and the NSVCI. It also tests BVC_RESET and other UNITDATA
messages after these changes between BSS and SGSN and vice versa (via
the gbproxy).

Ticket: OW#874
Sponsored-by: On-Waves ehf
---
 openbsc/include/openbsc/gb_proxy.h    |    1 +
 openbsc/src/gprs/gb_proxy.c           |   11 +
 openbsc/tests/gbproxy/gbproxy_test.c  |  153 ++++++-
 openbsc/tests/gbproxy/gbproxy_test.ok |  705 ++++++++++++++++++++++++++++++++-
 4 files changed, 866 insertions(+), 4 deletions(-)

diff --git a/openbsc/include/openbsc/gb_proxy.h b/openbsc/include/openbsc/gb_proxy.h
index c2c9092..4d189a6 100644
--- a/openbsc/include/openbsc/gb_proxy.h
+++ b/openbsc/include/openbsc/gb_proxy.h
@@ -39,4 +39,5 @@ int gbprox_reset_persistent_nsvcs(struct gprs_ns_inst *nsi);
 
 int gbprox_dump_global(FILE *stream, int indent, int verbose);
 int gbprox_dump_peers(FILE *stream, int indent, int verbose);
+void gbprox_reset();
 #endif
diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c
index 6f7d1c3..f008b3e 100644
--- a/openbsc/src/gprs/gb_proxy.c
+++ b/openbsc/src/gprs/gb_proxy.c
@@ -881,6 +881,17 @@ int gbprox_dump_peers(FILE *stream, int indent, int verbose)
 	return 0;
 }
 
+void gbprox_reset()
+{
+	struct gbprox_peer *peer, *tmp;
+
+	llist_for_each_entry_safe(peer, tmp, &gbprox_bts_peers, list)
+		peer_free(peer);
+
+	rate_ctr_group_free(global_ctrg);
+	global_ctrg = NULL;
+}
+
 static int gbprox_cleanup_peers(uint16_t nsei, uint16_t bvci)
 {
 	int counter = 0;
diff --git a/openbsc/tests/gbproxy/gbproxy_test.c b/openbsc/tests/gbproxy/gbproxy_test.c
index e1e6587..d32ac83 100644
--- a/openbsc/tests/gbproxy/gbproxy_test.c
+++ b/openbsc/tests/gbproxy/gbproxy_test.c
@@ -543,6 +543,147 @@ static void test_gbproxy()
 
 	gprs_ns_destroy(nsi);
 	nsi = NULL;
+	gbprox_reset();
+}
+
+static void test_gbproxy_ident_changes()
+{
+	struct gprs_ns_inst *nsi = gprs_ns_instantiate(gprs_ns_callback, NULL);
+	struct sockaddr_in bss_peer[1] = {{0},};
+	struct sockaddr_in sgsn_peer= {0};
+	uint16_t nsei[2] = {0x1000, 0x2000};
+	uint16_t nsvci[2] = {0x1001, 0x2001};
+	uint16_t bvci[4] = {0x1002, 0x2002, 0x3002, 0x4002};
+
+	bssgp_nsi = nsi;
+	gbcfg.nsi = bssgp_nsi;
+	gbcfg.nsip_sgsn_nsei = SGSN_NSEI;
+
+	sgsn_peer.sin_family = AF_INET;
+	sgsn_peer.sin_port = htons(32000);
+	sgsn_peer.sin_addr.s_addr = htonl(REMOTE_SGSN_ADDR);
+
+	bss_peer[0].sin_family = AF_INET;
+	bss_peer[0].sin_port = htons(1111);
+	bss_peer[0].sin_addr.s_addr = htonl(REMOTE_BSS_ADDR);
+
+	printf("--- Initialise SGSN ---\n\n");
+
+	gprs_ns_nsip_connect(nsi, &sgsn_peer, SGSN_NSEI, SGSN_NSEI+1);
+	send_ns_reset_ack(nsi, &sgsn_peer, SGSN_NSEI+1, SGSN_NSEI);
+	send_ns_alive_ack(nsi, &sgsn_peer);
+	send_ns_unblock_ack(nsi, &sgsn_peer);
+	send_ns_alive(nsi, &sgsn_peer);
+	gprs_dump_nsi(nsi);
+
+	printf("--- Initialise BSS 1 ---\n\n");
+
+	setup_ns(nsi, &bss_peer[0], nsvci[0], nsei[0]);
+	gprs_dump_nsi(nsi);
+
+	printf("--- Setup BVCI 1 ---\n\n");
+
+	setup_bssgp(nsi, &bss_peer[0], bvci[0]);
+	send_bssgp_reset_ack(nsi, &sgsn_peer, bvci[0]);
+	gbprox_dump_peers(stdout, 0, 1);
+
+	printf("--- Setup BVCI 2 ---\n\n");
+
+	setup_bssgp(nsi, &bss_peer[0], bvci[1]);
+	send_bssgp_reset_ack(nsi, &sgsn_peer, bvci[1]);
+	gbprox_dump_peers(stdout, 0, 1);
+
+	printf("--- Send message from BSS 1 to SGSN and back, BVCI 1 ---\n\n");
+
+	send_ns_unitdata(nsi, NULL, &bss_peer[0], bvci[0], (uint8_t *)"", 0);
+	send_ns_unitdata(nsi, NULL, &sgsn_peer, bvci[0], (uint8_t *)"", 0);
+
+	printf("--- Send message from BSS 1 to SGSN and back, BVCI 2 ---\n\n");
+
+	send_ns_unitdata(nsi, NULL, &bss_peer[0], bvci[1], (uint8_t *)"", 0);
+	send_ns_unitdata(nsi, NULL, &sgsn_peer, bvci[1], (uint8_t *)"", 0);
+
+	printf("--- Change NSEI ---\n\n");
+
+	setup_ns(nsi, &bss_peer[0], nsvci[0], nsei[1]);
+	gprs_dump_nsi(nsi);
+
+	printf("--- Setup BVCI 1 ---\n\n");
+
+	setup_bssgp(nsi, &bss_peer[0], bvci[0]);
+	send_bssgp_reset_ack(nsi, &sgsn_peer, bvci[0]);
+	gbprox_dump_peers(stdout, 0, 1);
+
+	printf("--- Setup BVCI 3 ---\n\n");
+
+	setup_bssgp(nsi, &bss_peer[0], bvci[2]);
+	send_bssgp_reset_ack(nsi, &sgsn_peer, bvci[2]);
+	gbprox_dump_peers(stdout, 0, 1);
+
+	printf("--- Send message from BSS 1 to SGSN and back, BVCI 1 ---\n\n");
+
+	send_ns_unitdata(nsi, NULL, &bss_peer[0], bvci[0], (uint8_t *)"", 0);
+	send_ns_unitdata(nsi, NULL, &sgsn_peer, bvci[0], (uint8_t *)"", 0);
+
+	printf("--- Send message from BSS 1 to SGSN and back, BVCI 2 "
+	       " (should fail) ---\n\n");
+
+	send_ns_unitdata(nsi, NULL, &bss_peer[0], bvci[1], (uint8_t *)"", 0);
+	gbprox_dump_peers(stdout, 0, 1);
+	send_ns_unitdata(nsi, NULL, &sgsn_peer, bvci[1], (uint8_t *)"", 0);
+	gbprox_dump_peers(stdout, 0, 1);
+
+	printf("--- Send message from BSS 1 to SGSN and back, BVCI 3 ---\n\n");
+
+	send_ns_unitdata(nsi, NULL, &bss_peer[0], bvci[2], (uint8_t *)"", 0);
+	send_ns_unitdata(nsi, NULL, &sgsn_peer, bvci[2], (uint8_t *)"", 0);
+
+	printf("--- Change NSVCI ---\n\n");
+
+	setup_ns(nsi, &bss_peer[0], nsvci[1], nsei[1]);
+	gprs_dump_nsi(nsi);
+
+	printf("--- Setup BVCI 1 ---\n\n");
+
+	setup_bssgp(nsi, &bss_peer[0], bvci[0]);
+	send_bssgp_reset_ack(nsi, &sgsn_peer, bvci[0]);
+	gbprox_dump_peers(stdout, 0, 1);
+
+	printf("--- Setup BVCI 4 ---\n\n");
+
+	setup_bssgp(nsi, &bss_peer[0], bvci[3]);
+	send_bssgp_reset_ack(nsi, &sgsn_peer, bvci[3]);
+	gbprox_dump_peers(stdout, 0, 1);
+
+	printf("--- Send message from BSS 1 to SGSN and back, BVCI 1 ---\n\n");
+
+	send_ns_unitdata(nsi, NULL, &bss_peer[0], bvci[0], (uint8_t *)"", 0);
+	send_ns_unitdata(nsi, NULL, &sgsn_peer, bvci[0], (uint8_t *)"", 0);
+
+	printf("--- Send message from BSS 1 to SGSN and back, BVCI 2 "
+	       " (should fail) ---\n\n");
+
+	send_ns_unitdata(nsi, NULL, &bss_peer[0], bvci[1], (uint8_t *)"", 0);
+	gbprox_dump_peers(stdout, 0, 1);
+	send_ns_unitdata(nsi, NULL, &sgsn_peer, bvci[1], (uint8_t *)"", 0);
+	gbprox_dump_peers(stdout, 0, 1);
+
+	printf("--- Send message from BSS 1 to SGSN and back, BVCI 3 ---\n\n");
+
+	send_ns_unitdata(nsi, NULL, &bss_peer[0], bvci[2], (uint8_t *)"", 0);
+	send_ns_unitdata(nsi, NULL, &sgsn_peer, bvci[2], (uint8_t *)"", 0);
+
+	printf("--- Send message from BSS 1 to SGSN and back, BVCI 4 ---\n\n");
+
+	send_ns_unitdata(nsi, NULL, &bss_peer[0], bvci[3], (uint8_t *)"", 0);
+	send_ns_unitdata(nsi, NULL, &sgsn_peer, bvci[3], (uint8_t *)"", 0);
+
+	gbprox_dump_global(stdout, 0, 1);
+	gbprox_dump_peers(stdout, 0, 1);
+
+	gprs_ns_destroy(nsi);
+	nsi = NULL;
+	gbprox_reset();
 }
 
 
@@ -555,9 +696,17 @@ int main(int argc, char **argv)
 	log_set_print_filename(osmo_stderr_target, 0);
 	osmo_signal_register_handler(SS_L_NS, &test_signal, NULL);
 
-	printf("===== NS protocol test START\n");
+	log_set_print_filename(osmo_stderr_target, 0);
+	log_set_log_level(osmo_stderr_target, LOGL_INFO);
+
+	rate_ctr_init(NULL);
+
+	setlinebuf(stdout);
+
+	printf("===== GbProxy test START\n");
 	test_gbproxy();
-	printf("===== NS protocol test END\n\n");
+	test_gbproxy_ident_changes();
+	printf("===== GbProxy test END\n\n");
 
 	exit(EXIT_SUCCESS);
 }
diff --git a/openbsc/tests/gbproxy/gbproxy_test.ok b/openbsc/tests/gbproxy/gbproxy_test.ok
index 35d97e7..b21f58a 100644
--- a/openbsc/tests/gbproxy/gbproxy_test.ok
+++ b/openbsc/tests/gbproxy/gbproxy_test.ok
@@ -1,4 +1,4 @@
-===== NS protocol test START
+===== GbProxy test START
 --- Initialise SGSN ---
 
 MESSAGE to SGSN at 0x05060708:32000, msg length 12
@@ -814,5 +814,706 @@ result (UNITDATA) = 14
 
 Gbproxy global:
     Invalid BVC Identifier          : 1
-===== NS protocol test END
+--- Initialise SGSN ---
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 12
+02 00 81 01 01 82 01 01 04 82 01 00 
+
+PROCESSING RESET_ACK from 0x05060708:32000
+03 01 82 01 01 04 82 01 00 
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 1
+0a 
+
+result (RESET_ACK) = 1
+
+PROCESSING ALIVE_ACK from 0x05060708:32000
+0b 
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 1
+06 
+
+result (ALIVE_ACK) = 1
+
+PROCESSING UNBLOCK_ACK from 0x05060708:32000
+07 
+
+==> got signal NS_UNBLOCK, NS-VC 0x0101/5.6.7.8:32000
+
+result (UNBLOCK_ACK) = 0
+
+PROCESSING ALIVE from 0x05060708:32000
+0a 
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 1
+0b 
+
+result (ALIVE) = 1
+
+Current NS-VCIs:
+    VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+         NS-VC Block count         : 1
+
+--- Initialise BSS 1 ---
+
+Setup NS-VC: remote 0x01020304:1111, NSVCI 0x1001(4097), NSEI 0x1000(4096)
+
+PROCESSING RESET from 0x01020304:1111
+02 00 81 01 01 82 10 01 04 82 10 00 
+
+==> got signal NS_RESET, NS-VC 0x1001/1.2.3.4:1111
+
+MESSAGE to BSS at 0x01020304:1111, msg length 9
+03 01 82 10 01 04 82 10 00 
+
+MESSAGE to BSS at 0x01020304:1111, msg length 1
+0a 
+
+result (RESET) = 9
+
+PROCESSING ALIVE from 0x01020304:1111
+0a 
+
+MESSAGE to BSS at 0x01020304:1111, msg length 1
+0b 
+
+result (ALIVE) = 1
+
+PROCESSING UNBLOCK from 0x01020304:1111
+06 
+
+==> got signal NS_UNBLOCK, NS-VC 0x1001/1.2.3.4:1111
+
+MESSAGE to BSS at 0x01020304:1111, msg length 1
+07 
+
+result (UNBLOCK) = 1
+
+PROCESSING ALIVE_ACK from 0x01020304:1111
+0b 
+
+result (ALIVE_ACK) = 0
+
+Current NS-VCIs:
+    VCI 0x1001, NSEI 0x1000, peer 0x01020304:1111
+    VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+         NS-VC Block count         : 1
+
+--- Setup BVCI 1 ---
+
+Setup BSSGP: remote 0x01020304:1111, BVCI 0x1002(4098)
+
+PROCESSING BVC_RESET from 0x01020304:1111
+00 00 00 00 22 04 82 10 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+CALLBACK, event 0, msg length 22, bvci 0x0000
+22 04 82 10 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+NS UNITDATA MESSAGE to SGSN, BVCI 0x0000, msg length 22
+22 04 82 10 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 26
+00 00 00 00 22 04 82 10 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+result (BVC_RESET) = 26
+
+PROCESSING BVC_RESET_ACK from 0x05060708:32000
+00 00 00 00 23 04 82 10 02 
+
+CALLBACK, event 0, msg length 5, bvci 0x0000
+23 04 82 10 02 
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x0000, msg length 5
+23 04 82 10 02 
+
+MESSAGE to BSS at 0x01020304:1111, msg length 9
+00 00 00 00 23 04 82 10 02 
+
+result (BVC_RESET_ACK) = 9
+
+Peers:
+  NSEI 4096, BVCI 4098, not blocked, RAC 10-32-16464-96
+--- Setup BVCI 2 ---
+
+Setup BSSGP: remote 0x01020304:1111, BVCI 0x2002(8194)
+
+PROCESSING BVC_RESET from 0x01020304:1111
+00 00 00 00 22 04 82 20 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+CALLBACK, event 0, msg length 22, bvci 0x0000
+22 04 82 20 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+NS UNITDATA MESSAGE to SGSN, BVCI 0x0000, msg length 22
+22 04 82 20 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 26
+00 00 00 00 22 04 82 20 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+result (BVC_RESET) = 26
+
+PROCESSING BVC_RESET_ACK from 0x05060708:32000
+00 00 00 00 23 04 82 20 02 
+
+CALLBACK, event 0, msg length 5, bvci 0x0000
+23 04 82 20 02 
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x0000, msg length 5
+23 04 82 20 02 
+
+MESSAGE to BSS at 0x01020304:1111, msg length 9
+00 00 00 00 23 04 82 20 02 
+
+result (BVC_RESET_ACK) = 9
+
+Peers:
+  NSEI 4096, BVCI 8194, not blocked, RAC 10-32-16464-96
+  NSEI 4096, BVCI 4098, not blocked, RAC 10-32-16464-96
+--- Send message from BSS 1 to SGSN and back, BVCI 1 ---
+
+PROCESSING UNITDATA from 0x01020304:1111
+00 00 10 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x1002
+
+
+NS UNITDATA MESSAGE to SGSN, BVCI 0x1002, msg length 0
+
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 4
+00 00 10 02 
+
+result (UNITDATA) = 4
+
+PROCESSING UNITDATA from 0x05060708:32000
+00 00 10 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x1002
+
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x1002, msg length 0
+
+
+MESSAGE to BSS at 0x01020304:1111, msg length 4
+00 00 10 02 
+
+result (UNITDATA) = 4
+
+--- Send message from BSS 1 to SGSN and back, BVCI 2 ---
+
+PROCESSING UNITDATA from 0x01020304:1111
+00 00 20 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x2002
+
+
+NS UNITDATA MESSAGE to SGSN, BVCI 0x2002, msg length 0
+
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 4
+00 00 20 02 
+
+result (UNITDATA) = 4
+
+PROCESSING UNITDATA from 0x05060708:32000
+00 00 20 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x2002
+
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x2002, msg length 0
+
+
+MESSAGE to BSS at 0x01020304:1111, msg length 4
+00 00 20 02 
+
+result (UNITDATA) = 4
+
+--- Change NSEI ---
+
+Setup NS-VC: remote 0x01020304:1111, NSVCI 0x1001(4097), NSEI 0x2000(8192)
+
+PROCESSING RESET from 0x01020304:1111
+02 00 81 01 01 82 10 01 04 82 20 00 
+
+==> got signal NS_RESET, NS-VC 0x1001/1.2.3.4:1111
+
+MESSAGE to BSS at 0x01020304:1111, msg length 9
+03 01 82 10 01 04 82 20 00 
+
+MESSAGE to BSS at 0x01020304:1111, msg length 1
+0a 
+
+result (RESET) = 9
+
+PROCESSING ALIVE from 0x01020304:1111
+0a 
+
+MESSAGE to BSS at 0x01020304:1111, msg length 1
+0b 
+
+result (ALIVE) = 1
+
+PROCESSING UNBLOCK from 0x01020304:1111
+06 
+
+==> got signal NS_UNBLOCK, NS-VC 0x1001/1.2.3.4:1111
+
+MESSAGE to BSS at 0x01020304:1111, msg length 1
+07 
+
+result (UNBLOCK) = 1
+
+PROCESSING ALIVE_ACK from 0x01020304:1111
+0b 
+
+result (ALIVE_ACK) = 0
+
+Current NS-VCIs:
+    VCI 0x1001, NSEI 0x2000, peer 0x01020304:1111
+         NS-VC changed NSEI count  : 1
+    VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+         NS-VC Block count         : 1
+
+--- Setup BVCI 1 ---
+
+Setup BSSGP: remote 0x01020304:1111, BVCI 0x1002(4098)
+
+PROCESSING BVC_RESET from 0x01020304:1111
+00 00 00 00 22 04 82 10 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+CALLBACK, event 0, msg length 22, bvci 0x0000
+22 04 82 10 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+NS UNITDATA MESSAGE to SGSN, BVCI 0x0000, msg length 22
+22 04 82 10 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 26
+00 00 00 00 22 04 82 10 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+result (BVC_RESET) = 26
+
+PROCESSING BVC_RESET_ACK from 0x05060708:32000
+00 00 00 00 23 04 82 10 02 
+
+CALLBACK, event 0, msg length 5, bvci 0x0000
+23 04 82 10 02 
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x0000, msg length 5
+23 04 82 10 02 
+
+result (BVC_RESET_ACK) = -22
+
+Peers:
+  NSEI 4096, BVCI 8194, not blocked, RAC 10-32-16464-96
+  NSEI 4096, BVCI 4098, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 1
+    NS Transmission error           : 1
+--- Setup BVCI 3 ---
+
+Setup BSSGP: remote 0x01020304:1111, BVCI 0x3002(12290)
+
+PROCESSING BVC_RESET from 0x01020304:1111
+00 00 00 00 22 04 82 30 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+CALLBACK, event 0, msg length 22, bvci 0x0000
+22 04 82 30 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+NS UNITDATA MESSAGE to SGSN, BVCI 0x0000, msg length 22
+22 04 82 30 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 26
+00 00 00 00 22 04 82 30 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+result (BVC_RESET) = 26
+
+PROCESSING BVC_RESET_ACK from 0x05060708:32000
+00 00 00 00 23 04 82 30 02 
+
+CALLBACK, event 0, msg length 5, bvci 0x0000
+23 04 82 30 02 
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x0000, msg length 5
+23 04 82 30 02 
+
+MESSAGE to BSS at 0x01020304:1111, msg length 9
+00 00 00 00 23 04 82 30 02 
+
+result (BVC_RESET_ACK) = 9
+
+Peers:
+  NSEI 8192, BVCI 12290, not blocked, RAC 10-32-16464-96
+  NSEI 4096, BVCI 8194, not blocked, RAC 10-32-16464-96
+  NSEI 4096, BVCI 4098, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 1
+    NS Transmission error           : 1
+--- Send message from BSS 1 to SGSN and back, BVCI 1 ---
+
+PROCESSING UNITDATA from 0x01020304:1111
+00 00 10 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x1002
+
+
+NS UNITDATA MESSAGE to SGSN, BVCI 0x1002, msg length 0
+
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 4
+00 00 10 02 
+
+result (UNITDATA) = 4
+
+PROCESSING UNITDATA from 0x05060708:32000
+00 00 10 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x1002
+
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x1002, msg length 0
+
+
+result (UNITDATA) = -22
+
+--- Send message from BSS 1 to SGSN and back, BVCI 2  (should fail) ---
+
+PROCESSING UNITDATA from 0x01020304:1111
+00 00 20 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x2002
+
+
+NS UNITDATA MESSAGE to SGSN, BVCI 0x2002, msg length 0
+
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 4
+00 00 20 02 
+
+result (UNITDATA) = 4
+
+Peers:
+  NSEI 8192, BVCI 12290, not blocked, RAC 10-32-16464-96
+  NSEI 4096, BVCI 8194, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 1
+  NSEI 4096, BVCI 4098, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 2
+    NS Transmission error           : 2
+PROCESSING UNITDATA from 0x05060708:32000
+00 00 20 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x2002
+
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x2002, msg length 0
+
+
+result (UNITDATA) = -22
+
+Peers:
+  NSEI 8192, BVCI 12290, not blocked, RAC 10-32-16464-96
+  NSEI 4096, BVCI 8194, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 1
+    NS Transmission error           : 1
+  NSEI 4096, BVCI 4098, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 2
+    NS Transmission error           : 2
+--- Send message from BSS 1 to SGSN and back, BVCI 3 ---
+
+PROCESSING UNITDATA from 0x01020304:1111
+00 00 30 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x3002
+
+
+NS UNITDATA MESSAGE to SGSN, BVCI 0x3002, msg length 0
+
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 4
+00 00 30 02 
+
+result (UNITDATA) = 4
+
+PROCESSING UNITDATA from 0x05060708:32000
+00 00 30 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x3002
+
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x3002, msg length 0
+
+
+MESSAGE to BSS at 0x01020304:1111, msg length 4
+00 00 30 02 
+
+result (UNITDATA) = 4
+
+--- Change NSVCI ---
+
+Setup NS-VC: remote 0x01020304:1111, NSVCI 0x2001(8193), NSEI 0x2000(8192)
+
+PROCESSING RESET from 0x01020304:1111
+02 00 81 01 01 82 20 01 04 82 20 00 
+
+==> got signal NS_REPLACED: 0x2001/0.0.0.0:0 -> 0x1001/1.2.3.4:1111
+
+==> got signal NS_RESET, NS-VC 0x2001/1.2.3.4:1111
+
+MESSAGE to BSS at 0x01020304:1111, msg length 9
+03 01 82 20 01 04 82 20 00 
+
+MESSAGE to BSS at 0x01020304:1111, msg length 1
+0a 
+
+result (RESET) = 9
+
+PROCESSING ALIVE from 0x01020304:1111
+0a 
+
+MESSAGE to BSS at 0x01020304:1111, msg length 1
+0b 
+
+result (ALIVE) = 1
+
+PROCESSING UNBLOCK from 0x01020304:1111
+06 
+
+==> got signal NS_UNBLOCK, NS-VC 0x2001/1.2.3.4:1111
+
+MESSAGE to BSS at 0x01020304:1111, msg length 1
+07 
+
+result (UNBLOCK) = 1
+
+PROCESSING ALIVE_ACK from 0x01020304:1111
+0b 
+
+result (ALIVE_ACK) = 0
+
+Current NS-VCIs:
+    VCI 0x2001, NSEI 0x2000, peer 0x01020304:1111
+         NS-VC replaced other count: 1
+    VCI 0x1001, NSEI 0x2000, peer 0x00000000:0
+         NS-VC changed NSEI count  : 1
+    VCI 0x0101, NSEI 0x0100, peer 0x05060708:32000
+         NS-VC Block count         : 1
+
+--- Setup BVCI 1 ---
+
+Setup BSSGP: remote 0x01020304:1111, BVCI 0x1002(4098)
+
+PROCESSING BVC_RESET from 0x01020304:1111
+00 00 00 00 22 04 82 10 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+CALLBACK, event 0, msg length 22, bvci 0x0000
+22 04 82 10 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+NS UNITDATA MESSAGE to SGSN, BVCI 0x0000, msg length 22
+22 04 82 10 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 26
+00 00 00 00 22 04 82 10 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+result (BVC_RESET) = 26
+
+PROCESSING BVC_RESET_ACK from 0x05060708:32000
+00 00 00 00 23 04 82 10 02 
+
+CALLBACK, event 0, msg length 5, bvci 0x0000
+23 04 82 10 02 
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x0000, msg length 5
+23 04 82 10 02 
+
+result (BVC_RESET_ACK) = -22
+
+Peers:
+  NSEI 8192, BVCI 12290, not blocked, RAC 10-32-16464-96
+  NSEI 4096, BVCI 8194, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 1
+    NS Transmission error           : 1
+  NSEI 4096, BVCI 4098, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 3
+    NS Transmission error           : 3
+--- Setup BVCI 4 ---
+
+Setup BSSGP: remote 0x01020304:1111, BVCI 0x4002(16386)
+
+PROCESSING BVC_RESET from 0x01020304:1111
+00 00 00 00 22 04 82 40 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+CALLBACK, event 0, msg length 22, bvci 0x0000
+22 04 82 40 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+NS UNITDATA MESSAGE to SGSN, BVCI 0x0000, msg length 22
+22 04 82 40 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 26
+00 00 00 00 22 04 82 40 02 07 81 08 08 88 10 20 30 40 50 60 10 00 00 00 00 00 
+
+result (BVC_RESET) = 26
+
+PROCESSING BVC_RESET_ACK from 0x05060708:32000
+00 00 00 00 23 04 82 40 02 
+
+CALLBACK, event 0, msg length 5, bvci 0x0000
+23 04 82 40 02 
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x0000, msg length 5
+23 04 82 40 02 
+
+MESSAGE to BSS at 0x01020304:1111, msg length 9
+00 00 00 00 23 04 82 40 02 
+
+result (BVC_RESET_ACK) = 9
+
+Peers:
+  NSEI 8192, BVCI 16386, not blocked, RAC 10-32-16464-96
+  NSEI 8192, BVCI 12290, not blocked, RAC 10-32-16464-96
+  NSEI 4096, BVCI 8194, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 1
+    NS Transmission error           : 1
+  NSEI 4096, BVCI 4098, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 3
+    NS Transmission error           : 3
+--- Send message from BSS 1 to SGSN and back, BVCI 1 ---
+
+PROCESSING UNITDATA from 0x01020304:1111
+00 00 10 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x1002
+
+
+NS UNITDATA MESSAGE to SGSN, BVCI 0x1002, msg length 0
+
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 4
+00 00 10 02 
+
+result (UNITDATA) = 4
+
+PROCESSING UNITDATA from 0x05060708:32000
+00 00 10 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x1002
+
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x1002, msg length 0
+
+
+result (UNITDATA) = -22
+
+--- Send message from BSS 1 to SGSN and back, BVCI 2  (should fail) ---
+
+PROCESSING UNITDATA from 0x01020304:1111
+00 00 20 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x2002
+
+
+NS UNITDATA MESSAGE to SGSN, BVCI 0x2002, msg length 0
+
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 4
+00 00 20 02 
+
+result (UNITDATA) = 4
+
+Peers:
+  NSEI 8192, BVCI 16386, not blocked, RAC 10-32-16464-96
+  NSEI 8192, BVCI 12290, not blocked, RAC 10-32-16464-96
+  NSEI 4096, BVCI 8194, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 2
+    NS Transmission error           : 1
+  NSEI 4096, BVCI 4098, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 4
+    NS Transmission error           : 4
+PROCESSING UNITDATA from 0x05060708:32000
+00 00 20 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x2002
+
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x2002, msg length 0
+
+
+result (UNITDATA) = -22
+
+Peers:
+  NSEI 8192, BVCI 16386, not blocked, RAC 10-32-16464-96
+  NSEI 8192, BVCI 12290, not blocked, RAC 10-32-16464-96
+  NSEI 4096, BVCI 8194, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 2
+    NS Transmission error           : 2
+  NSEI 4096, BVCI 4098, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 4
+    NS Transmission error           : 4
+--- Send message from BSS 1 to SGSN and back, BVCI 3 ---
+
+PROCESSING UNITDATA from 0x01020304:1111
+00 00 30 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x3002
+
+
+NS UNITDATA MESSAGE to SGSN, BVCI 0x3002, msg length 0
+
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 4
+00 00 30 02 
+
+result (UNITDATA) = 4
+
+PROCESSING UNITDATA from 0x05060708:32000
+00 00 30 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x3002
+
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x3002, msg length 0
+
+
+MESSAGE to BSS at 0x01020304:1111, msg length 4
+00 00 30 02 
+
+result (UNITDATA) = 4
+
+--- Send message from BSS 1 to SGSN and back, BVCI 4 ---
+
+PROCESSING UNITDATA from 0x01020304:1111
+00 00 40 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x4002
+
+
+NS UNITDATA MESSAGE to SGSN, BVCI 0x4002, msg length 0
+
+
+MESSAGE to SGSN at 0x05060708:32000, msg length 4
+00 00 40 02 
+
+result (UNITDATA) = 4
+
+PROCESSING UNITDATA from 0x05060708:32000
+00 00 40 02 
+
+CALLBACK, event 0, msg length 0, bvci 0x4002
+
+
+NS UNITDATA MESSAGE to BSS, BVCI 0x4002, msg length 0
+
+
+MESSAGE to BSS at 0x01020304:1111, msg length 4
+00 00 40 02 
+
+result (UNITDATA) = 4
+
+Gbproxy global:
+Peers:
+  NSEI 8192, BVCI 16386, not blocked, RAC 10-32-16464-96
+  NSEI 8192, BVCI 12290, not blocked, RAC 10-32-16464-96
+  NSEI 4096, BVCI 8194, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 2
+    NS Transmission error           : 2
+  NSEI 4096, BVCI 4098, not blocked, RAC 10-32-16464-96
+    NSEI mismatch                   : 4
+    NS Transmission error           : 4
+===== GbProxy test END
 
-- 
1.7.9.5





More information about the OpenBSC mailing list