From 9e051548d6b357b77bf1f218aaef8e439ab48fb5 Mon Sep 17 00:00:00 2001 From: Neels Janosch Hofmeyr Date: Thu, 9 Mar 2023 03:19:41 +0100 Subject: [PATCH] debug log: log received RANAP message types on DCN, DHNB Change-Id: Ib295e49f2c53164c5787002797145b3e6de5546b --- src/osmo-hnbgw/context_map_rua.c | 15 +++++++++++---- src/osmo-hnbgw/context_map_sccp.c | 6 ++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/osmo-hnbgw/context_map_rua.c b/src/osmo-hnbgw/context_map_rua.c index 674fc50..980fad2 100644 --- a/src/osmo-hnbgw/context_map_rua.c +++ b/src/osmo-hnbgw/context_map_rua.c @@ -128,8 +128,9 @@ static int destruct_ranap_cn_rx_co_ies(ranap_message *ranap_message_p) } /* Dispatch RANAP message to SCCP, if any. */ -static int handle_rx_rua(struct hnbgw_context_map *map, struct msgb *ranap_msg) +static int handle_rx_rua(struct osmo_fsm_inst *fi, struct msgb *ranap_msg) { + struct hnbgw_context_map *map = fi->priv; int rc; if (!msg_has_l2_data(ranap_msg)) return 0; @@ -142,6 +143,9 @@ static int handle_rx_rua(struct hnbgw_context_map *map, struct msgb *ranap_msg) if (rc == 0) { talloc_set_destructor(message, destruct_ranap_cn_rx_co_ies); + LOGPFSML(fi, LOGL_DEBUG, "rx from RUA: RANAP %s\n", + get_value_string(ranap_procedure_code_vals, message->procedureCode)); + switch (message->procedureCode) { case RANAP_ProcedureCode_id_RAB_Assignment: /* mgw_fsm_handle_rab_ass_resp() takes ownership of prim->oph and (ranap) message */ @@ -156,6 +160,9 @@ static int handle_rx_rua(struct hnbgw_context_map *map, struct msgb *ranap_msg) if (rc == 0) { talloc_set_destructor(message, destruct_ranap_cn_rx_co_ies); + LOGPFSML(fi, LOGL_DEBUG, "rx from RUA: RANAP %s\n", + get_value_string(ranap_procedure_code_vals, message->procedureCode)); + switch (message->procedureCode) { case RANAP_ProcedureCode_id_RAB_Assignment: /* ps_rab_ass_fsm takes ownership of prim->oph and RANAP message */ @@ -205,7 +212,7 @@ static void map_rua_init_action(struct osmo_fsm_inst *fi, uint32_t event, void * case MAP_RUA_EV_CN_DISC: case MAP_RUA_EV_HNB_LINK_LOST: /* Unlikely that SCCP is active, but let the SCCP FSM decide about that. */ - handle_rx_rua(map, ranap_msg); + handle_rx_rua(fi, ranap_msg); /* There is a reason to shut down this RUA connection. Super unlikely, we haven't even processed the * MAP_RUA_EV_RX_CONNECT that created this FSM. Semantically, RUA is not connected, so we can * directly go to MAP_RUA_ST_DISCONNECTED. */ @@ -246,7 +253,7 @@ static void map_rua_connected_action(struct osmo_fsm_inst *fi, uint32_t event, v case MAP_RUA_EV_RX_DIRECT_TRANSFER: /* received DirectTransfer from RUA, forward to SCCP */ - handle_rx_rua(map, ranap_msg); + handle_rx_rua(fi, ranap_msg); return; case MAP_RUA_EV_TX_DIRECT_TRANSFER: @@ -263,7 +270,7 @@ static void map_rua_connected_action(struct osmo_fsm_inst *fi, uint32_t event, v return; } map_rua_fsm_state_chg(MAP_RUA_ST_DISCONNECTED); - handle_rx_rua(map, ranap_msg); + handle_rx_rua(fi, ranap_msg); return; case MAP_RUA_EV_HNB_LINK_LOST: diff --git a/src/osmo-hnbgw/context_map_sccp.c b/src/osmo-hnbgw/context_map_sccp.c index 9245ed5..deb6e0f 100644 --- a/src/osmo-hnbgw/context_map_sccp.c +++ b/src/osmo-hnbgw/context_map_sccp.c @@ -191,6 +191,9 @@ static int handle_rx_sccp(struct osmo_fsm_inst *fi, struct msgb *ranap_msg) if (rc == 0) { talloc_set_destructor(message, destruct_ranap_ran_rx_co_ies); + LOGPFSML(fi, LOGL_DEBUG, "rx from SCCP: RANAP %s\n", + get_value_string(ranap_procedure_code_vals, message->procedureCode)); + switch (message->procedureCode) { case RANAP_ProcedureCode_id_RAB_Assignment: /* mgw_fsm_alloc_and_handle_rab_ass_req() takes ownership of (ranap) message */ @@ -212,6 +215,9 @@ static int handle_rx_sccp(struct osmo_fsm_inst *fi, struct msgb *ranap_msg) if (rc == 0) { talloc_set_destructor(message, destruct_ranap_ran_rx_co_ies); + LOGPFSML(fi, LOGL_DEBUG, "rx from SCCP: RANAP %s\n", + get_value_string(ranap_procedure_code_vals, message->procedureCode)); + switch (message->procedureCode) { case RANAP_ProcedureCode_id_RAB_Assignment: