aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-08-17 22:01:45 +0200
committerHarald Welte <laforge@gnumonks.org>2014-08-24 17:28:47 +0200
commit85c7e90f434192e4fd6713d219bc33e0a47f6cde (patch)
treea115b37eebf16cfcbba0aaf6278d64b5a3f49101 /include
parentaf066bab9dac8f52efad4d924b6dcc3bc3c64626 (diff)
A dedicated OML router program (osmobts-omlrouter)
The idea of this OML router is to be the entity that connects the OML link to the BSC. osmo-bts as well as other programs like sysmobts-mgr and possibly more will then connect to the OML-router rather than the BSC. The point is that those "OML clients" can then register for certain OML messages (particularly the managed objects like TRX, etc.) which then get routed to them. This is particularly useful in the context of 'stacked' multi-TRX BTSs, where we will have two osmo-bts processes, one on each of the TRX, both connecting OML to the oml-router. Through their respective subscription of the baseband transceiver OML object, they will get routed the IPA CONNECT RSL message from the BSC, and both osmo-bts processes will establish independent RSL connections to the BSC.
Diffstat (limited to 'include')
-rw-r--r--include/osmo-bts/Makefile.am2
-rw-r--r--include/osmo-bts/oml_router_ctrl.h30
-rw-r--r--include/osmo-bts/oml_routing.h51
-rw-r--r--include/osmo-bts/vty.h1
4 files changed, 83 insertions, 1 deletions
diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am
index b2941444..7fb14f7f 100644
--- a/include/osmo-bts/Makefile.am
+++ b/include/osmo-bts/Makefile.am
@@ -1,3 +1,3 @@
noinst_HEADERS = abis.h bts.h bts_model.h gsm_data.h logging.h measurement.h \
oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \
- handover.h msg_utils.h tx_power.h
+ handover.h msg_utils.h tx_power.h oml_routing.h oml_router_ctrl.h
diff --git a/include/osmo-bts/oml_router_ctrl.h b/include/osmo-bts/oml_router_ctrl.h
new file mode 100644
index 00000000..7fe71dff
--- /dev/null
+++ b/include/osmo-bts/oml_router_ctrl.h
@@ -0,0 +1,30 @@
+#ifndef OML_ROUTER_CTRL_H
+#define OML_ROUTER_CTRL_H
+
+enum osmo_omlrctrl_msgtype {
+ OSMO_ORC_MSGT_REGISTER_REQ = 1,
+ OSMO_ORC_MSGT_REGISTER_ACK = 2,
+ OSMO_ORC_MSGT_REGISTER_NACK = 3,
+
+ OSMO_ORC_MSGT_ROUTE_ADD_REQ = 4,
+ OSMO_ORC_MSGT_ROUTE_ADD_ACK = 5,
+ OSMO_ORC_MSGT_ROUTE_ADD_NACK = 6,
+
+ OSMO_ORC_MSGT_ROUTE_DEL_REQ = 7,
+ OSMO_ORC_MSGT_ROUTE_DEL_ACK = 8,
+ OSMO_ORC_MSGT_ROUTE_DEL_NACK = 9,
+};
+
+struct osmo_omlrctrl_hdr {
+ uint8_t version;
+ uint8_t msg_type;
+ uint16_t data_len;
+ uint8_t data[0];
+} __attribute__((packed));
+
+struct osmo_omlrctrl_register_req {
+ uint8_t name_len;
+ char name[0];
+} __attribute__((packed));
+
+#endif
diff --git a/include/osmo-bts/oml_routing.h b/include/osmo-bts/oml_routing.h
new file mode 100644
index 00000000..9d50881f
--- /dev/null
+++ b/include/osmo-bts/oml_routing.h
@@ -0,0 +1,51 @@
+#ifndef OML_ROUTING_H
+#define OML_ROUTING_H
+
+#include <stdint.h>
+#include <osmocom/gsm/abis_nm.h>
+
+enum oml_routing_flags {
+ OML_RTF_MDISC = 0x00000001,
+ OML_RTF_OBJ_CLASS = 0x00000002,
+ OML_RTF_BTS_NR = 0x00000004,
+ OML_RTF_TRX_NR = 0x00000008,
+ OML_RTF_TS_NR = 0x00000010,
+ OML_RTF_VENDOR = 0x00000020,
+};
+
+struct oml_routing_key {
+ uint8_t mdisc; /* abis_om_hdr.mdisc */
+ uint8_t obj_class; /* abis_om_fom_hdr.obj_class */
+ struct abis_om_obj_inst obj_inst; /* abis_om_fom_hdr.obj_inst */
+ uint8_t vendor_lv[64]; /* vendor length-value */
+} __attribute__ ((packed));
+
+struct oml_route {
+ uint32_t flags; /* bitmask of oml_routing_flags */
+ struct oml_routing_key key;
+} __attribute ((packed));
+
+struct oml_routing_inst;
+struct oml_client;
+
+/* an OML route as it is used internally */
+struct oml_route_entry {
+ struct llist_head list;
+ struct oml_route route;
+ struct oml_client *client;
+};
+
+int oml_route_add(struct oml_routing_inst *inst, const struct oml_route *route,
+ struct oml_client *client);
+
+int oml_route_del(struct oml_routing_inst *inst, const struct oml_route *route);
+int oml_route_del_client(struct oml_routing_inst *inst, const struct oml_client *client);
+
+void *oml_route(struct oml_routing_inst *inst,
+ const struct oml_routing_key *key);
+
+struct oml_routing_inst *oml_route_init(void *ctx, void *priv);
+
+char *oml_route_client_name(struct oml_client *client);
+
+#endif
diff --git a/include/osmo-bts/vty.h b/include/osmo-bts/vty.h
index 1bc7e718..48303d45 100644
--- a/include/osmo-bts/vty.h
+++ b/include/osmo-bts/vty.h
@@ -7,6 +7,7 @@
enum bts_vty_node {
BTS_NODE = _LAST_OSMOVTY_NODE + 1,
TRX_NODE,
+ OMLR_NODE,
};
extern struct cmd_element ournode_exit_cmd;