path: root/library
AgeCommit message (Collapse)AuthorFilesLines
2020-10-19library/L1CTL_Types: turn L1ctlTchMode into an enumerated typeVadim Yanitskiy1-2/+8
Change-Id: Ib547b5984078bc6c6a66addb4622a471487c7342 Related: OS#4799
2020-10-19library/L1CTL_PortType: fix indention in alt() statementsVadim Yanitskiy1-53/+53
Change-Id: Ic13c2acbe1379558884fa7d11ba0b52ef31544f3
2020-10-18library/GSM_RR_Types: declare {enc,dec}_SacchL1Header()Vadim Yanitskiy1-0/+5
Change-Id: If2acd617d8bb543851e827ec74bb93d8da5b4966 Related: SYS#4916
2020-10-16bsc: clarify RESET logging: BSSMAP vs RANAP vs BSSMAP-LENeels Hofmeyr2-10/+10
When a RESET-ACK times out, the logs currently are indistinguishable between BSSMAP and BSSMAP-LE. Add protocol naming for each RESET / RESET-ACK logging to make sure the information does not need guesswork. Example of a test failure shown in jenkins: BSC_Tests.TC_unsol_ass_compl Stacktrace Timeout waiting for RESET-ACK after sending RESET BSC_Tests.ttcn:8295 BSC_Tests control part BSC_Tests.ttcn:4274 TC_unsol_ass_compl testcase Nothing conveys that it is (presumably) the background *BSSMAP-LE* timeout halting the test 5 seconds in, and not an A-interface failure. Change-Id: I874567e68b8279bf2460b9474241f0a9fe5ff0ff
2020-10-15Correctly handle ALIVE/TEST procedure with FR/NS-over-IP without SNSDaniel Willmann1-20/+37
If IP-SNS is not used we should wait for the RESET procedure to finish before sending NS-ALIVE. For IP-SNS start NS-ALIVE in both roles (sgsn and bss) and don't handle NS-RESET. Also unified the log messages a bit (received -> Rx). Related: SYS#5002 Change-Id: Ie01fee70297255b3d9c091bc2cec75b0f915c588
2020-10-15Revert "BSSAP_LE_Emulation: configure sending vs receiving RESET"Neels Hofmeyr1-6/+2
This should not have been merged. It is an intermediate attempt to make the BSC send the BSSMAP-LE RESET, which doesn't work because the BSC is not restarted across test runs. I dropped the patch from my branch, while it remained on gerrit accidentally; then someone else merged it without noticing that it was no longer part of my lcs branch. This reverts commit b2b3704d2a0289332798ba4aeff5b8e29d297ee5. Change-Id: If191cf0ee5c239066fa41621e812efbdcca2a2b8
2020-10-13BSSAP_LE_Emulation: on register_imsi, make sure to wait for RESET ACKNeels Hofmeyr1-0/+26
Change-Id: Id0d087a90394369ef60846baa4d02289e9d0be1e
2020-10-13BSSMAP templates for LCSNeels Hofmeyr1-0/+105
Both BSSMAP-LE and BSSMAP use the LCS Cause IE with identical definition. In order to not add further dependencies from BSSMAP_Templates.ttcn to BSSAP_LE_Types.ttcn to BSSLAP_Types.ttcn, duplicate the LCS Cause enum. Change-Id: Ifee698c128a5345f6bf0301ad4dac9e083285d56
2020-10-13BSSMAP_LE template tweaksNeels Hofmeyr1-13/+34
Change-Id: I9728690e412266001b2a02b0e14d382152d5ab4e
2020-10-13BSSLAP: add some templatesNeels Hofmeyr1-0/+76
Change-Id: I6774bb6aefed67ebbfd5da8e52bb463cd6279ed4
2020-10-13BSSMAP_LE_IE_LcsCause: fix IEI value and lenNeels Hofmeyr2-4/+4
Change-Id: I8ea9d91745dc7bcbfdb69779487a1e9fc6cc7fcd
2020-10-12BSSAP_LE_Emulation: configure sending vs receiving RESETNeels Hofmeyr1-2/+6
Expecting OsmoBSC to send a RESET to the SMLC implies that the virtual SMLC stays quiet until a RESET is received. Add flag to configure RESET behavior of BSSMAP-LE. Change-Id: I49a749b037b614f922044165a4357fe20b68860b
2020-10-12fix ts_BSSMAP_LE_ResetAckNeels Hofmeyr1-1/+1
Change-Id: Ia3b3e02f0ea71546e36a7612d77e3e55f2d3810d
2020-10-11Osmoocm_Gb_Types.ttcn: Add various additional templatesHarald Welte1-0/+127
Those can help to match if messages meet certain constraints stipulated in the BSSGP specification. Change-Id: I05c768f5a9e4f0b5c1375c2603135a349c38e849
2020-10-09PCU_Tests_{NS,SNS}: Fix our expectations regarding CellID in BVC-RESETHarald Welte1-6/+8
The BVC-RESET / BVC-RESEt-ACK follow a set of rules: * Signaling BVCI=0 never has a CellId in BVC-RESET nor BVC-RESET-ACK * Any BVC-RESET or BVC-RESET ack in BSS->SGSN direction must have CellID * Any BVC-RESET or BVC-RESET ack in SGSN->BSS direction must NOT have CellID Let's adjust our test expectations accordingly. This will break tests against "latest", but the amount of work-arounds needed in this code outweighs the benefit. Change-Id: Ic8a83f5214c372faa15178dd9b54364e7d2a60cb
2020-10-09BSSGP_Emulation: Support multiple PTP-BVC within one EntityHarald Welte2-408/+860
The existing BSSGP_Emulation is built around the assumption that every instance of BSSGP_Emulation only servers one signaling-BVC and one PTP-BVC. While this is true for osmo-pcu at this point (BTS-colocated PCU), other BSS/PCU implementations differ. In general, there can always be any number of PTP BVC (one per cell) next to the signaling BVC (one per BSS). Let's represent this in BSSGP_Emulation so we can create more comprehensive tests. Change-Id: I7e30b4c4e188518a574e082962fba457b3a97ce3
2020-10-09PCU_Tests_NS: Fix our expectations regarding CellID presence/absenceHarald Welte1-3/+2
This is required by the spec, and implemented libosmocore since Change-Id Ie87820537d6d616da4fd4bbf73eab06e28fda5e1 So let's change our test expectations. Meanwhile, introduce mp_tolerate_bvc_reset_cellid for working around the bug in 'latest'. Change-Id: Icebee25b53fef623db6ae91ca0d943e70a3c86b7
2020-10-09BSSGP_Emulation: Ensure BVC-RESET for BVCO=0 has no CellId IEHarald Welte1-1/+13
This is required by the spec, and implemented libosmocore since Change-Id Ie87820537d6d616da4fd4bbf73eab06e28fda5e1 So let's change our test expectations. Meanwhile, introduce mp_tolerate_bvc_reset_cellid for working around the bug in 'latest'. Change-Id: If6245d73ed701e631b67146ace4ba028bdb4226c
2020-10-04BSSGP_Emulation: Only add CellId to BVC-RESET[-ACK] conditionallyHarald Welte1-5/+25
We always used to include the CellID IE, but 3GPP TS 48.018 is actually quite specific about when it should be present and when not. Change-Id: Iffd023f0272c9ccb087bdd225fcfb08424a46bdf
2020-10-03NS_Emulation: pass around string idenifier for components createdHarald Welte3-10/+11
We want to see useful identification for components in the log, and hence must be giving every component a name at create() time. Change-Id: I0fe650243953e4d85161684865acd0354b2e465f
2020-10-03NS_Emulation: Delay Tx of first NS-RESET until Provider tells us it's upHarald Welte1-5/+15
Change-Id: I300cfeb120540940990a834596b0a83a539df080
2020-10-03NS_Emulation: Refactor if/elseif/... clause to altsteps with guardHarald Welte1-71/+69
This makes for much more readable code, and we can even do without activating any default altsteps. Change-Id: I4c38dd55b7c27899735f5730851d36c1410d96a8
2020-10-03NS_Emulation: Introduce status events from provider -> emulationHarald Welte3-2/+40
This allows NS_Emulation to react to changes of the underlying transport layer (e.g. Frame Relay Link/DLCI up). Change-Id: If00e9c50dc664ce62b6c0cbde99d741e8173169b
2020-10-03NS_Emulation: Add [optional] support for FrameRelay transportHarald Welte2-6/+92
This adds a NS_Provider_FR which interfaces between FrameRelay_Emulation and NS_Emulation. Include support for it only if enabled at compile time to avoid pulling in a dependency on the FrameRelay stack for every user of NS_Emulation. Change-Id: I42ca811d23e383e362d2527c8ff2c916a62a5b42
2020-10-01BSSAP_LE: comment/log tweaksNeels Hofmeyr1-2/+3
Change-Id: I39ae5abc932c8cb5eb37b8c25a84621bd9ff30ca
2020-10-01fix typo BSSMAP_LE_LCS_CAUSE_UNSPEIFIEDNeels Hofmeyr1-1/+1
Change-Id: Iff154cba13febf1a2e623b6de64fb39ffb91b302
2020-10-01fix BSSAP_LE_Types FIELDORDERNeels Hofmeyr2-10/+10
Change-Id: I6f3d5b238912923431db36a1ba7b4973ae4e2e91
2020-09-27NS_Emulation: Prepare NSConfiguration for non-IP providersHarald Welte3-14/+22
NSConfiguration currently contains parameters relevant only for IP based transport. Move IP/UDP parameters into a sub-structure in anticipation of Frame Relay support. Change-Id: I6904520d8c2f546327029777d68b1907611a8cf5
2020-09-25NS_Emulation: Fix Tns-alive/Tns-test expiration detectionHarald Welte1-4/+4
Change-Id: Icb7d076f57c166b498c1b3edd84edcf13ea9739d
2020-09-25Move RAW_NS to library to use it in SGSN NS testsAlexander Couzens1-0/+228
Change-Id: I5a0e62cc9f032c515188530c0ceee29061fe11d2
2020-09-22mgw: Introduce test TC_crcx_osmo_ignPau Espin Pedrol2-2/+8
Related: SYS#5063 Change-Id: I79415c385e89fe859854430bb20940f078fccea0
2020-09-22{BTS,PCU}_Tests: bump default PCUIF version: 9 -> 10Vadim Yanitskiy1-1/+1
Both osmo-bts and osmo-pcu are switching to PCUIFv10 soon, so let's use the new version by default. For older (latest) IUT versions not supporting PCUIFv10, one would need to override this module parameter in {BTS,PCU}_Tests.cfg. Change-Id: I9350c4a54434c3d46ce9424f382ca0057e58d053 Related: SYS#4868, SYS#4915
2020-09-17NS_Provider_IPL4: map the IPL4 port to the system port before using itAlexander Couzens1-0/+1
Change-Id: Ia588ff82764e531c14665454eed035cd17b047ad
2020-09-17NS_Emulation: remove dependency on PCUIF_TypesAlexander Couzens3-2/+20
The dependency of PCUIF_Types creates also a dependency on Replace the PCU_AddrType by an unix like address family defined in the Osmocom_Types to reduce the dependency. Change-Id: I0b4fda96accef401ffc009010f9f5621583fd6dd
2020-09-17NS_Emulation: Introduce NS_Provider underneath NS_EmulationHarald Welte2-63/+134
This is a step to prepare the NS_Emulation for operating on top of Frame Relay, not just UDP/IP. We replace the NS_CodecPort (mapping to a IPL4asp) with a newly introduced NS_Provider_CT, specifically a NS_Provider_IPL4_CT. This change removes any IP specific bits from NS_Emulation and moves it into the newly-created NS_ProvideR_IPL4. Change-Id: I4d0b7ad0ed9447a038dd3eeee2b975146d10fba0
2020-09-17BSSGP_Emulation: Fix build without BSSGP_EM_L3Harald Welte1-1/+4
Change-Id: Ic58e2d6bc37cb8fd8f0235b8497f674db7cfdd85
2020-09-16PCUIF_Types: fix version 9 remote addressAlexander Couzens1-1/+1
Change-Id: I8a337399632e11d8a376e7a7fa3ff7a2396a80b1
2020-09-16mncc: Support IPv6 addresses (new version mncc 7)Pau Espin Pedrol4-24/+124
Apparently commit 06b859ca314f53a902329ed95848dbafef1d4f87 forgot to bump the MNCC_SOCK_VERSION field from 5 to 6. Change-Id: I5448ff931ec33f24f4837a51376f1703fe97683b
2020-09-16library: CBSP_Adapter: Improve robustness of rebind and reconnectPau Espin Pedrol1-0/+13
Change-Id: Ibafbc8496eeadd0ea1b97056ef3b8a92bc43e9f1
2020-09-15fixup library/PCUIF_Types: version 10: do not add redundant paddingVadim Yanitskiy2-1/+23
Unlike osmo-pcu, osmo-bts does check length of the messages received over the PCU interface, so I7a532d7abff8af354e40c5d706bb882efc6f905f caused all the related test cases in ttcn3-bts-test to fail. Reverting it is not a solution, because we cannot maintain different padding attributes for two different protocol versions. Let's add a wrapper function that would call enc_PCUIF_Message() and append padding depending on the configured protocol version. In addition, let's add a module parameter that would allow us to (optionally) disable padding for ttcn3-pcu-test. This change makes all broken PCUIF specific test cases pass. Change-Id: Ica9e0c49c8b16e7d585a481670762c6433c61118
2020-09-14BTS_Tests: group hopping parameters into a separate recordVadim Yanitskiy1-1/+1
Change-Id: Iedb5d858a2d4f5d5a45e7465ae6586b3ae4bbb72 Related: SYS#4868, OS#4708
2020-09-13BSSGP_Emulation: Make L3 (SM/GMM) decoding a compile-time optionHarald Welte1-9/+42
This allows us to build low-level tests that don't require all of L3. Change-Id: I7ef7e93e2cd1d37e7e4a62947ca8dfde30d93b95
2020-09-13lib: Move ts_RaCapRec from RLCMAC_CSN1_Templates to L3_TemplatesHarald Welte2-53/+52
There is no reason whatsoevery why a L3_Templates.ttcn file should ever include types from RLC/MAC. This creates a dependency nightmare. The type for which ts_RaCapRec is written (MSRACapabilityValuesRecord) originates from titan.ProtocolModules.MobileL3 so it's completely unclear how any of that ever related too RLC/MAC. Change-Id: Ie1ccef090ad51e26ccae17998e4294c6e27cf9c8
2020-09-13move some key types from GSM_RR_Types to GSM_TypesHarald Welte3-21/+21
This in turn means Osmocom_Gb_Types doesn't need to depend on GSM_RR_Types anymore, which is particularly ugly as the latter now depends on RLCMAC_*, creating a long chain of dependencies. Change-Id: I8c8da7709695ff0023f71b3999291e2515b22e46
2020-09-11library: Osmocom_Types: fix extra indention tabAlexander Couzens1-77/+77
The top level context doesn't have an indent. Change-Id: Ib94fa74a7752f21ba8203a5de17ce2b10d800d16
2020-09-11library: GSM_Types: fix extra indention tabAlexander Couzens1-210/+210
The top level context doesn't have an indent. Change-Id: Ifece2e9fa782f173665e10fa9174403cccac7eb6
2020-09-11library/PCUIF_Types: version 10: do not add redundant paddingVadim Yanitskiy1-1/+0
Change-Id: I7a532d7abff8af354e40c5d706bb882efc6f905f
2020-09-11library/PCUIF_Types: version 10: support IPv6 NSVC addrAlexander Couzens2-2/+55
Change-Id: I13b03c380edc2dc609c5e4053462a3cd6f78ce72 Tweaked-By: Vadim Yanitskiy <> Related: SYS#4915
2020-09-09library/RTP_Emulation: Close previous socket after rebindPau Espin Pedrol2-1/+16
If test calls RTPEM_bind twice, the previous socket is kept open (ConnId 1) while the new one is assigned to the the expected ConnId for RTP/RTCP packets received (ConnId), however, if remote was already sending packets, it may happen that the port still receives those with ConnId=1, which may make test fail with message: "Received unexpected type from RTP" Change-Id: I73f4af4e590dd3958e3f4d1dba0496c0750d642d
2020-09-08library/PCUIF_Types: version 10: add Mobile Allocation length fieldVadim Yanitskiy1-1/+7
My initial assumption was that we can skip redundant '0'B bits or even '00'O octets in the Mobile Allocation IE, and thus reduce the overall size of this element. Unfortunately, this is wrong. 3GPP TS 44.018, section clearly states that the Mobile Allocation IE contains a bit-string of size NF, where NF is the number of frequencies in the cell allocation. If NF % 8 != 0, then '0'B padding bits must be appended to make it octet-aligned. In other words, if the cell allocation contains let's say 13 frequencies, but a hopping timeslot makes use of only a small fraction of it (e.g. 4 first channels), we would still need to transmit at least 13 bits (+padding), including all redundant bits and octets. In RLC/MAC frames though it's not required to make the bit-string octet aligned, so we need to send exactly NF bits without padding. In order to achieve that: a) add MA length field to INFO.ind (record PCUIF_InfoTrxTs); b) ajust the existing test cases to use this field. It's safe to merge this change as the related patches have not been merged to osmo-pcu and osmo-bts yet. Change-Id: I2709673c90a0cd7d76de9db8b8ad82ac59ca84a0 Related: SYS#4868, OS#4547