Change in libosmo-abis[master]: osmo_ortp: add osmo_rtp_socket_set_dscp()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Fri Mar 6 14:33:21 UTC 2020


osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/17400 )


Change subject: osmo_ortp: add osmo_rtp_socket_set_dscp()
......................................................................

osmo_ortp: add osmo_rtp_socket_set_dscp()

Related: OS#4438
Change-Id: I41603db8c1286660ad57ac1c78a8fb393a2b080b
---
M include/osmocom/trau/osmo_ortp.h
M src/trau/osmo_ortp.c
2 files changed, 11 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/00/17400/1

diff --git a/include/osmocom/trau/osmo_ortp.h b/include/osmocom/trau/osmo_ortp.h
index 54afcf0..1e0720c 100644
--- a/include/osmocom/trau/osmo_ortp.h
+++ b/include/osmocom/trau/osmo_ortp.h
@@ -76,6 +76,7 @@
 int osmo_rtp_socket_connect(struct osmo_rtp_socket *rs, const char *ip, uint16_t port);
 int osmo_rtp_socket_autoconnect(struct osmo_rtp_socket *rs);
 int osmo_rtp_socket_set_pt(struct osmo_rtp_socket *rs, int payload_type);
+int osmo_rtp_socket_set_dscp(struct osmo_rtp_socket *rs, int dscp);
 int osmo_rtp_socket_free(struct osmo_rtp_socket *rs);
 int osmo_rtp_skipped_frame(struct osmo_rtp_socket *rs, unsigned int duration);
 int osmo_rtp_send_frame(struct osmo_rtp_socket *rs, const uint8_t *payload,
diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c
index 1d652cb..8b81e37 100644
--- a/src/trau/osmo_ortp.c
+++ b/src/trau/osmo_ortp.c
@@ -578,6 +578,16 @@
 	return rc;
 }
 
+/*! \brief Set the DSCP (Differentiated Services Code Point) for outgoing RTP packets
+ *  \param[in] rs OsmoRTP socket
+ *  \param[in] dscp DSCP value
+ *  \returns 0 on success, < 0 otherwise
+ */
+int osmo_rtp_socket_set_dscp(struct osmo_rtp_socket *rs, int dscp)
+{
+	return rtp_session_set_dscp(rs->sess, dscp);
+}
+
 /*! \brief completely close the RTP socket and release all resources
  *  \param[in] rs OsmoRTP socket to be released
  *  \returns 0 on success

-- 
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/17400
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I41603db8c1286660ad57ac1c78a8fb393a2b080b
Gerrit-Change-Number: 17400
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200306/e9a6bfe8/attachment.htm>


More information about the gerrit-log mailing list