pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/36237?usp=email )
Change subject: stream: Add osmo_stream_*_get_name() APIs
......................................................................
stream: Add osmo_stream_*_get_name() APIs
This allows users to retrieve a previously set name.
Change-Id: If5054d3c207f8f5d58a448f1e58266ad9c4386dd
---
M TODO-RELEASE
M include/osmocom/netif/stream.h
M src/stream_cli.c
M src/stream_srv.c
4 files changed, 42 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 6642459..111f0c5 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -13,3 +13,4 @@
libosmocore >1.9.0 use osmo_iofd_get_ioops()
libosmo-netif added osmo_stream_srv_get_sockname()
libosmo-netif update-dependency libosmocore > 1.9.0 required for I89eb519b22d21011d61a7855b2364bc3c295df82
+libosmo-netif ADD osmo_stream_srv_link_get_name(), osmo_stream_srv_get_name(), osmo_stream_cli_get_name()
\ No newline at end of file
diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h
index 2e6aa97..fe4dd77 100644
--- a/include/osmocom/netif/stream.h
+++ b/include/osmocom/netif/stream.h
@@ -26,6 +26,7 @@
void osmo_stream_srv_link_destroy(struct osmo_stream_srv_link *link);
void osmo_stream_srv_link_set_name(struct osmo_stream_srv_link *link, const char *name);
+const char *osmo_stream_srv_link_get_name(const struct osmo_stream_srv_link *link);
void osmo_stream_srv_link_set_nodelay(struct osmo_stream_srv_link *link, bool nodelay);
void osmo_stream_srv_link_set_addr(struct osmo_stream_srv_link *link, const char *addr);
int osmo_stream_srv_link_set_addrs(struct osmo_stream_srv_link *link, const char **addr, size_t addrcnt);
@@ -60,6 +61,7 @@
struct osmo_stream_srv *osmo_stream_srv_create(void *ctx, struct osmo_stream_srv_link *link, int fd, int (*read_cb)(struct osmo_stream_srv *conn), int (*closed_cb)(struct osmo_stream_srv *conn), void *data);
struct osmo_stream_srv *osmo_stream_srv_create2(void *ctx, struct osmo_stream_srv_link *link, int fd, void *data);
void osmo_stream_srv_set_name(struct osmo_stream_srv *conn, const char *name);
+const char *osmo_stream_srv_get_name(const struct osmo_stream_srv *conn);
void osmo_stream_srv_set_read_cb(struct osmo_stream_srv *conn, int (*read_cb)(struct osmo_stream_srv *conn, struct msgb *msg));
void osmo_stream_srv_set_closed_cb(struct osmo_stream_srv *conn, int (*closed_cb)(struct osmo_stream_srv *conn));
void *osmo_stream_srv_get_data(struct osmo_stream_srv *conn);
@@ -84,6 +86,7 @@
struct osmo_stream_cli;
void osmo_stream_cli_set_name(struct osmo_stream_cli *cli, const char *name);
+const char *osmo_stream_cli_get_name(const struct osmo_stream_cli *cli);
void osmo_stream_cli_set_nodelay(struct osmo_stream_cli *cli, bool nodelay);
void osmo_stream_cli_set_addr(struct osmo_stream_cli *cli, const char *addr);
int osmo_stream_cli_set_addrs(struct osmo_stream_cli *cli, const char **addr, size_t addrcnt);
diff --git a/src/stream_cli.c b/src/stream_cli.c
index 2f5339c..46ddc89 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -528,6 +528,15 @@
osmo_iofd_set_name(cli->iofd, name);
}
+/*! \brief Retrieve name previously set on the cli object (see osmo_stream_cli_set_name())
+ * \param[in] cli stream_cli whose name is to be retrieved
+ * \returns The name to be set on cli; NULL if never set
+ */
+const char *osmo_stream_cli_get_name(const struct osmo_stream_cli *cli)
+{
+ return cli->name;
+}
+
/*! \brief Set the remote address to which we connect
* \param[in] cli Stream Client to modify
* \param[in] addr Remote IP address
diff --git a/src/stream_srv.c b/src/stream_srv.c
index 95a2cbb..72c5a81 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -206,6 +206,15 @@
osmo_talloc_replace_string(link, &link->name, name);
}
+/*! \brief Retrieve name previously set on the srv_link object (see osmo_stream_srv_link_set_name())
+ * \param[in] link server link whose name is to be retrieved
+ * \returns The name to be set on link; NULL if never set
+ */
+const char *osmo_stream_srv_link_get_name(const struct osmo_stream_srv_link *link)
+{
+ return link->name;
+}
+
/*! \brief Set the NODELAY socket option to avoid Nagle-like behavior
* Setting this to nodelay=true will automatically set the NODELAY
* socket option on any socket established via this server link, before
@@ -837,6 +846,15 @@
osmo_iofd_set_name(conn->iofd, name);
}
+/*! \brief Retrieve name previously set on the srv object (see osmo_stream_srv_set_name())
+ * \param[in] conn server whose name is to be retrieved
+ * \returns The name to be set on conn; NULL if never set
+ */
+const char *osmo_stream_srv_get_name(const struct osmo_stream_srv *conn)
+{
+ return conn->name;
+}
+
/*! \brief Set the call-back function when data was read from the stream server socket
* Only for osmo_stream_srv created with osmo_stream_srv_create2()
* \param[in] conn Stream Server to modify
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36237?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: If5054d3c207f8f5d58a448f1e58266ad9c4386dd
Gerrit-Change-Number: 36237
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: laforge.
Hello Jenkins Builder, fixeria, osmith,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36250?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: mgw_fsm: Add some OSMO_ASSERT() to ensure only CS maps passed
......................................................................
mgw_fsm: Add some OSMO_ASSERT() to ensure only CS maps passed
The mgw_fsm only supports CS RABs in the CS domain; let's add some
ASSERTs to make sure the impossible doesn't happen.
Change-Id: I264c4b3da17b6f59ebcdd02031318402a483041a
---
M src/osmo-hnbgw/mgw_fsm.c
1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/50/36250/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36250?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I264c4b3da17b6f59ebcdd02031318402a483041a
Gerrit-Change-Number: 36250
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
Attention is currently required from: osmith, pespin.
Hello Jenkins Builder, osmith, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36209?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Code-Review+1 by osmith, Code-Review+1 by pespin, Verified+1 by Jenkins Builder
Change subject: stats: Add per-hnb paging:{cs,ps}:attempted counter
......................................................................
stats: Add per-hnb paging:{cs,ps}:attempted counter
Adding counters for number of paging succeeded is much harder,
as we currently don't parse connection-oriented DL RANAP and/or any
L3 NAS in it.
Change-Id: I7648caa410dba8474d57121a8128579ba200b18f
---
M include/osmocom/hnbgw/hnbgw.h
M src/osmo-hnbgw/hnbgw.c
M src/osmo-hnbgw/hnbgw_cn.c
3 files changed, 26 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/09/36209/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36209?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I7648caa410dba8474d57121a8128579ba200b18f
Gerrit-Change-Number: 36209
Gerrit-PatchSet: 5
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: laforge.
Hello Jenkins Builder, osmith, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36210?usp=email
to look at the new patch set (#5).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: cosmetic: align downlink RANAP unitdata function names with uplink
......................................................................
cosmetic: align downlink RANAP unitdata function names with uplink
In uplink we use *ranap_rx_udt_ul*, so let's use the same naming
pattern for processing dowlink unit-data messages to make things more
consistent. Also, make sure udt is always part of functions that only
handle unitdata - not to be confused with connection-oriented messages.
Change-Id: I1792e4c2cdce145ae906c181898163bcda36328d
---
M src/osmo-hnbgw/hnbgw_cn.c
1 file changed, 26 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/10/36210/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36210?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I1792e4c2cdce145ae906c181898163bcda36328d
Gerrit-Change-Number: 36210
Gerrit-PatchSet: 5
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset