Commit Graph

48 Commits

Author SHA1 Message Date
Philipp Maier 8d33a13b21 BSSMAP_Templates: do not match on omit in tr_BSSMAP_HandoverPerformed template
tr_BSSMAP_HandoverPerformed matches all optional fields on "omit". This
does not make much sense as a safe default. Lets match on "*" instead.
(See also other tr_ templates)

Related OS#3645
Change-Id: Icd55afdaebdda8ba98431f358148035f7d220b8a
2018-11-19 12:20:07 +01:00
Philipp Maier a0cacc7d5b BSSMAP_Templates: Add missing field in tr_BSSMAP_HandoverPerformed template
tr_BSSMAP_HandoverPerformed lacks the field speechVersion, lets add it
to make the template complete.

Change-Id: Id73c0aef5caa0936aa44308faf2aae1c20c7446c
Related OS#3645
2018-11-18 20:33:57 +00:00
Philipp Maier aee6039600 BSSMAP_Templates: Add missing tr_BSSMAP_HandoverPerformed template
The receive template for the BSSMAP HANDOVER PERFORMED MESSAGE is
missing, lets add one.

Related OS#3645

Change-Id: I527913203b2d5bfa26c181c4bb79481a9cd283ae
2018-11-07 11:37:27 +00:00
Neels Hofmeyr 61ebb8b7da bsc: add 3 tests for inter-BSC HO outgoing failures
Add
* TC_ho_out_fail_no_msc_response()
* TC_ho_out_fail_rr_ho_failure()
* TC_ho_out_fail_no_ho_detect()

Depends: I0980cacb9713e41a1eef3a0a7f6cc892e8a20da5 (osmo-bsc)
Change-Id: If772dbbc5f9790d3f911465e1303dd0a99811154
2018-10-11 17:21:47 +02:00
Neels Hofmeyr bd0ef93d4f bsc: inter-BSC HO: add TC_ho_out_of_this_bsc, TC_ho_into_this_bsc
Add f_gen_handover_req() like f_gen_ass_req(), to match AoIP or SCCPlite
requirements.

For incoming HO, MSC_ConnHdlr needs to know the SCCP addresses to expect the
incoming SCCP Connection from MSC to BSC. Add 'handover' section to
TestHdlrParams, and pass in the addresses from test_CT via that.

In osmo-bsc.cfg, add a remote neighbor config, so that the VTY command
'handover any to arfcn 123 bsic any' can trigger an outgoing inter-BSC HO.

Add various BSSMAP handover templates to BSSMAP_Templates.ttcn.
Add RR Ho Command template to L3_Templates.ttcn.

Move ts_BSSAP_Conn_Req() from msc/BSC_ConnectionHandler.ttcn to
library/BSSMAP_Emulation.ttcn, so we can also model an SCCP Connection Request
in BSC_Tests.ttcn (this time from MSC to BSC).

Add the two new tests to bsc/expected-results.xml.

Related: OS#2283
Change-Id: Id22852d4be7f127d827e7a8beeec55db27c07f03
2018-09-26 07:27:24 +00:00
Daniel Willmann 52918e5fcf MSC_Tests: Reply to Classmark Req in TC_lu_imsi_auth_tmsi_encr_3_1_no_cm
After osmo-msc I73c7cb6a86624695bd9c0f59abb72e2fdc655131, osmo-msc
sends a BSSMAP Classmark Request if encounters a missing Classmark,
which is the case during LU when A5/3 is enabled.

Fix this test by answering the Classmark Request, if any.

Change-Id: I25578c050b7e105ed71b064891d4cd418ee30fcf
2018-09-25 12:45:46 +00:00
Neels Hofmeyr 92b12b748c bsc: test Classmark Enquiry
Enhance TC_classmark to also include the BSSMAP Classmark Request -> RR
Classmark Enquiry part. So far it was only testing the return path of RR
Classmark Change -> BSSMAP Classmark Update.

This test will thus fail with current osmo-bsc master, and will succeed as soon
as osmo-bsc If5db638fd6e8d9c2ef9e139e99f0fabe1ef16ddf is merged.

Add:

* ts_BSSMAP_ClassmarkRequest in BSSMAP_Templates.ttcn
* tr_RRM_CM_ENQUIRY in L3_Templates.ttcn

Change-Id: Idaab4d568cf986b4897ba008f6262c839d1592fb
2018-09-18 14:33:42 +02:00
Harald Welte cc0b014903 bsc: Add LCLS related test cases
This is an early WIP, we actually will need to establish two calls/legs
before the BSC is able to locally correlate them.

Related: OS#1602
Change-Id: Ie6d0b9c38027abf65c7c564fc79b889d013fa6a7
2018-06-03 10:33:41 +00:00
Harald Welte 354722e252 BSSMAP_Templates: Fix LCLS related template definitions
They should all have been derived from the tr_BSSAP_BSSMAP /
ts_BSSAP_BSSMAP base templates.

