<p>osmith has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11294">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ipaccess: add e1inp_sign_link_name()<br><br>This new function returns the IP addresses and ports of an input signal<br>link's timeslot ("(r=10.1.42.1:55416<->l=10.1.42.123:3003)"). We need<br>this to display the IP of connected BTS devices in osmo-bsc's VTY<br>output.<br><br>Related: OS#3145<br>Change-Id: I1e78ee4dc5c9bd10592c090b9a3b35baf61a6d69<br>---<br>M include/osmocom/abis/e1_input.h<br>M src/e1_input.c<br>2 files changed, 14 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/94/11294/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h</span><br><span>index 79455e1..aee4a70 100644</span><br><span>--- a/include/osmocom/abis/e1_input.h</span><br><span>+++ b/include/osmocom/abis/e1_input.h</span><br><span>@@ -299,6 +299,9 @@</span><br><span>                          const char *rem_addr, uint16_t rem_port,</span><br><span>                             uint8_t trx_id);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* return the IP addresses and ports of the input signal link's timeslot */</span><br><span style="color: hsl(120, 100%, 40%);">+char* e1inp_sign_link_name(const struct e1inp_sign_link *link);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> void e1inp_sign_link_destroy(struct e1inp_sign_link *link);</span><br><span> int e1inp_line_update(struct e1inp_line *line);</span><br><span> </span><br><span>diff --git a/src/e1_input.c b/src/e1_input.c</span><br><span>index 4717830..4871211 100644</span><br><span>--- a/src/e1_input.c</span><br><span>+++ b/src/e1_input.c</span><br><span>@@ -42,6 +42,7 @@</span><br><span> #include <osmocom/core/rate_ctr.h></span><br><span> #include <osmocom/core/logging.h></span><br><span> #include <osmocom/core/signal.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/core/socket.h></span><br><span> #include <osmocom/abis/e1_input.h></span><br><span> </span><br><span> #define NUM_E1_TS     32</span><br><span>@@ -544,6 +545,16 @@</span><br><span>    return link;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/*! Return the IP addresses and ports of the input signal link's timeslot.</span><br><span style="color: hsl(120, 100%, 40%);">+ *  This only makes sense for links connected with ipaccess.</span><br><span style="color: hsl(120, 100%, 40%);">+ *  Example: "(r=10.1.42.1:55416<->l=10.1.42.123:3003)" */</span><br><span style="color: hsl(120, 100%, 40%);">+char* e1inp_sign_link_name(const struct e1inp_sign_link *link)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+    if (link)</span><br><span style="color: hsl(120, 100%, 40%);">+             return osmo_sock_get_name(NULL, link->ts->driver.ipaccess.fd.fd);</span><br><span style="color: hsl(120, 100%, 40%);">+       return talloc_strdup(NULL, "<none>");</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> void e1inp_sign_link_destroy(struct e1inp_sign_link *link)</span><br><span> {</span><br><span>        struct msgb *msg;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11294">change 11294</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/11294"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-abis </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I1e78ee4dc5c9bd10592c090b9a3b35baf61a6d69 </div>
<div style="display:none"> Gerrit-Change-Number: 11294 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>