diff options
author | Harald Welte <laforge@osmocom.org> | 2020-03-08 17:21:29 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2020-03-08 17:27:00 +0100 |
commit | 6773304de8a70caa95082d29f5d84b21082421e3 (patch) | |
tree | bf9f0896bd5e26067d29a61a88f8f4f23f909f1a /include | |
parent | 7dedebada5c5dc08e1c5aa4a90f5d1c41f948e91 (diff) |
gsmtap: Solve TCH / FACCH confusion once and for all
* What we used to call TCH/F and TCH/H in gsmtap are actually only
FACCH/F and FACCH/H, i.e. the signaling part of Bm/Lm channels
* Give them proper names with backwards compatibility #define
* Split VOICE into VOICE_F and VOICE_H. If we don't differentiate this,
a receiver is not able to determine the RSL channel ID of a frame
without looking at external state/context. That in turn has been a
design feature of GSMTAP Um format so far, and programs like
osmo-bts-virtual rely on it.
Change-Id: I952044a17334f35712e087dc41781805000aebc1
Related: OS#2557
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/core/gsmtap.h | 9 | ||||
-rw-r--r-- | include/osmocom/core/gsmtap_util.h | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/include/osmocom/core/gsmtap.h b/include/osmocom/core/gsmtap.h index 87c18e31..82e95254 100644 --- a/include/osmocom/core/gsmtap.h +++ b/include/osmocom/core/gsmtap.h @@ -82,8 +82,8 @@ #define GSMTAP_CHANNEL_SDCCH 0x06 #define GSMTAP_CHANNEL_SDCCH4 0x07 #define GSMTAP_CHANNEL_SDCCH8 0x08 -#define GSMTAP_CHANNEL_TCH_F 0x09 /* Actually, it's FACCH/F (signaling) */ -#define GSMTAP_CHANNEL_TCH_H 0x0a /* Actually, it's FACCH/H (signaling) */ +#define GSMTAP_CHANNEL_FACCH_F 0x09 /* Actually, it's FACCH/F (signaling) */ +#define GSMTAP_CHANNEL_FACCH_H 0x0a /* Actually, it's FACCH/H (signaling) */ #define GSMTAP_CHANNEL_PACCH 0x0b #define GSMTAP_CHANNEL_CBCH52 0x0c #define GSMTAP_CHANNEL_PDTCH 0x0d @@ -91,7 +91,10 @@ #define GSMTAP_CHANNEL_PDCH GSMTAP_CHANNEL_PDTCH #define GSMTAP_CHANNEL_PTCCH 0x0e #define GSMTAP_CHANNEL_CBCH51 0x0f -#define GSMTAP_CHANNEL_VOICE 0x10 /* voice codec payload (HR/FR/EFR/AMR) */ +#define GSMTAP_CHANNEL_VOICE_F 0x10 /* voice codec payload (FR/EFR/AMR) */ +#define GSMTAP_CHANNEL_VOICE_H 0x11 /* voice codec payload (HR/AMR) */ +#define GSMTAP_CHANNEL_TCH_F GSMTAP_CHANNEL_FACCH_F /* We used the wrong naming in 2008 when we were young */ +#define GSMTAP_CHANNEL_TCH_H GSMTAP_CHANNEL_FACCH_H /* We used the wrong naming in 2008 when we were young */ /* GPRS Coding Scheme CS1..4 */ #define GSMTAP_GPRS_CS_BASE 0x20 diff --git a/include/osmocom/core/gsmtap_util.h b/include/osmocom/core/gsmtap_util.h index f8a12a60..d583401d 100644 --- a/include/osmocom/core/gsmtap_util.h +++ b/include/osmocom/core/gsmtap_util.h @@ -8,7 +8,11 @@ * @{ * \file gsmtap_util.h */ +uint8_t chantype_rsl2gsmtap2(uint8_t rsl_chantype, uint8_t rsl_link_id, bool user_plane); + uint8_t chantype_rsl2gsmtap(uint8_t rsl_chantype, uint8_t rsl_link_id); + OSMO_DEPRECATED("Use chantype_rsl2gsmtap2() instead") + void chantype_gsmtap2rsl(uint8_t gsmtap_chantype, uint8_t *rsl_chantype, uint8_t *link_id); struct msgb *gsmtap_makemsg_ex(uint8_t type, uint16_t arfcn, uint8_t ts, uint8_t chan_type, |