Change in libosmo-netif[master]: stream: Document osmo_stream_srv_recv() SCTP specialties
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/29550 ) Change subject: stream: Document osmo_stream_srv_recv() SCTP specialties ...................................................................... stream: Document osmo_stream_srv_recv() SCTP specialties Change-Id: I47b066f26e63afd4bdb135f822667d1cd9479920 --- M src/stream.c 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/50/29550/1 diff --git a/src/stream.c b/src/stream.c index 38d24fe..68de30c 100644 --- a/src/stream.c +++ b/src/stream.c @@ -1524,6 +1524,16 @@ * \param[in] conn Stream Server from which to receive * \param msg pre-allocate message buffer to which received data is appended * \returns number of bytes read, negative on error. + * + * If conn is an SCTP connection, additional specific considerations shall be taken: + * - msg->cb is always filled with SCTP ppid, and SCTP stream values, see msgb_sctp_*() APIs. + * - If an SCTP notification was received when reading from the SCTP socket, + * msgb_sctp_msg_flags(msg) will contain bit flag + * OSMO_STREAM_SCTP_MSG_FLAGS_NOTIFICATION set, and he msgb will + * contain a "union sctp_notification" instead of user data. In this case the + * return code will be either 0 (if conn is considered dead after the + * notification) or -EAGAIN (if conn is considered still alive after the + * notification) resembling the standard recv() API. */ int osmo_stream_srv_recv(struct osmo_stream_srv *conn, struct msgb *msg) { -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/29550 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I47b066f26e63afd4bdb135f822667d1cd9479920 Gerrit-Change-Number: 29550 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
pespin