From d86055b431275cedb73bce32cb18dfc41dff0d15 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 17 Mar 2018 10:32:07 +0100 Subject: abis_nm: Introduce abis_nm_dump_foh() This is a more modern way of printing the Abis OML Formatted Object Header, without assuming that it would be used in a log statement or prescribing the log level to be used. Change-Id: I9b2c2afec28882b817d104d5b062651ade7aadd8 --- include/osmocom/gsm/abis_nm.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/osmocom/gsm/abis_nm.h b/include/osmocom/gsm/abis_nm.h index dd7ba0d5..823b5a45 100644 --- a/include/osmocom/gsm/abis_nm.h +++ b/include/osmocom/gsm/abis_nm.h @@ -41,16 +41,14 @@ static inline const char *abis_nm_admin_name(uint8_t admin) extern const struct tlv_definition abis_nm_osmo_att_tlvdef; extern const struct tlv_definition abis_nm_att_tlvdef_ipa; +const char *abis_nm_dump_foh(const struct abis_om_fom_hdr *foh); + /*! write a human-readable OML header to the debug log * \param[in] ss Logging sub-system * \param[in] foh A-bis OML FOM header */ #define abis_nm_debugp_foh(ss, foh) \ - DEBUGP(ss, "OC=%s(%02x) INST=(%02x,%02x,%02x) ", \ - get_value_string(abis_nm_obj_class_names, (foh)->obj_class), \ - (foh)->obj_class, (foh)->obj_inst.bts_nr, (foh)->obj_inst.trx_nr, \ - (foh)->obj_inst.ts_nr) - + DEBUGP(ss, "%s ", abis_nm_dump_foh(foh)) int abis_nm_chcomb4pchan(enum gsm_phys_chan_config pchan); enum gsm_phys_chan_config abis_nm_pchan4chcomb(uint8_t chcomb); -- cgit v1.2.3