Commit Graph

570 Commits

Author SHA1 Message Date
Harald Welte c2461d66a5 msc: Move f_sleep() to common Osmocom_Types.ttcn
Change-Id: Ic748e1dfe002cb6ee4d785e9b7f8dca34873e504
2018-01-26 22:53:57 +01:00
Harald Welte 1623e6e385 msc: Make use of MGCP_Emulation in f_tc_lu_and_mo_call
Change-Id: Id33f17007b99776129e99625f8f6258a1653d863
2018-01-26 10:42:53 +01:00
Harald Welte 4aa970c218 msc: Start to integrate MGCP_Emulation component
Change-Id: I5330a06b7868b3f3a362cb5b640cd0cb985f2143
2018-01-26 10:42:53 +01:00
Harald Welte bb5a1212c8 MGCP_Emulation: More complete implementation
* re-introduce connection table
* introduce unitdata_cb for connectionless MGCP messages (like AUEP)
* rename MGCP_Emulation_CT members to avoid clashes with other similar
  component names when using "multiple inheritance"
* Use HostName/PortNumber types on MGCP_conn_parameters
* allow "bind to local UDP port only, permit any UDP source port" behavior
* implement expect matching criteria + expect matching only on CRCX
* add helper function f_create_mgcp_expect() like in other Emulations

Change-Id: I953a91e663648715fa4fe98acacca393c8747001
2018-01-26 10:42:53 +01:00
Harald Welte a02515f82f MGCP_Emulation: Add comment + license disclaimer
Change-Id: Ibf1a1ed80a99c8d8754cce3b47b11b5186b9c52d
2018-01-26 10:42:53 +01:00
Harald Welte b6c6ec15f2 BSSMAP_Templates: Permit tr_BSSMAP_AssignmentReq without CIC
Change-Id: Id0379fcb676698d92effce755dbc07c26a6a1101
2018-01-26 10:42:53 +01:00
Harald Welte 4b2b3a673a L3_Templates: ts_Bcap_voice(): Include speech version octets
Change-Id: Iff48bff6df6fa7dae3bc8467be4d75b0305f68ad
2018-01-26 10:42:53 +01:00
Daniel Willmann 166bbb3310 bsc: CRCX is answered with (malformed) ACK
Change-Id: I09c1ed467e95be236e0758d6a9c8bbef405c02eb
2018-01-26 10:42:53 +01:00
Harald Welte c27eaaeb8b MGCP library part of "bsc: Reply to CRCX with ACK"
Change-Id: I68b66d26dfbbba11e1b3a8c04435f08d095f68ed
2018-01-26 10:42:53 +01:00
Daniel Willmann 955627afed MGCP_Emulation part of "bsc: Register expect criteria for MGCP CRCX"
Change-Id: I466df816eef9863bf1664e785b996c0697dc04e3
2018-01-26 10:42:53 +01:00
Daniel Willmann 34e7dd0cca MGCP_CodecPort: Receive MGCP command or response
If we act as MGW we need to accept MGCP commands sent to us as well

Change-Id: I895cfb688a2923b278828f5ae918c73fda18636d
2018-01-26 10:42:53 +01:00
Daniel Willmann fa870f5e25 Add MGCP_Emulation
Change-Id: I5245be2b44e98e1c74b9519c610564667b980a67
2018-01-26 10:42:53 +01:00
Harald Welte 1af6ea82b7 msc: New TC_cl3_rnd_payload / TC_cl3_no_payload for COMPLETE L3
Test BSSMAP COMPLETE L3 INFO either with no payload whatsoever or with
random payload.

Change-Id: I37ca3e5048cc1c2678d763a44b7e228da29851cc
2018-01-26 10:42:53 +01:00
Harald Welte b14c77ab85 msc: move default (auth=off, tmsi=on, encry=off) vty commands to f_init()
Change-Id: I38644ca3c4f629edb762cd24959033d426438e02
2018-01-26 10:42:53 +01:00
Harald Welte 9182704cbc ggsn: Move random number helpers to Osmocom_Types.ttcn
Change-Id: I141289cbf1807e81d72f07ac1183fa48b2dc54af
2018-01-26 10:42:53 +01:00
Harald Welte 161142834f msc: TC_lu_imsi_auth_tmsi_encr_13_13
Add a first test for encryption (cipher mode command/complete)

