laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32935 )
(
5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: Add short L3 header to gsm_04_08.h ......................................................................
Add short L3 header to gsm_04_08.h
Change-Id: I0eceb380e401e1f842edbaa92f4b4738703a031c --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 26 insertions(+), 0 deletions(-)
Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified
diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index e6dc73b..f9967ec 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -944,6 +944,20 @@ uint8_t data[0]; } __attribute__ ((packed));
+/* Short header */ +struct gsm48_hdr_sh { +#if OSMO_IS_LITTLE_ENDIAN + uint8_t l2_header:2, /* < short layer 2 header : bit(2) > See 3GPP TS 44.006 §6.4a */ + msg_type:5, /* < message type : bit(5) > See 3GPP TS 44.018 Table 10.4.2 */ + rr_short_pd:1; /* < RR short PD : bit > See 3GPP TS 24.007 §11.3.2 */ + uint8_t data[0]; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */ + uint8_t rr_short_pd:1, msg_type:5, l2_header:2; + uint8_t data[0]; +#endif +} __attribute__ ((packed)); + /* Section 9.1.3x System information Type header */ struct gsm48_system_information_type_header { #if OSMO_IS_LITTLE_ENDIAN @@ -1407,6 +1421,9 @@ #define GSM48_PDISC_TEST 0x0f /* as per 11.10, 04.14 */ #define GSM48_PDISC_MASK 0x0f
+/* Section 11.3.2.1 3GPP TS 24.007: Short PDISC */ +#define GSM48_PDISC_SH_RR 0 + extern const struct value_string gsm48_pdisc_names[]; static inline const char *gsm48_pdisc_name(uint8_t val) { return get_value_string(gsm48_pdisc_names, val); }