osmith has uploaded this change for review.

View Change

bsc_nat_sccp_inst: local_sccp_addr -> addr

Make it a bit shorter, it's clear that this refers to the local address
of the OsmoBSCNAT in CN/RAN.

Related: SYS#5560
Change-Id: I3083374d589487ed960507e7a431c45914afc5dd
---
M include/osmocom/bsc_nat/bsc_nat.h
M src/osmo-bsc-nat/bsc_nat_fsm.c
2 files changed, 9 insertions(+), 9 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-bsc-nat refs/changes/70/27470/1
diff --git a/include/osmocom/bsc_nat/bsc_nat.h b/include/osmocom/bsc_nat/bsc_nat.h
index e014800..3e47782 100644
--- a/include/osmocom/bsc_nat/bsc_nat.h
+++ b/include/osmocom/bsc_nat/bsc_nat.h
@@ -25,7 +25,7 @@
uint32_t ss7_id;
struct osmo_ss7_instance *ss7_inst;

- struct osmo_sccp_addr local_sccp_addr;
+ struct osmo_sccp_addr addr; /* OsmoBSCNAT's local address */
struct osmo_sccp_user *scu;
};

diff --git a/src/osmo-bsc-nat/bsc_nat_fsm.c b/src/osmo-bsc-nat/bsc_nat_fsm.c
index 94b6658..aa15c06 100644
--- a/src/osmo-bsc-nat/bsc_nat_fsm.c
+++ b/src/osmo-bsc-nat/bsc_nat_fsm.c
@@ -57,10 +57,10 @@
static int sccp_sap_get_peer_addr_in(struct bsc_nat_sccp_inst *src, struct osmo_sccp_addr **peer_addr_in,
struct osmo_sccp_addr *called_addr, struct osmo_sccp_addr *calling_addr)
{
- if (osmo_sccp_addr_ri_cmp(&src->local_sccp_addr, called_addr) != 0) {
+ if (osmo_sccp_addr_ri_cmp(&src->addr, called_addr) != 0) {
*peer_addr_in = called_addr;
return 0;
- } else if (osmo_sccp_addr_ri_cmp(&src->local_sccp_addr, calling_addr) != 0) {
+ } else if (osmo_sccp_addr_ri_cmp(&src->addr, calling_addr) != 0) {
*peer_addr_in = calling_addr;
return 0;
}
@@ -73,7 +73,7 @@

LOGP(DMAIN, LOGL_ERROR, "Invalid connection oriented message, locally configured address %s"
" is neither called address %s nor calling address %s!\n",
- osmo_sccp_inst_addr_name(NULL, &src->local_sccp_addr), buf_called, buf_calling);
+ osmo_sccp_inst_addr_name(NULL, &src->addr), buf_called, buf_calling);
return -1;
}

@@ -127,7 +127,7 @@
msgb_pull_to_l2(oph->msg);
osmo_sccp_tx_conn_req(g_bsc_nat->ran->scu,
prim->u.connect.conn_id,
- &g_bsc_nat->ran->local_sccp_addr,
+ &g_bsc_nat->ran->addr,
&peer_addr_out,
oph->msg->data,
msgb_length(oph->msg));
@@ -196,7 +196,7 @@
* unitdata msg and send it again. */
msgb_pull_to_l2(oph->msg);
osmo_sccp_tx_unitdata(g_bsc_nat->ran->scu,
- &g_bsc_nat->ran->local_sccp_addr,
+ &g_bsc_nat->ran->addr,
&peer_addr_out,
oph->msg->data,
msgb_length(oph->msg));
@@ -241,7 +241,7 @@
msgb_pull_to_l2(oph->msg);
osmo_sccp_tx_conn_req(g_bsc_nat->cn->scu,
prim->u.connect.conn_id,
- &g_bsc_nat->cn->local_sccp_addr,
+ &g_bsc_nat->cn->addr,
&peer_addr_out,
oph->msg->data,
msgb_length(oph->msg));
@@ -310,7 +310,7 @@
* unitdata msg and send it again. */
msgb_pull_to_l2(oph->msg);
osmo_sccp_tx_unitdata(g_bsc_nat->cn->scu,
- &g_bsc_nat->cn->local_sccp_addr,
+ &g_bsc_nat->cn->addr,
&peer_addr_out,
oph->msg->data,
msgb_length(oph->msg));
@@ -345,7 +345,7 @@

sccp_inst->ss7_inst = osmo_ss7_instance_find(sccp_inst->ss7_id);

- osmo_sccp_local_addr_by_instance(&sccp_inst->local_sccp_addr, sccp, ssn);
+ osmo_sccp_local_addr_by_instance(&sccp_inst->addr, sccp, ssn);

sccp_inst->scu = osmo_sccp_user_bind(sccp, name, prim_cb, ssn);
if (!sccp_inst->scu) {

To view, visit change 27470. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I3083374d589487ed960507e7a431c45914afc5dd
Gerrit-Change-Number: 27470
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-MessageType: newchange