neels has uploaded this change for review.
debug log: log received RANAP message types on DCN, DHNB
Change-Id: Ib295e49f2c53164c5787002797145b3e6de5546b
---
M src/osmo-hnbgw/context_map_rua.c
M src/osmo-hnbgw/context_map_sccp.c
2 files changed, 26 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/70/31770/1
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 @@
}
/* 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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:
To view, visit change 31770. To unsubscribe, or for help writing mail filters, visit settings.