diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-03-09 23:27:56 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-03-16 12:54:18 +0000 |
commit | 00ab9ed6e26edcc0a6d2088903c626217574c82b (patch) | |
tree | 41aca0f5ef59eae60c95599849fa413b1666f061 /include/osmocom/gsm | |
parent | dbd994c05ba1f9881f884a7aa1e7d88054b7492e (diff) |
add gsm48_pdisc_msgtype_name()
Composing the message type string requires knowing the protocol discriminator.
To ease printing the message type, add this function to switch between the
defined value_string[]s depending on pdisc.
Also publish the message type value_string[]s -- without inline functions to
access them because it is anyway more convenient to use
gsm48_pdisc_msgtype_name() instead.
Since gsm48_pdisc_msgtype_name() is nontrivial, do not add as inline function
-- in case the message type is not known, it needs a static string buffer.
Change-Id: I0fca8e95ed5c2148b1a7440eff3fc9c7583898df
Diffstat (limited to 'include/osmocom/gsm')
-rw-r--r-- | include/osmocom/gsm/protocol/gsm_04_08.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 87debba9..3f0ce641 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1180,6 +1180,11 @@ void gsm48_set_dtx(struct gsm48_cell_options *op, enum gsm48_dtx_mode full, #define GSM48_MT_CC_START_DTMF_REJ 0x37 #define GSM48_MT_CC_FACILITY 0x3a +extern const struct value_string gsm48_rr_msgtype_names[]; +extern const struct value_string gsm48_mm_msgtype_names[]; +extern const struct value_string gsm48_cc_msgtype_names[]; +const char *gsm48_pdisc_msgtype_name(uint8_t pdisc, uint8_t msg_type); + /* FIXME: Table 10.4 / 10.4a (GPRS) */ /* Section 10.5.3.3 CM service type */ |