From d4fb8e044c8982ea223d3ff47e6b5c8b2b492c77 Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Tue, 23 Nov 2021 15:54:12 +0100 Subject: WIP: Comment places to hook mgcp FSM for co-located mgw Change-Id: Idccdb487aee1ccaeb1b50175d4ec665381090c6b --- include/osmocom/iuh/context_map.h | 3 +++ src/context_map.c | 2 ++ src/hnbgw_cn.c | 5 +++++ src/hnbgw_rua.c | 3 +++ 4 files changed, 13 insertions(+) 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: -- cgit v1.2.3