aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/netif/stream.h1
-rw-r--r--src/stream.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h
index 34a3b37..ed399bf 100644
--- a/include/osmocom/netif/stream.h
+++ b/include/osmocom/netif/stream.h
@@ -20,6 +20,7 @@ struct osmo_stream_srv;
struct osmo_stream_srv *osmo_stream_srv_create(void *ctx, struct osmo_stream_srv_link *link, int fd, int (*cb)(struct osmo_stream_srv *conn), int (*closed_cb)(struct osmo_stream_srv *conn), void *data);
void *osmo_stream_srv_get_data(struct osmo_stream_srv *conn);
+struct osmo_stream_srv_link *osmo_stream_srv_get_master(struct osmo_stream_srv *conn);
struct osmo_fd *osmo_stream_srv_get_ofd(struct osmo_stream_srv *srv);
void osmo_stream_srv_destroy(struct osmo_stream_srv *conn);
diff --git a/src/stream.c b/src/stream.c
index c72de3c..a455d84 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -523,6 +523,11 @@ osmo_stream_srv_get_ofd(struct osmo_stream_srv *link)
return &link->ofd;
}
+struct osmo_stream_srv_link *osmo_stream_srv_get_master(struct osmo_stream_srv *conn)
+{
+ return conn->srv;
+}
+
void osmo_stream_srv_destroy(struct osmo_stream_srv *conn)
{
close(conn->ofd.fd);