aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-07-03 16:22:44 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-07-05 18:17:46 +0200
commit23fd316dea2b3f949d03d8578b920a3d4ff2f3a9 (patch)
treea80ac8fad9fae80a7c137c4439cabaed2b2e2780 /include
parent8ca8a26ce95a1760a4574f71c2c4113da8aa80ff (diff)
Move nm_state and Mo related code gsm_data.* => oml.*
Diffstat (limited to 'include')
-rw-r--r--include/osmo-bts/gsm_data.h38
-rw-r--r--include/osmo-bts/oml.h34
2 files changed, 35 insertions, 37 deletions
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index 97f5cde4..2e8ff468 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -28,6 +28,7 @@
#include <osmo-bts/paging.h>
#include <osmo-bts/tx_power.h>
+#include <osmo-bts/oml.h>
#define GSM_FR_BITS 260
#define GSM_EFR_BITS 244
@@ -81,30 +82,6 @@ struct osmo_rtp_socket;
struct pcu_sock_state;
struct smscb_msg;
-/* Network Management State */
-struct gsm_nm_state {
- enum abis_nm_op_state operational;
- enum abis_nm_adm_state administrative;
- enum abis_nm_avail_state availability;
-};
-
-struct gsm_abis_mo {
- /* A-bis OML Object Class */
- uint8_t obj_class;
- /* is there still some procedure pending? */
- uint8_t procedure_pending;
- /* A-bis OML Object Instance */
- struct abis_om_obj_inst obj_inst;
- /* human-readable name */
- const char *name;
- /* NM State */
- struct gsm_nm_state nm_state;
- /* Attributes configured in this MO */
- struct tlv_parsed *nm_attr;
- /* BTS to which this MO belongs */
- struct gsm_bts *bts;
-};
-
#define MAX_A5_KEY_LEN (128/8)
#define RSL_ENC_ALG_A5(x) (x+1)
@@ -762,19 +739,6 @@ static inline char *gsm_lchan_name(const struct gsm_lchan *lchan)
return lchan->name;
}
-void gsm_abis_mo_reset(struct gsm_abis_mo *mo);
-
-struct gsm_abis_mo *
-gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class,
- const struct abis_om_obj_inst *obj_inst);
-
-struct gsm_nm_state *
-gsm_objclass2nmstate(struct gsm_bts *bts, uint8_t obj_class,
- const struct abis_om_obj_inst *obj_inst);
-void *
-gsm_objclass2obj(struct gsm_bts *bts, uint8_t obj_class,
- const struct abis_om_obj_inst *obj_inst);
-
uint8_t gsm_lchan2chan_nr(const struct gsm_lchan *lchan);
uint8_t gsm_lchan_as_pchan2chan_nr(const struct gsm_lchan *lchan,
enum gsm_phys_chan_config as_pchan);
diff --git a/include/osmo-bts/oml.h b/include/osmo-bts/oml.h
index b92a9745..484e210b 100644
--- a/include/osmo-bts/oml.h
+++ b/include/osmo-bts/oml.h
@@ -8,6 +8,29 @@ struct gsm_abis_mo;
struct msgb;
struct gsm_lchan;
+/* Network Management State */
+struct gsm_nm_state {
+ enum abis_nm_op_state operational;
+ enum abis_nm_adm_state administrative;
+ enum abis_nm_avail_state availability;
+};
+
+struct gsm_abis_mo {
+ /* A-bis OML Object Class */
+ uint8_t obj_class;
+ /* is there still some procedure pending? */
+ uint8_t procedure_pending;
+ /* A-bis OML Object Instance */
+ struct abis_om_obj_inst obj_inst;
+ /* human-readable name */
+ const char *name;
+ /* NM State */
+ struct gsm_nm_state nm_state;
+ /* Attributes configured in this MO */
+ struct tlv_parsed *nm_attr;
+ /* BTS to which this MO belongs */
+ struct gsm_bts *bts;
+};
int oml_init(struct gsm_abis_mo *mo);
int down_oml(struct gsm_bts *bts, struct msgb *msg);
@@ -46,4 +69,15 @@ extern const unsigned int oml_default_t200_ms[7];
int oml_tx_failure_event_rep(const struct gsm_abis_mo *mo, enum abis_nm_severity severity,
uint16_t cause_value, const char *fmt, ...);
+void gsm_mo_init(struct gsm_abis_mo *mo, struct gsm_bts *bts,
+ uint8_t obj_class, uint8_t p1, uint8_t p2, uint8_t p3);
+
+struct gsm_abis_mo *gsm_objclass2mo(struct gsm_bts *bts, uint8_t obj_class,
+ const struct abis_om_obj_inst *obj_inst);
+
+struct gsm_nm_state *gsm_objclass2nmstate(struct gsm_bts *bts, uint8_t obj_class,
+ const struct abis_om_obj_inst *obj_inst);
+void *gsm_objclass2obj(struct gsm_bts *bts, uint8_t obj_class,
+ const struct abis_om_obj_inst *obj_inst);
+
#endif // _OML_H */