Change-Id: I8a8a5c55d87bb251896664679920b96f678673a0
2018-01-24 23:05:35 +01:00
Harald Welte c638f4dbe9 msc: TC_lu_auth_2G_fail: Test auth failure in 2G auth
Change-Id: I54ef4137c0b95658b1e844ac1bb13729f27fd0d1
2018-01-24 23:05:35 +01:00
Harald Welte 0195ab1ab1 msc: Add TC_cm_reest_req_reject: Expect CM RE-EST REQ to be rejected
Change-Id: I7d15b935caed2dacf39d66a33ff933a9b8c443d9
2018-01-24 23:05:35 +01:00
Harald Welte f6b62eef0b msc: Wait for proper BSSAP connection clear after CM SERV REJ
Change-Id: Ia8fc0e61c7f8f31ca4dd21a243e00ef688ff38c6
2018-01-24 23:05:35 +01:00
Harald Welte 6ed6bf9773 MSC_Tests: Use enum instead of magic numbers for CM_SERVICE_TYPE
Change-Id: Ic90b4a0aa47821877a2d3566606b9c9dd5919968
2018-01-24 23:05:32 +01:00
Harald Welte ae1362544f f_enc_IMSI_L3: Fix filler digit in *even* case
We actually need to add the filler digit 'F' if the number of digits
is even.  It is absent when the number of digits is odd.

Change-Id: Ic1353f4ea09bba3151636b94a99c8559e0289ffd
2018-01-24 22:42:25 +01:00
Harald Welte 2f562b1a70 GSUP: Fix handling of odd-length IMSI and 0xF filler digit
Change-Id: I4e0a9f1236504ce6026c6e34fd97fda6fefa832c
2018-01-24 22:42:25 +01:00
Harald Welte 81b7f9d802 msc: Fix generation of IMSI/IMEI/MSISDN
Now each test case uses unique IMSI/IMEI/MSISDN numbers, which helps
to identify test cases from traces or from VTY introspection

Change-Id: I54d05e8ec7aeecc48666d3b369351212a6a0ea6f
2018-01-24 22:42:25 +01:00
Harald Welte 3ca1c90ac4 MSC: Use VTY to enable/disable authentication + TMSI allocation
Change-Id: Ifaa0f119d37b18b804c563c045755cc23d509617
2018-01-24 18:53:32 +01:00
Harald Welte 553f655035 Osmocom_VTY_Functions: Make prompt configurable
We want to use this code also for OsmoMSC testing, so let's make the
prefix configurable as module parameter.

Change-Id: Iec846227e88b3dc0d3be9474b8b926719161c9ee
2018-01-24 18:53:32 +01:00
Harald Welte d5b91409bc msc: Cosmetic (fix comment)
Change-Id: I20c65454f606a5c3bc3c5a127ae02b6c204ca06e
2018-01-24 18:53:32 +01:00
Harald Welte 256571e6c5 MSC_Tests: Proper treatment of IMEI + TMSI
* don't use IMSI as IMEI
* store the TMSI (after it is allocated) in the g_pars variable for later use

Change-Id: I717f1c9ab21e5be8b88f10ce4e8c583b385f3664
2018-01-24 18:53:32 +01:00
Harald Welte e1a2f3cb86 msc: Add all test cases to control section
Change-Id: I79abcbe5638a02c1d6d94ba31ce72bfbc372fd21
2018-01-24 17:29:15 +01:00
Harald Welte 66af9e6354 msc: Add TC_lu_disconnect: Start LU, then do a hard SCCP disconnect
Change-Id: I04d0b09350c6a1c9b8fb9aac87158a142d80f18f
2018-01-24 17:29:15 +01:00
Harald Welte 45164da2bc MSC_Tests: More CM SERVICE REQ and EMERGENCY CALL related tests
Change-Id: I04ca21824f66ad90d9dac2c25000ecd724aa4528
2018-01-24 17:29:15 +01:00
Harald Welte ba7b6d940e msc: Add test case for LU with MI=IMEI (which is illegal)
Change-Id: Ie3c91a0ff212a70a8e03e0579f240a10bc4356f4
2018-01-24 17:29:15 +01:00
Harald Welte bc881789bd msc: Test closing BSSAP connection of LU by ClearCommand
Change-Id: I9194da2f9324ee17c920458cb920a6fa718ac739
2018-01-24 17:29:15 +01:00
Harald Welte 071ed736c8 msc: Add tests for HLR SAI timeout and HLR SAI error
Change-Id: I7f8c8ff9ccadd7b7b14cba12a34cebe6855a5367
2018-01-24 17:29:15 +01:00
Harald Welte cf66d5a655 msc_tests: Randomly generate Auth Vector (rather than hard-coded value)
Change-Id: I2dc0570a8ae5003d26368b09d223db8e44a5c4ff
2018-01-24 17:29:15 +01:00
Harald Welte 7b1b281789 MSC: Add test for LU with 2G authentication
Change-Id: I5ea201bd603e581f199cd29056e7e7ebc9bd0923
2018-01-24 17:29:15 +01:00
Harald Welte 77a8ebaceb GSUP/L3: Add templates related to authentication
Change-Id: Id9566e3e075a8837e2e77a7c2b9d8f0f6e9b7554
2018-01-24 17:29:15 +01:00
Harald Welte 2bb825fc71 WIP: MSC: Add MO call testing
Change-Id: If32cb359b3cf732c4752856538552595dbbf2a8a
2018-01-24 17:29:15 +01:00
Harald Welte 701b574fed Use Osmocom-patched UNIX_DOMAIN_SOCKETasp for SEQPACKET support
Upstream TITAN doesn't have this yet (it's submitted, though),
so we have to use our own repo for titan.TestPorts.UNIX_DOMAIN_SOCKETasp
and at the same time make sure that our MNCC port is using
SEQPACKET in MSC_Tests.cfg

