aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-01-25 18:59:42 +0100
committerHarald Welte <laforge@gnumonks.org>2018-02-19 08:38:21 +0000
commitbf1fea0928183f51e994c3f2b0e0f0ca831fd7b8 (patch)
treee52f155143772553ddd2006e00dc4e43072cab94 /include
parentefa55a454174da12a44c750377b3605d9bfbf7ef (diff)
rsl: do not allow MODE MODIFY request with unsupp. codec/rate
When the BSC sends a MODE MODIFY request with an unsupported codec, the BTS must respond with a negative acknowledge. Currently the codec parameter is not checked at all, which may lead into malfunction or crash of the BTS. - Introduce a mechanism to check the codec/rate against a table that is set up in the phy specific code. - Add tables with supported codec/rate combinations for octphy, sysmobts, and trx. Change-Id: Id9b222b7ab19ece90591718bc562b3a8c5e02023 Related: SYS#3212
Diffstat (limited to 'include')
-rw-r--r--include/osmo-bts/bts.h3
-rw-r--r--include/osmo-bts/gsm_data.h8
2 files changed, 11 insertions, 0 deletions
diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h
index 9e16e050..2f63e37f 100644
--- a/include/osmo-bts/bts.h
+++ b/include/osmo-bts/bts.h
@@ -45,5 +45,8 @@ struct gsm_time *get_time(struct gsm_bts *bts);
int bts_main(int argc, char **argv);
+int bts_supports_cm(struct gsm_bts_role_bts *bts,
+ enum gsm_phys_chan_config pchan, enum gsm48_chan_mode cm);
+
#endif /* _BTS_H */
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index dcffcf65..853b4454 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -33,6 +33,11 @@ struct gsm_network {
struct pcu_sock_state *pcu_state;
};
+struct bts_cm {
+ enum gsm_phys_chan_config pchan;
+ enum gsm48_chan_mode cm;
+};
+
/* data structure for BTS related data specific to the BTS role */
struct gsm_bts_role_bts {
struct {
@@ -89,6 +94,7 @@ struct gsm_bts_role_bts {
bool rtp_jitter_adaptive;
struct {
uint8_t ciphers; /* flags A5/1==0x1, A5/2==0x2, A5/3==0x4 */
+ const struct bts_cm *cm; /* Table with supp. ch rate/mode combinations */
} support;
struct {
uint8_t tc4_ctr;
@@ -146,4 +152,6 @@ int bts_supports_cipher(struct gsm_bts_role_bts *bts, int rsl_cipher);
bool ts_is_pdch(const struct gsm_bts_trx_ts *ts);
+int bts_model_check_cm_mode(enum gsm_phys_chan_config pchan, enum gsm48_chan_mode cm);
+
#endif /* _GSM_DATA_H */