summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-07-13 00:01:02 +0200
committerHarald Welte <laforge@gnumonks.org>2017-07-13 00:03:29 +0200
commitaa3ba46e0f9dcfb1236a10f6b8f09b1f33330778 (patch)
tree8ee18824cf62fe1ea1171ee03f862523b6b157a4
parent93713a55b93a30a01aaa99355d2d7abf4e4597a7 (diff)
gsmtap: Add value_strings for GSMTAP_TYPE and GSMTAP_CHANNEL
Change-Id: Iaf8a99912f42a56ef785a1642e18238c0b67cf68
-rw-r--r--include/osmocom/core/gsmtap_util.h3
-rw-r--r--src/gsmtap_util.c45
2 files changed, 48 insertions, 0 deletions
diff --git a/include/osmocom/core/gsmtap_util.h b/include/osmocom/core/gsmtap_util.h
index 5c5e3fdd..f8a12a60 100644
--- a/include/osmocom/core/gsmtap_util.h
+++ b/include/osmocom/core/gsmtap_util.h
@@ -55,4 +55,7 @@ int gsmtap_send(struct gsmtap_inst *gti, uint16_t arfcn, uint8_t ts,
int8_t signal_dbm, uint8_t snr, const uint8_t *data,
unsigned int len);
+extern const struct value_string gsmtap_gsm_channel_names[];
+extern const struct value_string gsmtap_type_names[];
+
/*! @} */
diff --git a/src/gsmtap_util.c b/src/gsmtap_util.c
index 26720b6c..ad6f914e 100644
--- a/src/gsmtap_util.c
+++ b/src/gsmtap_util.c
@@ -436,4 +436,49 @@ struct gsmtap_inst *gsmtap_source_init(const char *host, uint16_t port,
#endif /* HAVE_SYS_SOCKET_H */
+const struct value_string gsmtap_gsm_channel_names[] = {
+ { GSMTAP_CHANNEL_UNKNOWN, "UNKNOWN" },
+ { GSMTAP_CHANNEL_BCCH, "BCCH" },
+ { GSMTAP_CHANNEL_CCCH, "CCCH" },
+ { GSMTAP_CHANNEL_RACH, "RACH" },
+ { GSMTAP_CHANNEL_AGCH, "AGCH" },
+ { GSMTAP_CHANNEL_PCH, "PCH" },
+ { GSMTAP_CHANNEL_SDCCH, "SDCCH" },
+ { GSMTAP_CHANNEL_SDCCH4, "SDCCH/4" },
+ { GSMTAP_CHANNEL_SDCCH8, "SDCCH/8" },
+ { GSMTAP_CHANNEL_TCH_F, "TCH/F/FACCH/F" },
+ { GSMTAP_CHANNEL_TCH_H, "TCH/H/FACCH/H" },
+ { GSMTAP_CHANNEL_PACCH, "PACCH" },
+ { GSMTAP_CHANNEL_CBCH52, "CBCH" },
+ { GSMTAP_CHANNEL_PDCH, "PDCH" } ,
+ { GSMTAP_CHANNEL_PTCCH, "PTTCH" },
+ { GSMTAP_CHANNEL_CBCH51, "CBCH" },
+ { GSMTAP_CHANNEL_ACCH | GSMTAP_CHANNEL_SDCCH, "LSACCH" },
+ { GSMTAP_CHANNEL_ACCH | GSMTAP_CHANNEL_SDCCH4, "SACCH/4" },
+ { GSMTAP_CHANNEL_ACCH | GSMTAP_CHANNEL_SDCCH8, "SACCH/8" },
+ { GSMTAP_CHANNEL_ACCH | GSMTAP_CHANNEL_TCH_F, "SACCH/F" },
+ { GSMTAP_CHANNEL_ACCH | GSMTAP_CHANNEL_TCH_H, "SACCH/H" },
+ { 0, NULL }
+};
+
+/* for debugging */
+const struct value_string gsmtap_type_names[] = {
+ { GSMTAP_TYPE_UM, "GSM Um (MS<->BTS)" },
+ { GSMTAP_TYPE_ABIS, "GSM Abis (BTS<->BSC)" },
+ { GSMTAP_TYPE_UM_BURST, "GSM Um burst (MS<->BTS)" },
+ { GSMTAP_TYPE_SIM, "SIM Card" },
+ { GSMTAP_TYPE_TETRA_I1, "TETRA V+D" },
+ { GSMTAP_TYPE_TETRA_I1_BURST, "TETRA bursts" },
+ { GSMTAP_TYPE_WMX_BURST, "WiMAX burst" },
+ { GSMTAP_TYPE_GMR1_UM, "GMR-1 air interfeace (MES-MS<->GTS)"},
+ { GSMTAP_TYPE_UMTS_RLC_MAC, "UMTS RLC/MAC" },
+ { GSMTAP_TYPE_UMTS_RRC, "UMTS RRC" },
+ { GSMTAP_TYPE_LTE_RRC, "LTE RRC" },
+ { GSMTAP_TYPE_LTE_MAC, "LTE MAC" },
+ { GSMTAP_TYPE_LTE_MAC_FRAMED, "LTE MAC with context hdr" },
+ { GSMTAP_TYPE_OSMOCORE_LOG, "libosmocore logging" },
+ { GSMTAP_TYPE_QC_DIAG, "Qualcomm DIAG" },
+ { 0, NULL }
+};
+
/*! @} */