Change-Id: Ifa3661d8f818564d595c4612e5612a245a31a8f4
2018-01-22 11:31:38 +01:00
Harald Welte 8a121b3cec msc: make sending of early classmark optional
Change-Id: If25ba412ab393029ed7ae9af47e87d5f4a44acfc
2018-01-22 03:01:27 +01:00
Harald Welte ef9fa87ac9 msc: Prepare authentication support
Change-Id: I930bed1907fd0faf61788cf14e75f2b2337572f4
2018-01-22 03:01:27 +01:00
Harald Welte d748a0519a msc: More MNCC and L3 templates towards voice testing
Change-Id: I3132a856175fc9421e1a0bfd37620d6b1625574b
2018-01-22 03:01:27 +01:00
Harald Welte 515f5d11e7 MNCC: Properly terminate speech version array
MNCC has this weird encoding that the speech version array must
be terminated with one element '-1' at the end.  Let's make sure
our default complies to this rule.

Change-Id: I2e06ed1b558c58a62a00ea8d3573bb31c0c3e750
Related: OS#2853
2018-01-22 03:01:27 +01:00
Harald Welte ec3d065b59 MNCC_Types: Define '0' in various enums for unused value
it seems the decoder is using '0' in positions where we have
not defined any enum value for '0'.  Work around that.

Change-Id: I6bf0540f7ddd4dbe3b6c6ac06421a933126a7e17
2018-01-22 03:01:27 +01:00
Harald Welte 8260057d90 msc: Store CM2/CM3 in g_pars, so it can be modified
Change-Id: I726d851f45379b3efdb5ab62ea8f196cc0e41cc5
2018-01-22 03:01:27 +01:00
Harald Welte 5c2622cafb MSC_Tests: Implement early classmark sending in LU
Change-Id: I019d51703c60203c7cb83a77dc7ca4b3d6623e24
2018-01-22 03:01:27 +01:00
Harald Welte 71b693365d BSSMAP_Emulation: Introduce new MSC_CONN_PRIM_CONF_IND
If the ConnHdlr initiates an outbound connection, it needs to know
once that connection is established if it wants to send further
data. Transform the N-CONNECT.confirm into a MSC_CONN_PRIM_CONF_IND
and send it to the ConnHdlr.

Make use of it from the MSC_Tests when issuing a Complete L3 Info.

Change-Id: I7293a9f4993d13c90316224eb9f13e10130388ef
2018-01-22 03:01:27 +01:00
Harald Welte e5bd1ae81a msc: Add missing MSC_Tests.cfg file
Change-Id: I7671a95ab83854dab70fa7af5afd3d6420c1880f
2018-01-22 03:01:27 +01:00
Harald Welte a49e36e911 MSC_Tests: Integrate MNCC, GSUP, BSSAP connection handler, ...
Change-Id: I7bb6660c6b6cef81533f0fbb5e735f08ed275b8c
2018-01-21 19:37:59 +01:00
Harald Welte 6ff81909fd More GSUP and L3 Templates
Change-Id: I0e9136fc3b8f171934f054ec149d8dd344faa034
2018-01-21 19:31:09 +01:00
Harald Welte 0b476066b9 BSSMAP_Emulation: Decode DTAP
It's quite cumbersome if the user of the BSSMAP_Emulation (the ConnHdlr)
will have to manually decode the DTAP in every BSSAP/DTAP message he
receives (and encode on the transmit side).  Let's introduce a new
optional mode in which the DTAP messages are already decoded for
more convenient matching inside the ConnHdlr.

Change-Id: I35cd4ea78aca0ce7c7d745e082d7289882c11e81
2018-01-21 19:31:09 +01:00