diff options
author | Oliver Smith <osmith@sysmocom.de> | 2020-03-06 14:31:47 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2020-03-07 15:07:27 +0100 |
commit | 3c51482e3d4043e79dec892296fbcd9a53d75b00 (patch) | |
tree | 70f9124842df61029109788cc4103630c754532f | |
parent | ef1f327c967d5ee974e039d0da62c79e9ab9184b (diff) |
osmo_ortp: add osmo_rtp_socket_set_dscp()
Related: OS#4438
Change-Id: I41603db8c1286660ad57ac1c78a8fb393a2b080b
-rw-r--r-- | TODO-RELEASE | 1 | ||||
-rw-r--r-- | include/osmocom/trau/osmo_ortp.h | 1 | ||||
-rw-r--r-- | src/trau/osmo_ortp.c | 10 |
3 files changed, 12 insertions, 0 deletions
diff --git a/TODO-RELEASE b/TODO-RELEASE index e2f62ef..e49df7a 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -8,3 +8,4 @@ # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line libosmo-abis API change major: add parameter to struct e1inp_line +libosmo-trau API change add new function osmo_rtp_socket_set_dscp() 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_bind(struct osmo_rtp_socket *rs, const char *ip, int port); 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 @@ int osmo_rtp_socket_set_pt(struct osmo_rtp_socket *rs, int payload_type) 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 |