aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-04-08 19:48:05 +0200
committerHarald Welte <laforge@gnumonks.org>2017-04-08 20:13:14 +0200
commitd0f9bd600c10615d9dbb6701001d491122a29aef (patch)
tree8cb0a22c0179359cbd8127fc65c056f0339608f2 /include/osmocom
parent5fe77a4656f3590c343861ea96bcec18e370e437 (diff)
Add minimal doxygen documentation for stream + datagram modules
We should have doxygen documentation for all libosmo-* APIs. libosmo-netif is currently devoid of any API docs. Let's start with the stream and datagram socket related functions. Change-Id: I589a5e60d9df2b8a65fbaf68f80e3ae0039d8c2a
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/netif/stream.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h
index 819f1ce..254b4c5 100644
--- a/include/osmocom/netif/stream.h
+++ b/include/osmocom/netif/stream.h
@@ -1,9 +1,16 @@
#ifndef _OSMO_STREAM_H_
#define _OSMO_STREAM_H_
+/*! \addtogroup stream
+ * @{
+ */
+
+/*! \brief Access the SCTP PPID from the msgb control buffer */
#define msgb_sctp_ppid(msg) (msg)->cb[3]
+/*! \brief Access the SCTP Stream ID from the msgb control buffer */
#define msgb_sctp_stream(msg) (msg)->cb[4]
+/*! \brief Osmocom Stream Server Link: A server socket listening/accepting */
struct osmo_stream_srv_link;
struct osmo_stream_srv_link *osmo_stream_srv_link_create(void *ctx);
@@ -20,6 +27,8 @@ struct osmo_fd *osmo_stream_srv_link_get_ofd(struct osmo_stream_srv_link *link);
int osmo_stream_srv_link_open(struct osmo_stream_srv_link *link);
void osmo_stream_srv_link_close(struct osmo_stream_srv_link *link);
+/*! \brief Osmocom Stream Server: Single connection accept()ed via \ref
+ * osmo_stream_srv_link */
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);
@@ -33,6 +42,7 @@ void osmo_stream_srv_set_data(struct osmo_stream_srv *conn, void *data);
void osmo_stream_srv_send(struct osmo_stream_srv *conn, struct msgb *msg);
int osmo_stream_srv_recv(struct osmo_stream_srv *conn, struct msgb *msg);
+/*! \brief Osmocom Stream Client: Single client connection */
struct osmo_stream_cli;
void osmo_stream_cli_set_addr(struct osmo_stream_cli *cli, const char *addr);
@@ -56,4 +66,6 @@ void osmo_stream_cli_close(struct osmo_stream_cli *cli);
void osmo_stream_cli_send(struct osmo_stream_cli *cli, struct msgb *msg);
int osmo_stream_cli_recv(struct osmo_stream_cli *conn, struct msgb *msg);
+/*! @} */
+
#endif