Commit Graph

12 Commits

Author SHA1 Message Date
Harald Welte 599faa1d18 Add LAPDm test case about SABM contention 2017-07-17 21:49:24 +02:00
Harald Welte dca7e45ce8 don't match on L1CTL SAPI in received frames
L1 has no idea about the SAPI encoded in LAPDm when it passes a
PH-DATA.ind up to us.  So dont match on that L1CTL field, only match the
SAPI we decoded from LAPDm header.
2017-07-17 21:43:58 +02:00
Harald Welte d4ba7ff93e Add new LAPDm RAW port
This is a Test Component which sits on top of L1CTL (which in turn is on
top of the Unix Domain Socket Test Porrt).  It performs LAPDm message
encoding/decoding, so we can use the regular send() / receive() methods
and associated template matching to send/receive/match LAPDm in a
comfortable way.
2017-07-17 21:01:12 +02:00
Harald Welte 1bd7c32db8 export more encoder/decoder functions for LAPDm RAW coder debuggin 2017-07-17 20:59:46 +02:00
Harald Welte c2a5c07267 LAPDm_Types: re-order fields of LapdmCtrl definitions
for some reason, the "TAG()" matic of TITAN RAW decoder seems to fail
when we use FIELDORDER(msb) and match on a field that's not the first
field of the sub-record :/

Re-ordering the fields into LSB order seems to resolve this.
2017-07-17 20:58:32 +02:00
Harald Welte 143edbd5e9 L1CTL_Types: Fix copy+paste error in t_L1CTL_DM_REL_REQ
t_L1CTL_DM_REL_REQ shouldn't generate an DM_EST_REQ !
2017-07-17 20:56:56 +02:00
Harald Welte 9e4725dcd3 l1ctl/lapdm test infrastructure: Move helper functions out
moving all templates into L1CTL_Types as well as helper functions into
L1CTL_PortType allows us to have a clean L1CTL_Test.ttcn where we can
focus on actual test cases.  At the moment it's just a PoC that can
establish dedicated mode and send a SABM frame to the BTS, which is
properly echo'ed back in the UA, as expected for contention resolution.
2017-07-16 23:18:09 +02:00
Harald Welte 66110f0d77 L1CTL Test: Get all the way up to dedicated channel establishment
The code is now a proof of concept to establish a dedicated channel
via virt_um, at which point we can exchange L2 messages with the BTS.
2017-07-16 21:05:18 +02:00
Harald Welte 5f0d5c8753 L1CTL: Fix GSM Frame Number (uint32_t, not least bits required for integer) 2017-07-16 18:56:01 +02:00
Harald Welte 8e4db2c4a4 L1CTL: Use RSL Channel Number definition for proper decode 2017-07-16 18:54:55 +02:00
Harald Welte 52c713c452 Implement L1CTL port type (dual-faced port on top of UnixDomain) 2017-07-16 15:44:44 +02:00
Harald Welte f654332701 first steps towards a L1CTL / LAPD test
The idea here is to implement the L1CTL protocol in TTCN-3 so we can
speak it over a unix domain socket (test port) for simple tasks such as
activating dedicated mode.

This can then subsequently be used for LAPDm testing
2017-07-16 14:25:31 +02:00