Change-Id: Ib9ef03fe1c5f2eedde9e274a50dfedb2fb6b6a0f
2018-06-01 18:25:57 +02:00
Harald Welte 0b50aeda34 BSSMAP_Templates: Add templates for LCLS related IEs + messages
We will soon implement some LCLS related test cases, and hence
we need some templates for sending and matching received messages.

Change-Id: I5300418ae493f6c315248562938b47ae1931b452
2018-06-01 12:00:56 +02:00
Philipp Maier 34bd80eae7 BSSMAP_Templates: Add templates for HANDOVER REQUIRED
In order to form a minimal HANDOVER REQUIRED message additional
Templates (ts_) are needed.

- Add Template ts_BSSMAP_IE_SpeechVersion
- Add Template ts_BSSMAP_IE_CurrentChannelType1
- Add Template ts_BSSMAP_IE_OldToNewBSSInfo

Change-Id: I41c2a036465d422db9348d4d2d66bb332e16e155
Related: OS#1609
2018-03-28 12:34:54 +02:00
Harald Welte dbd6b3f8ca Add BSSMAP SPDI definitions (speech/data indicator octets)
Change-Id: I3b81ea995667a4c9ffaf0f6891766d5b5af20636
2018-03-21 22:48:18 +01:00
Harald Welte 24135bd27f bsc: Fix encoding of 2-digit MNC (paging tests)
The TTCN-3 data types are abstract data types,  Encoding artefacts
like 'F' for padding shouldn't be seen by the user.  Hence, let's
pass a 2-digit-long or 3-digit-long hexstring into the encoder
functions and let them determine if they should introduce any 'F'
for padding or not.

Change-Id: If4d3dfc16381493d7e710be746ed963975051fc1
2018-03-17 20:30:39 +01:00
Stefan Sperling 83348bcfbf fix cell identifier generation in ttcn3 paging tests
The cell identifier used by the paging tests is 001-01, i.e. uses a
2-digit MNC. With the introduction of 3-digit MNC support in osmo-bsc,
the paging tests became incompatible with a osmo-bsc config with:

  network country code 1
  mobile network code 1

Explicitly declare a Cell_Identity with 2-digit MNC (includes an 'f').

Also, fix f_enc_mcc_mnc to properly encode 2-digit MNC values.

Related: OS#2847
Change-Id: Ide5228b403e43de8649b6eda18749ea2a9f592a9
2018-03-14 17:59:41 +01:00
Harald Welte 23b774ea48 Move f_hex_is_odd_length from BSSMAP_Templates to GSM_Types
It's a quite frequent requirement in encoding IMSI/BCD numbers, so
let's move it to the more generic GSM_Types module.

Change-Id: I6fb8d9a6f37c990f6901fb48b15312a157954fda
2018-02-16 17:50:35 +00:00
Harald Welte 49518bf842 BSSMAP: Fix L3 sequence number for ComplL3(Paging Response)
The existing code generating L3 sequence numbers in MO direction
made the assumption that the L3 message inside ComplL3 would always
be MM/CM, and increment the sequence number.

However, in case of a paging response, it is actually RR, which
does *not* have L3 sequence counters.  So we must make the sequence
counter increment dependant on the L3 protocol discriminator.

Change-Id: I25a5dd0c180c9acfa870984c6b122ac0c46383b3
2018-02-11 11:49:47 +01:00
Harald Welte 898113b838 bsc: Add TC_classmark to test RR CLASSMARK -> BSSMAP CLASSMARK conversion
Related: OS#2902
Change-Id: Idd86b5505e1a4fee666287680a20dc235970be93
2018-01-31 18:50:41 +01:00
Harald Welte 751d3eb19f BSC_Tests: Implement remaining missing paging tests
We now test all of the cell identification types specified in BSSMAP,
and also lists with a length != 1 entry.

Change-Id: I261f948d6054d0c90078c1dd0b2785a967b0a49b
2018-01-31 16:08:26 +01:00
Harald Welte 17d2115ab8 BSSMAP: Add IMSI/TMSI mapping table to dispatch incoming paging
If we're emulating BSC/BTS/MS, then we must be able to dispatch
incoming paging requests based on their IMSI or TMSI to the right
ConnHdlr component.  This introduces a new table to facilitate that
dispatch.

Change-Id: I85c1ea3bcf8fb4a100f20cffdc991826b58e290b
2018-01-27 12:45:39 +01:00
Harald Welte be48a7c081 BSSMAP_Templates: tr_BSSMAP_AssignmentReq support for cic + aoip
Change-Id: I666e70d265d9d5dea7516640809b6081ddeecb88
2018-01-26 22:53:57 +01:00
Harald Welte b6e1d7ec31 BSSMAP_Templates: Make ts_BSSMAP_IE_AoIP_TLA also usable for receive
Change-Id: I8ef753e448453fcab845fbd2936e37a0c22075a0
2018-01-26 22:53:57 +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 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 bc881789bd msc: Test closing BSSAP connection of LU by ClearCommand
Change-Id: I9194da2f9324ee17c920458cb920a6fa718ac739
2018-01-24 17:29:15 +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 ae8ce238cd BSSMAP_Templates: Fix + enable ts_CellId_CGI
Change-Id: Icafe6415b3f896176edcac604a0945e83126db09
2018-01-21 19:31:09 +01:00
Harald Welte 0a6835c6f2 BSSMAP_Templates: Make ts_BSSAP_DTAP usable
A send template with '?' is broken.  Also, allow caller to specify DTAP
payload as well as optionally a DLCI.

