aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2021-11-23 15:54:12 +0100
committerDaniel Willmann <dwillmann@sysmocom.de>2021-11-25 11:07:36 +0100
commitd4fb8e044c8982ea223d3ff47e6b5c8b2b492c77 (patch)
tree3da67348e25d699803530f4920342bde2454d098
parent1bc3fb4dd926ce2c022b68fb7c0ce32c42f3f16e (diff)
WIP: Comment places to hook mgcp FSM for co-located mgwdaniel/mgw
-rw-r--r--include/osmocom/iuh/context_map.h3
-rw-r--r--src/context_map.c2
-rw-r--r--src/hnbgw_cn.c5
-rw-r--r--src/hnbgw_rua.c3
4 files changed, 13 insertions, 0 deletions
diff --git a/include/osmocom/iuh/context_map.h b/include/osmocom/iuh/context_map.h
index 6279b91..6910fe8 100644
--- a/include/osmocom/iuh/context_map.h
+++ b/include/osmocom/iuh/context_map.h
@@ -35,6 +35,9 @@ struct hnbgw_context_map {
uint32_t scu_conn_id;
enum hnbgw_context_map_state state;
+
+ /* FSM instance for the MGW */
+ struct osmo_fsm_inst *mgw_fi;
};
diff --git a/src/context_map.c b/src/context_map.c
index f516efe..a5c9f80 100644
--- a/src/context_map.c
+++ b/src/context_map.c
@@ -106,6 +106,8 @@ context_map_alloc_by_hnb(struct hnb_context *hnb, uint32_t rua_ctx_id,
llist_add_tail(&map->cn_list, &cn_if_new->map_list);
map->state = MAP_S_ACTIVE;
+ // TODO: map->mgw_fi = osmo_fsm_inst_alloc();
+
return map;
}
diff --git a/src/hnbgw_cn.c b/src/hnbgw_cn.c
index 7b3cb09..d66eac5 100644
--- a/src/hnbgw_cn.c
+++ b/src/hnbgw_cn.c
@@ -356,6 +356,11 @@ static int handle_cn_data_ind(struct hnbgw_cnlink *cnlink,
return 0;
}
+ /* TODO: Intercept RAB Assignment Request
+ * Setup MGW and forward patched message with IP address
+ * Save state in context map
+ */
+
return rua_tx_dt(map->hnb_ctx, map->is_ps, map->rua_ctx_id,
msgb_l2(oph->msg), msgb_l2len(oph->msg));
}
diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c
index c625bcf..f4112f2 100644
--- a/src/hnbgw_rua.c
+++ b/src/hnbgw_rua.c
@@ -225,6 +225,9 @@ static int rua_to_scu(struct hnb_context *hnb,
map->rua_ctx_id, map->scu_conn_id);
}
+ /* TODO: Check for map and if this is a RAB Assignment response
+ * Control mgw, patch IPs and forward patched message */
+
/* add primitive header */
switch (type) {
case OSMO_SCU_PRIM_N_CONNECT: