Unverified 提交 0ef0a689 authored 作者: José Luis Millán's avatar José Luis Millán 提交者: GitHub

RTCP: Adjust maximum compound packet size (#934)

* RTCP: Adjust maximum compound packet size

Consider IP and transport header sizes on the MTU.

* Update CHANGELOG
上级 397e216a
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
### NEXT ### NEXT
* Transport: Remove duplicate call to method (PR #931). * Transport: Remove duplicate call to method (PR #931).
* RTCP: Adjust maximum compound packet size (PR #934).
### 3.10.12 ### 3.10.12
......
...@@ -17,11 +17,14 @@ namespace RTC ...@@ -17,11 +17,14 @@ namespace RTC
class CompoundPacket class CompoundPacket
{ {
public: public:
// Maximum size for a CompundPacket, leaving free space for encryption. // Maximum size for a CompundPacket.
// * IPv4|Ipv6 header size: 20|40 bytes. IPv6 considered.
// * UDP|TCP header size: 8|20 bytes. TCP considered.
// * SRTP Encryption: 148 bytes.
// SRTP_MAX_TRAILER_LEN+4 is the maximum number of octects that will be // SRTP_MAX_TRAILER_LEN+4 is the maximum number of octects that will be
// added to an RTCP packet by srtp_protect_rtcp(). // added to an RTCP packet by srtp_protect_rtcp().
// srtp.h: SRTP_MAX_TRAILER_LEN (SRTP_MAX_TAG_LEN + SRTP_MAX_MKI_LEN) // srtp.h: SRTP_MAX_TRAILER_LEN (SRTP_MAX_TAG_LEN + SRTP_MAX_MKI_LEN)
constexpr static size_t MaxSize{ RTC::MtuSize - 148u }; constexpr static size_t MaxSize{ RTC::MtuSize - 40u - 20u - 148u };
public: public:
CompoundPacket() = default; CompoundPacket() = default;
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论