Change in libosmo-abis[master]: ipaccess: add e1inp_sign_link_name()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Wed Oct 10 12:04:07 UTC 2018


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/11294


Change subject: ipaccess: add e1inp_sign_link_name()
......................................................................

ipaccess: add e1inp_sign_link_name()

This new function returns the IP addresses and ports of an input signal
link's timeslot ("(r=10.1.42.1:55416<->l=10.1.42.123:3003)"). We need
this to display the IP of connected BTS devices in osmo-bsc's VTY
output.

Related: OS#3145
Change-Id: I1e78ee4dc5c9bd10592c090b9a3b35baf61a6d69
---
M include/osmocom/abis/e1_input.h
M src/e1_input.c
2 files changed, 14 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/94/11294/1

diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h
index 79455e1..aee4a70 100644
--- a/include/osmocom/abis/e1_input.h
+++ b/include/osmocom/abis/e1_input.h
@@ -299,6 +299,9 @@
 			      const char *rem_addr, uint16_t rem_port,
 			      uint8_t trx_id);
 
+/* return the IP addresses and ports of the input signal link's timeslot */
+char* e1inp_sign_link_name(const struct e1inp_sign_link *link);
+
 void e1inp_sign_link_destroy(struct e1inp_sign_link *link);
 int e1inp_line_update(struct e1inp_line *line);
 
diff --git a/src/e1_input.c b/src/e1_input.c
index 4717830..4871211 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -42,6 +42,7 @@
 #include <osmocom/core/rate_ctr.h>
 #include <osmocom/core/logging.h>
 #include <osmocom/core/signal.h>
+#include <osmocom/core/socket.h>
 #include <osmocom/abis/e1_input.h>
 
 #define NUM_E1_TS	32
@@ -544,6 +545,16 @@
 	return link;
 }
 
+/*! Return the IP addresses and ports of the input signal link's timeslot.
+ *  This only makes sense for links connected with ipaccess.
+ *  Example: "(r=10.1.42.1:55416<->l=10.1.42.123:3003)" */
+char* e1inp_sign_link_name(const struct e1inp_sign_link *link)
+{
+	if (link)
+		return osmo_sock_get_name(NULL, link->ts->driver.ipaccess.fd.fd);
+	return talloc_strdup(NULL, "<none>");
+}
+
 void e1inp_sign_link_destroy(struct e1inp_sign_link *link)
 {
 	struct msgb *msg;

-- 
To view, visit https://gerrit.osmocom.org/11294
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e78ee4dc5c9bd10592c090b9a3b35baf61a6d69
Gerrit-Change-Number: 11294
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181010/242bfcf4/attachment.htm>


More information about the gerrit-log mailing list