aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmo-bts
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-09-25 10:39:40 +0200
committerlaforge <laforge@osmocom.org>2019-10-11 10:46:02 +0000
commit5fee4d1ff5fac53bc21ed19abf2f84456486fa44 (patch)
treef8387d2bcff68f83320ff3da3f02c2e02a7ef439 /include/osmo-bts
parenta4c54b531c05151f7074be952a22f1891aa0fcc6 (diff)
log: set L1 SAPI log context
Add a new common L1 SAPI enum, to unify all the BTS specific SAPIs. Translate to this enum, and set the context for uplink messages in each BTS specific implementation. Set the context for downlink messages in the common l1sap code, by converting the osmo_phsap_prim back to the SAPI value (mostly looking at chan_nr). The new functions for doing this conversion, get_common_sapi_by_trx_prim() and get_common_sapi_ph_data(), are based on the existing to_gsmtap() and gsmtap_ph_data() functions. Note that we can't set the uplink SAPI context in the common code, because then we can't set it as early as possible. In this patch, the SAPI context is set for the PHYs where the SAPI is readily available. With additional conversion from the RSL channel, the SAPI context could be set for osmo-bts-trx in a follow up patch. Related: OS#2356 Depends: (libosmocore) I814cb3328d99faca9220adb5a80ffb934f219d7d Change-Id: I6b7bb2e1d61502b61214f854a4ec5cbb7267545b
Diffstat (limited to 'include/osmo-bts')
-rw-r--r--include/osmo-bts/l1sap.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/osmo-bts/l1sap.h b/include/osmo-bts/l1sap.h
index 7ae5d38d..1883869f 100644
--- a/include/osmo-bts/l1sap.h
+++ b/include/osmo-bts/l1sap.h
@@ -96,6 +96,37 @@ int l1sap_chan_rel(struct gsm_bts_trx *trx, uint8_t chan_nr);
int l1sap_chan_deact_sacch(struct gsm_bts_trx *trx, uint8_t chan_nr);
int l1sap_chan_modify(struct gsm_bts_trx *trx, uint8_t chan_nr);
+enum l1sap_common_sapi {
+ L1SAP_COMMON_SAPI_UNKNOWN,
+ /* alphabetic order */
+ L1SAP_COMMON_SAPI_AGCH,
+ L1SAP_COMMON_SAPI_BCCH,
+ L1SAP_COMMON_SAPI_CBCH,
+ L1SAP_COMMON_SAPI_FACCH_F,
+ L1SAP_COMMON_SAPI_FACCH_H,
+ L1SAP_COMMON_SAPI_FCCH,
+ L1SAP_COMMON_SAPI_IDLE,
+ L1SAP_COMMON_SAPI_NCH,
+ L1SAP_COMMON_SAPI_PACCH,
+ L1SAP_COMMON_SAPI_PAGCH,
+ L1SAP_COMMON_SAPI_PBCCH,
+ L1SAP_COMMON_SAPI_PCH,
+ L1SAP_COMMON_SAPI_PDTCH,
+ L1SAP_COMMON_SAPI_PNCH,
+ L1SAP_COMMON_SAPI_PPCH,
+ L1SAP_COMMON_SAPI_PRACH,
+ L1SAP_COMMON_SAPI_PTCCH,
+ L1SAP_COMMON_SAPI_RACH,
+ L1SAP_COMMON_SAPI_SACCH,
+ L1SAP_COMMON_SAPI_SCH,
+ L1SAP_COMMON_SAPI_SDCCH,
+ L1SAP_COMMON_SAPI_TCH_F,
+ L1SAP_COMMON_SAPI_TCH_H,
+};
+
+extern uint16_t l1sap_log_ctx_sapi;
+extern const struct value_string l1sap_common_sapi_names[];
+
extern const struct value_string gsmtap_sapi_names[];
extern struct gsmtap_inst *gsmtap;
extern uint32_t gsmtap_sapi_mask;