diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2021-02-16 17:31:22 +0100 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2021-02-16 21:42:04 +0100 |
commit | ca770ae77e38b6a634282e19d7b6e16a28db39f3 (patch) | |
tree | c8c3d3fc615ace2e82c3734e2a7f0e443f00034f /include | |
parent | bb149ecda21a4f9b102245ffc6a2870592d32c0b (diff) |
gsm_08_58, gsm_44_004: add struct for l1 information
Libosmocore currently does not offer any structs to encode and decode
the l1 information on RSL level and the sacch l1 header on the air
interface level. Both structs are identical but the field order in the
first octet is reversed.
Change-Id: I23c1890b89d5a0574eb05dace9f64cc59d6f6df7
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.am | 1 | ||||
-rw-r--r-- | include/osmocom/gsm/protocol/gsm_08_58.h | 16 | ||||
-rw-r--r-- | include/osmocom/gsm/protocol/gsm_44_004.h | 19 |
3 files changed, 36 insertions, 0 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index 10f02215..8dae3d96 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -144,6 +144,7 @@ nobase_include_HEADERS = \ osmocom/gsm/protocol/gsm_23_003.h \ osmocom/gsm/protocol/gsm_23_041.h \ osmocom/gsm/protocol/gsm_29_118.h \ + osmocom/gsm/protocol/gsm_44_004.h \ osmocom/gsm/protocol/gsm_44_318.h \ osmocom/gsm/protocol/gsm_48_049.h \ osmocom/gsm/protocol/gsm_48_071.h \ diff --git a/include/osmocom/gsm/protocol/gsm_08_58.h b/include/osmocom/gsm/protocol/gsm_08_58.h index e9c14e6c..6f974ce0 100644 --- a/include/osmocom/gsm/protocol/gsm_08_58.h +++ b/include/osmocom/gsm/protocol/gsm_08_58.h @@ -945,4 +945,20 @@ struct ipac_preproc_cfg { struct ipac_preproc_ho_ctl_param ho_ctl_param; }; +struct rsl_l1_info { +#if OSMO_IS_BIG_ENDIAN + uint8_t ms_pwr:5, + fpc_epc:1, + srr_sro:1, + reserved:1; + uint8_t ta; +#elif OSMO_IS_LITTLE_ENDIAN + uint8_t reserved:1, + srr_sro:1, + fpc_epc:1, + ms_pwr:5; + uint8_t ta; +#endif +} __attribute__ ((packed)); + /*! @} */ diff --git a/include/osmocom/gsm/protocol/gsm_44_004.h b/include/osmocom/gsm/protocol/gsm_44_004.h new file mode 100644 index 00000000..83be9bfd --- /dev/null +++ b/include/osmocom/gsm/protocol/gsm_44_004.h @@ -0,0 +1,19 @@ +#pragma once + +/* TS 44.004 Section 7.1 */ + +struct gsm_sacch_l1_hdr { +#if OSMO_IS_BIG_ENDIAN + uint8_t reserved:1, + srr_sro:1, + fpc_epc:1, + ms_pwr:5; + uint8_t ta; +#elif OSMO_IS_LITTLE_ENDIAN + uint8_t ms_pwr:5, + fpc_epc:1, + srr_sro:1, + reserved:1; + uint8_t ta; +#endif +} __attribute__ ((packed)); |