aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-10-11 20:58:04 +0200
committerAlexander Couzens <lynxis@fe80.eu>2020-10-12 15:54:21 +0200
commitc4229a458c28af184260ee8e02aca4f124ec01b1 (patch)
treee8be6c172aa002563b74b12e341cae3186d046b9
parent9a4cf275b2d2ae03702bd344291332f7e898da51 (diff)
gprs_ns2: rename gprs_ns2_ip_vc_sockaddr -> gprs_ns2_ip_vc_remote
It's more clear which part of the address is returned. In preparation to add a gprs_ns2_ip_vc_local. Change-Id: I6110ff573362961c713a990da7ef3f3dbedf6c57
-rw-r--r--include/osmocom/gprs/gprs_ns2.h2
-rw-r--r--src/gb/gprs_ns2.c4
-rw-r--r--src/gb/gprs_ns2_sns.c8
-rw-r--r--src/gb/gprs_ns2_udp.c2
-rw-r--r--src/gb/gprs_ns2_vty.c2
-rw-r--r--src/gb/libosmogb.map2
6 files changed, 10 insertions, 10 deletions
diff --git a/include/osmocom/gprs/gprs_ns2.h b/include/osmocom/gprs/gprs_ns2.h
index a3edc638..5f341d98 100644
--- a/include/osmocom/gprs/gprs_ns2.h
+++ b/include/osmocom/gprs/gprs_ns2.h
@@ -139,7 +139,7 @@ int gprs_ns2_ip_connect_sns(struct gprs_ns2_vc_bind *bind,
const struct osmo_sockaddr *remote,
uint16_t nsei);
-const struct osmo_sockaddr *gprs_ns2_ip_vc_sockaddr(struct gprs_ns2_vc *nsvc);
+const struct osmo_sockaddr *gprs_ns2_ip_vc_remote(struct gprs_ns2_vc *nsvc);
const struct osmo_sockaddr *gprs_ns2_ip_bind_sockaddr(struct gprs_ns2_vc_bind *bind);
int gprs_ns2_is_ip_bind(struct gprs_ns2_vc_bind *bind);
int gprs_ns2_ip_bind_set_dscp(struct gprs_ns2_vc_bind *bind, int dscp);
diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 43a3d770..002ea1d2 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -226,7 +226,7 @@ char *gprs_ns2_ll_str_buf(char *buf, size_t buf_len, struct gprs_ns2_vc *nsvc)
}
local = gprs_ns2_ip_bind_sockaddr(nsvc->bind);
- remote = gprs_ns2_ip_vc_sockaddr(nsvc);
+ remote = gprs_ns2_ip_vc_remote(nsvc);
if (osmo_sockaddr_str_from_sockaddr(&local_str, &local->u.sas))
strcpy(local_str.ip, "invalid");
if (osmo_sockaddr_str_from_sockaddr(&remote_str, &remote->u.sas))
@@ -853,7 +853,7 @@ struct gprs_ns2_vc *gprs_ns2_nsvc_by_sockaddr_nse(struct gprs_ns2_nse *nse,
OSMO_ASSERT(sockaddr);
llist_for_each_entry(nsvc, &nse->nsvc, list) {
- remote = gprs_ns2_ip_vc_sockaddr(nsvc);
+ remote = gprs_ns2_ip_vc_remote(nsvc);
if (!osmo_sockaddr_cmp(sockaddr, remote))
return nsvc;
}
diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c
index 27562269..d4de8ae2 100644
--- a/src/gb/gprs_ns2_sns.c
+++ b/src/gb/gprs_ns2_sns.c
@@ -305,7 +305,7 @@ static int create_missing_nsvcs(struct osmo_fsm_inst *fi)
if (nsvc->bind != bind)
continue;
- if (!osmo_sockaddr_cmp(&remote, gprs_ns2_ip_vc_sockaddr(nsvc))) {
+ if (!osmo_sockaddr_cmp(&remote, gprs_ns2_ip_vc_remote(nsvc))) {
found = true;
break;
}
@@ -340,7 +340,7 @@ static int create_missing_nsvcs(struct osmo_fsm_inst *fi)
if (nsvc->bind != bind)
continue;
- if (!osmo_sockaddr_cmp(&remote, gprs_ns2_ip_vc_sockaddr(nsvc))) {
+ if (!osmo_sockaddr_cmp(&remote, gprs_ns2_ip_vc_remote(nsvc))) {
found = true;
break;
}
@@ -508,7 +508,7 @@ static int do_sns_change_weight(struct osmo_fsm_inst *fi, const struct gprs_ns_i
}
llist_for_each_entry(nsvc, &nse->nsvc, list) {
- remote = gprs_ns2_ip_vc_sockaddr(nsvc);
+ remote = gprs_ns2_ip_vc_remote(nsvc);
/* all nsvc in NSE should be IP/UDP nsvc */
OSMO_ASSERT(remote);
@@ -556,7 +556,7 @@ static int do_sns_delete(struct osmo_fsm_inst *fi,
}
llist_for_each_entry_safe(nsvc, tmp, &nse->nsvc, list) {
- remote = gprs_ns2_ip_vc_sockaddr(nsvc);
+ remote = gprs_ns2_ip_vc_remote(nsvc);
/* all nsvc in NSE should be IP/UDP nsvc */
OSMO_ASSERT(remote);
if (osmo_sockaddr_cmp(&sa, remote))
diff --git a/src/gb/gprs_ns2_udp.c b/src/gb/gprs_ns2_udp.c
index 9aca80b2..e6891183 100644
--- a/src/gb/gprs_ns2_udp.c
+++ b/src/gb/gprs_ns2_udp.c
@@ -396,7 +396,7 @@ struct gprs_ns2_vc *gprs_ns2_ip_bind_connect(struct gprs_ns2_vc_bind *bind,
/*! Return the socket address of the remote peer of a NS-VC.
* \param[in] nsvc NS-VC whose remote peer we want to know
* \return address of the remote peer; NULL in case of error */
-const struct osmo_sockaddr *gprs_ns2_ip_vc_sockaddr(struct gprs_ns2_vc *nsvc)
+const struct osmo_sockaddr *gprs_ns2_ip_vc_remote(struct gprs_ns2_vc *nsvc)
{
struct priv_vc *priv;
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 92c00958..a457361a 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -251,7 +251,7 @@ static void dump_nsvc(struct vty *vty, struct gprs_ns2_vc *nsvc, bool stats)
switch (nsvc->ll) {
case GPRS_NS_LL_UDP: {
- sockaddr = gprs_ns2_ip_vc_sockaddr(nsvc);
+ sockaddr = gprs_ns2_ip_vc_remote(nsvc);
if (!sockaddr) {
vty_out(vty, "unknown");
break;
diff --git a/src/gb/libosmogb.map b/src/gb/libosmogb.map
index a1854709..ee8651e0 100644
--- a/src/gb/libosmogb.map
+++ b/src/gb/libosmogb.map
@@ -93,7 +93,7 @@ gprs_ns2_ip_connect;
gprs_ns2_ip_connect2;
gprs_ns2_ip_connect_inactive;
gprs_ns2_ip_connect_sns;
-gprs_ns2_ip_vc_sockaddr;
+gprs_ns2_ip_vc_remote;
gprs_ns2_is_frgre_bind;
gprs_ns2_is_ip_bind;
gprs_ns2_ll_str;