webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Secure RTCP functions are used to protect RTCP traffic. More...
Functions | |
srtp_err_status_t | srtp_protect_rtcp (srtp_t ctx, void *rtcp_hdr, int *pkt_octet_len) |
srtp_protect_rtcp() is the Secure RTCP sender-side packet processing function. More... | |
srtp_err_status_t | srtp_unprotect_rtcp (srtp_t ctx, void *srtcp_hdr, int *pkt_octet_len) |
srtp_unprotect_rtcp() is the Secure RTCP receiver-side packet processing function. More... | |
Secure RTCP functions are used to protect RTCP traffic.
RTCP is the control protocol for RTP. libSRTP protects RTCP traffic in much the same way as it does RTP traffic. The function srtp_protect_rtcp() applies cryptographic protections to outbound RTCP packets, and srtp_unprotect_rtcp() verifies the protections on inbound RTCP packets.
A note on the naming convention: srtp_protect_rtcp() has an srtp_t as its first argument, and thus has `srtp_' as its prefix. The trailing `_rtcp' indicates the protocol on which it acts.
srtp_err_status_t srtp_protect_rtcp | ( | srtp_t | ctx, |
void * | rtcp_hdr, | ||
int * | pkt_octet_len | ||
) |
srtp_protect_rtcp() is the Secure RTCP sender-side packet processing function.
The function call srtp_protect_rtcp(ctx, rtp_hdr, len_ptr) applies SRTCP protection to the RTCP packet rtcp_hdr (which has length *len_ptr) using the SRTP session context ctx. If srtp_err_status_ok is returned, then rtp_hdr points to the resulting SRTCP packet and *len_ptr is the number of octets in that packet; otherwise, no assumptions should be made about the value of either data elements.
ctx | is the SRTP context to use in processing the packet. |
rtcp_hdr | is a pointer to the RTCP packet (before the call); after the function returns, it points to the srtp packet. |
pkt_octet_len | is a pointer to the length in octets of the complete RTCP packet (header and body) before the function call, and of the complete SRTCP packet after the call, if srtp_err_status_ok was returned. Otherwise, the value of the data to which it points is undefined. |
srtp_err_status_t srtp_unprotect_rtcp | ( | srtp_t | ctx, |
void * | srtcp_hdr, | ||
int * | pkt_octet_len | ||
) |
srtp_unprotect_rtcp() is the Secure RTCP receiver-side packet processing function.
The function call srtp_unprotect_rtcp(ctx, srtp_hdr, len_ptr) verifies the Secure RTCP protection of the SRTCP packet pointed to by srtcp_hdr (which has length *len_ptr), using the SRTP session context ctx. If srtp_err_status_ok is returned, then srtcp_hdr points to the resulting RTCP packet and *len_ptr is the number of octets in that packet; otherwise, no assumptions should be made about the value of either data elements.
ctx | is a pointer to the srtp_t which applies to the particular packet. |
srtcp_hdr | is a pointer to the header of the SRTCP packet (before the call). After the function returns, it points to the rtp packet if srtp_err_status_ok was returned; otherwise, the value of the data to which it points is undefined. |
pkt_octet_len | is a pointer to the length in octets of the complete SRTCP packet (header and body) before the function call, and of the complete rtp packet after the call, if srtp_err_status_ok was returned. Otherwise, the value of the data to which it points is undefined. |