aboutsummaryrefslogtreecommitdiffstats
path: root/src/hnbgw_rua.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-07-03 17:29:28 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-07-05 13:04:16 +0200
commit54e6e1fc3074a7ecd891a6895891bc32d04b33c2 (patch)
tree5b2cf09853784bc0cfddbf03dcea073e3ee9c5c3 /src/hnbgw_rua.c
parentc3614318af03527a3ed12a9835adbe1f3966b215 (diff)
rua_to_scu(): add debug log for calling/called addr
This might help in resolving whether we are conforming to SCCP specs regarding our calling/called address choices. Change-Id: Ie91953f7e9033419257d556d3a9f14e125f5c60d
Diffstat (limited to 'src/hnbgw_rua.c')
-rw-r--r--src/hnbgw_rua.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/hnbgw_rua.c b/src/hnbgw_rua.c
index 54c455b..b610437 100644
--- a/src/hnbgw_rua.c
+++ b/src/hnbgw_rua.c
@@ -226,6 +226,11 @@ static int rua_to_scu(struct hnb_context *hnb,
prim->u.connect.calling_addr = cn->gw->sccp.local_addr;
prim->u.connect.sccp_class = 2;
prim->u.connect.conn_id = map->scu_conn_id;
+ /* Two separate logs because of osmo_sccp_addr_dump(). */
+ DEBUGP(DRUA, "RUA to SCCP N_CONNECT: called_addr:%s\n",
+ osmo_sccp_addr_dump(&prim->u.connect.called_addr));
+ DEBUGP(DRUA, "RUA to SCCP N_CONNECT: calling_addr:%s\n",
+ osmo_sccp_addr_dump(&prim->u.connect.calling_addr));
break;
case OSMO_SCU_PRIM_N_DATA:
prim->u.data.conn_id = map->scu_conn_id;
@@ -237,6 +242,11 @@ static int rua_to_scu(struct hnb_context *hnb,
case OSMO_SCU_PRIM_N_UNITDATA:
prim->u.unitdata.called_addr = *remote_addr;
prim->u.unitdata.calling_addr = cn->gw->sccp.local_addr;
+ /* Two separate logs because of osmo_sccp_addr_dump(). */
+ DEBUGP(DRUA, "RUA to SCCP N_UNITDATA: called_addr:%s\n",
+ osmo_sccp_addr_dump(&prim->u.unitdata.called_addr));
+ DEBUGP(DRUA, "RUA to SCCP N_UNITDATA: calling_addr:%s\n",
+ osmo_sccp_addr_dump(&prim->u.unitdata.calling_addr));
break;
default:
return -EINVAL;