Change-Id: I641ee8ce5e5ae70b514342cf68cdc79b1926c4d0
2018-01-21 19:31:09 +01:00
Harald Welte 049ca642aa BSSMAP_Templates: tr_BSSAP_BSSMAP / tr_BSSAP_DTAP: DLCI may be present
Change-Id: I98b313e354b31fae8c1fea9e61a838970d575d69
2018-01-21 19:31:09 +01:00
Stefan Sperling 6d9309b8a4 Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC triple octet.
With help from Daniel Willmann.

Change-Id: I99a5317e425d15acd463aa94c683676cacd54e0b
Related: OS#2754
2018-01-11 14:43:16 +00:00
Harald Welte 35bb716610 Add comments with short module description on top of each file
Change-Id: Id934d7a763b619d52cbec7de439b3708225b81f3
2018-01-03 21:09:29 +01:00
Harald Welte 73cd271a56 BSC_Tests: Implement ecnryption related procedures
Let's verify the operation of the CIPHERING MODE COMMAND as issued
by MSC, performed by BSC and implemented by simulated BTS/MS.

Change-Id: Ibc06bd2177c63837a794a0ca1f54ebef17499e78
2017-12-17 13:24:39 +01:00
Harald Welte f1b64e208f BSC_Tests: Ensure MSC passes SpeechCodecList in AoIP ASSIGNMENT
Change-Id: I66deffc50b5adcc8707747c0baa2e65ee36bf18e
2017-12-15 14:56:48 +01:00
Harald Welte 235ebf1b9c BSC_Tests: Add whole bunch of new assignment tests
Change-Id: Ia7304f2e2265c2ebd92575a9403b082579397656
2017-12-15 14:19:10 +01:00
Harald Welte 4bf5fc97fb BSSMAP_Templates: Define various ASSIGNMENT related templates/constants
Change-Id: Id4f98120dbedf1a4fd5fb34df0d638eb08d7c3cb
2017-12-15 14:19:10 +01:00
Harald Welte b69533d153 BSSMAP_Templates: Define enum with 08.08 cause values
Change-Id: I2fc122a510403d0da8da04ca323687065347c96a
2017-12-15 14:19:10 +01:00
Harald Welte cc7e4dc40e BSSMAP_Templates: Enable use for AoIP, not just E1-CIC
Change-Id: I421ade4ae1c0c19c9c2b1172cdcf8d6c4cd55205
2017-12-15 14:19:10 +01:00
Harald Welte 16a4adfa5f BSC_Tests: Add TC_assignment_cic_only (AoIP Assign. must fail with only CIC)
Change-Id: Iee7202841ad8466a65b5d54679262be100863e39
2017-12-15 14:19:10 +01:00
Harald Welte 5d1a2209f2 bsc: Run three virtual BTSs (2 in one lac, 1 in another)
This allows us to verify if the BSC pages *only* where it is supposed
to page based on the cell identity list in the 08.08 PAGING.

Change-Id: I53ffe44279a7b83e045b3fdb25da64529955d457
2017-12-13 19:51:29 +01:00
Harald Welte 72cecfa26c BSSMAP_Templates: Add templates for various PAGING options 2017-12-11 19:51:00 +01:00
Harald Welte cfa79adb83 BSSMAP_Templates: Add tr_BSSMAP_ClearRequest 2017-12-09 22:33:47 +01:00
Harald Welte f8a0bdaad5 BSSMAP_Templates: Add parameters to tr_BSSMAP_ComplL3 for better matching 2017-12-09 00:53:17 +01:00
Harald Welte 28d943ef35 ts_BSSMAP_HandoReq: Hand in raw list as argument, not IE type
Also, add new ts_BSSMAP_Paging() template.
2017-11-25 15:01:16 +01:00
Harald Welte c859df518f BSC_MS_ConnectionHandler: implement MGCP request->response handling 2017-11-24 23:41:41 +01:00
Harald Welte 7ed2b08006 BSSMAP_Templates: fix unbound rR_Cause member in Assignment Complete 2017-11-23 18:52:13 +01:00
Harald Welte ab05d6cf97 BSSMAP_Templates: Correct name is AssignmentReq, not AssignmentCmd 2017-11-23 18:50:52 +01:00
Harald Welte b3414b2172 ipa: First version that emulates both MSC and BSC up to ASSIGNMENT REQ 2017-11-23 18:23:38 +01:00
Harald Welte 365f4edbd8 IPA/MSC/BSC Emulation: Framework for handling multiple SCCP connections 2017-11-23 00:00:43 +01:00
Harald Welte c76f29f094 ipa: Pull everything together: L3->BSSAP->SCCP->IPA 2017-11-22 12:46:46 +01:00