FreeCalypso > hg > themwi-rtp-lib
view src/set_dscp_prio.c @ 42:334d883b96ba
twrtp_jibuf_create: make config argument const
While this config structure is not a constant in the mathematical
sense of the term (it is expected that vty config changes may happen
while twjit instance is alive), twjit functions never write to it,
only read, hence it is 'const' in the not-quite-mathematical C-standard
sense.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 20 Dec 2024 22:47:20 +0000 |
parents | c0ce22777694 |
children |
line wrap: on
line source
/* * Wrapper functions for setting DSCP and socket priority * on both RTP and RTCP sockets. */ #include <stdint.h> #include <osmocom/core/socket.h> #include <themwi/rtp/endp.h> int twrtp_endp_set_dscp(struct twrtp_endp *endp, uint8_t dscp) { int rc; rc = osmo_sock_set_dscp(endp->rtp_fd, dscp); if (rc < 0) return rc; return osmo_sock_set_dscp(endp->rtcp_fd, dscp); } int twrtp_endp_set_socket_prio(struct twrtp_endp *endp, int prio) { int rc; rc = osmo_sock_set_priority(endp->rtp_fd, prio); if (rc < 0) return rc; return osmo_sock_set_priority(endp->rtcp_fd, prio); }