mediasoup 3.20.0 → 3.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node/lib/Consumer.d.ts.map +1 -1
- package/node/lib/Consumer.js +5 -4
- package/node/lib/DataConsumer.d.ts +2 -3
- package/node/lib/DataConsumer.d.ts.map +1 -1
- package/node/lib/DataConsumer.js +10 -7
- package/node/lib/DataConsumerTypes.d.ts +5 -4
- package/node/lib/DataConsumerTypes.d.ts.map +1 -1
- package/node/lib/DataProducer.d.ts.map +1 -1
- package/node/lib/DataProducer.js +2 -1
- package/node/lib/PipeTransport.d.ts.map +1 -1
- package/node/lib/PipeTransport.js +5 -4
- package/node/lib/PlainTransport.d.ts.map +1 -1
- package/node/lib/PlainTransport.js +6 -5
- package/node/lib/Producer.d.ts.map +1 -1
- package/node/lib/Producer.js +4 -3
- package/node/lib/Router.js +1 -1
- package/node/lib/WebRtcTransport.d.ts.map +1 -1
- package/node/lib/WebRtcTransport.js +6 -5
- package/node/lib/fbs/consumer/degrade-request.d.ts +30 -0
- package/node/lib/fbs/consumer/degrade-request.d.ts.map +1 -0
- package/node/lib/fbs/consumer/degrade-request.js +124 -0
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts +24 -0
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts.map +1 -0
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.js +102 -0
- package/node/lib/fbs/data-consumer/send-response.d.ts +21 -0
- package/node/lib/fbs/data-consumer/send-response.d.ts.map +1 -0
- package/node/lib/fbs/data-consumer/send-response.js +91 -0
- package/node/lib/fbs/data-consumer.d.ts +1 -0
- package/node/lib/fbs/data-consumer.d.ts.map +1 -1
- package/node/lib/fbs/data-consumer.js +4 -1
- package/node/lib/fbs/producer/degrade-request.d.ts +30 -0
- package/node/lib/fbs/producer/degrade-request.d.ts.map +1 -0
- package/node/lib/fbs/producer/degrade-request.js +124 -0
- package/node/lib/fbs/response/body.d.ts +7 -5
- package/node/lib/fbs/response/body.d.ts.map +1 -1
- package/node/lib/fbs/response/body.js +7 -3
- package/node/lib/fbs/response/response.d.ts +3 -2
- package/node/lib/fbs/response/response.d.ts.map +1 -1
- package/node/lib/fbs/sctp-parameters/num-sctp-streams.d.ts.map +1 -1
- package/node/lib/fbs/sctp-parameters/num-sctp-streams.js +5 -5
- package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.d.ts +24 -0
- package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.d.ts.map +1 -0
- package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.js +102 -0
- package/node/lib/fbs/transport/sctp-negotiated-options-notification.d.ts +24 -0
- package/node/lib/fbs/transport/sctp-negotiated-options-notification.d.ts.map +1 -0
- package/node/lib/fbs/transport/sctp-negotiated-options-notification.js +102 -0
- package/node/lib/fbs/worker/close-notification.d.ts +18 -0
- package/node/lib/fbs/worker/close-notification.d.ts.map +1 -0
- package/node/lib/fbs/worker/close-notification.js +78 -0
- package/node/lib/fbs/worker/close-request.d.ts +18 -0
- package/node/lib/fbs/worker/close-request.d.ts.map +1 -0
- package/node/lib/fbs/worker/close-request.js +78 -0
- package/node/lib/fbs/worker/close-worker-notification.d.ts +18 -0
- package/node/lib/fbs/worker/close-worker-notification.d.ts.map +1 -0
- package/node/lib/fbs/worker/close-worker-notification.js +78 -0
- package/node/lib/sctpParametersTypes.d.ts +23 -0
- package/node/lib/sctpParametersTypes.d.ts.map +1 -1
- package/node/lib/test/test-Consumer.js +194 -0
- package/node/lib/test/test-DataConsumer.js +6 -0
- package/node/lib/test/test-Router.js +11 -0
- package/node/lib/test/test-werift-sctp.js +7 -0
- package/npm-scripts.mjs +2 -2
- package/package.json +7 -6
- package/worker/Makefile +5 -1
- package/worker/deps/libwebrtc/meson.build +5 -1
- package/worker/fbs/dataConsumer.fbs +4 -0
- package/worker/fbs/response.fbs +1 -0
- package/worker/fuzzer/src/RTC/RTP/FuzzerPacket.cpp +2 -2
- package/worker/include/Channel/ChannelMessageRegistrator.hpp +4 -3
- package/worker/include/Channel/ChannelNotification.hpp +0 -4
- package/worker/include/Channel/ChannelRequest.hpp +3 -4
- package/worker/include/DepLibSRTP.hpp +2 -2
- package/worker/include/RTC/ActiveSpeakerObserver.hpp +2 -2
- package/worker/include/RTC/AudioLevelObserver.hpp +2 -2
- package/worker/include/RTC/Consumer.hpp +1 -1
- package/worker/include/RTC/DataConsumer.hpp +2 -2
- package/worker/include/RTC/DtlsTransport.hpp +4 -4
- package/worker/include/RTC/ICE/IceServer.hpp +2 -2
- package/worker/include/RTC/ICE/StunPacket.hpp +34 -34
- package/worker/include/RTC/KeyFrameRequestManager.hpp +3 -3
- package/worker/include/RTC/Parameters.hpp +2 -2
- package/worker/include/RTC/PipeConsumer.hpp +6 -5
- package/worker/include/RTC/PlainTransport.hpp +0 -1
- package/worker/include/RTC/PortManager.hpp +92 -12
- package/worker/include/RTC/Producer.hpp +7 -6
- package/worker/include/RTC/RTCP/Feedback.hpp +1 -2
- package/worker/include/RTC/RTCP/FeedbackRtpTransport.hpp +2 -2
- package/worker/include/RTC/RTCP/Packet.hpp +2 -2
- package/worker/include/RTC/RTCP/Sdes.hpp +1 -1
- package/worker/include/RTC/RTP/Codecs/DependencyDescriptor.hpp +2 -1
- package/worker/include/RTC/RTP/Packet.hpp +57 -57
- package/worker/include/RTC/RTP/ProbationGenerator.hpp +2 -2
- package/worker/include/RTC/RTP/SharedPacket.hpp +4 -4
- package/worker/include/RTC/Router.hpp +12 -11
- package/worker/include/RTC/RtcLogger.hpp +2 -2
- package/worker/include/RTC/RtpDictionaries.hpp +6 -6
- package/worker/include/RTC/RtpListener.hpp +4 -4
- package/worker/include/RTC/SCTP/association/Association.hpp +13 -13
- package/worker/include/RTC/SCTP/association/HeartbeatHandler.hpp +2 -2
- package/worker/include/RTC/SCTP/association/NegotiatedCapabilities.hpp +2 -2
- package/worker/include/RTC/SCTP/association/PacketSender.hpp +3 -3
- package/worker/include/RTC/SCTP/association/StateCookie.hpp +9 -9
- package/worker/include/RTC/SCTP/association/StreamResetHandler.hpp +4 -4
- package/worker/include/RTC/SCTP/association/TransmissionControlBlock.hpp +24 -24
- package/worker/include/RTC/SCTP/association/TransmissionControlBlockContextInterface.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/Chunk.hpp +86 -86
- package/worker/include/RTC/SCTP/packet/ErrorCause.hpp +18 -18
- package/worker/include/RTC/SCTP/packet/Packet.hpp +33 -33
- package/worker/include/RTC/SCTP/packet/Parameter.hpp +24 -24
- package/worker/include/RTC/SCTP/packet/TLV.hpp +13 -13
- package/worker/include/RTC/SCTP/packet/UserData.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/chunks/AbortAssociationChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/AnyDataChunk.hpp +9 -9
- package/worker/include/RTC/SCTP/packet/chunks/AnyForwardTsnChunk.hpp +3 -3
- package/worker/include/RTC/SCTP/packet/chunks/CookieAckChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/CookieEchoChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/DataChunk.hpp +11 -11
- package/worker/include/RTC/SCTP/packet/chunks/ForwardTsnChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/HeartbeatAckChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/HeartbeatRequestChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/IDataChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/IForwardTsnChunk.hpp +7 -7
- package/worker/include/RTC/SCTP/packet/chunks/InitAckChunk.hpp +10 -10
- package/worker/include/RTC/SCTP/packet/chunks/InitChunk.hpp +8 -8
- package/worker/include/RTC/SCTP/packet/chunks/OperationErrorChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/ReConfigChunk.hpp +10 -10
- package/worker/include/RTC/SCTP/packet/chunks/SackChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownAckChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownCompleteChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/UnknownChunk.hpp +2 -2
- package/worker/include/RTC/SCTP/packet/errorCauses/CookieReceivedWhileShuttingDownErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/InvalidMandatoryParameterErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/InvalidStreamIdentifierErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/MissingMandatoryParameterErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/NoUserDataErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/OutOfResourceErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/ProtocolViolationErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/RestartOfAnAssociationWithNewAddressesErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/StaleCookieErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/UnknownErrorCause.hpp +2 -2
- package/worker/include/RTC/SCTP/packet/errorCauses/UnrecognizedChunkTypeErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/UnrecognizedParametersErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/UnresolvableAddressErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/UserInitiatedAbortErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/AddIncomingStreamsRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/AddOutgoingStreamsRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/CookiePreservativeParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/ForwardTsnSupportedParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/HeartbeatInfoParameter.hpp +3 -3
- package/worker/include/RTC/SCTP/packet/parameters/IPv4AddressParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/IPv6AddressParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/IncomingSsnResetRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/OutgoingSsnResetRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/ReconfigurationResponseParameter.hpp +7 -7
- package/worker/include/RTC/SCTP/packet/parameters/SsnTsnResetRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/StateCookieParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/SupportedAddressTypesParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/SupportedExtensionsParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/UnknownParameter.hpp +2 -2
- package/worker/include/RTC/SCTP/packet/parameters/UnrecognizedParameterParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/ZeroChecksumAcceptableParameter.hpp +7 -7
- package/worker/include/RTC/SCTP/public/AssociationInterface.hpp +7 -7
- package/worker/include/RTC/SCTP/public/AssociationListenerInterface.hpp +26 -26
- package/worker/include/RTC/SCTP/public/AssociationMetrics.hpp +7 -7
- package/worker/include/RTC/SCTP/public/Message.hpp +1 -1
- package/worker/include/RTC/SCTP/public/SctpOptions.hpp +4 -4
- package/worker/include/RTC/SCTP/public/SctpTypes.hpp +10 -10
- package/worker/include/RTC/SCTP/rx/DataTracker.hpp +1 -1
- package/worker/include/RTC/SCTP/rx/ReassemblyStreamsInterface.hpp +1 -1
- package/worker/include/RTC/SCTP/tx/OutstandingData.hpp +39 -39
- package/worker/include/RTC/SCTP/tx/RetransmissionErrorCounter.hpp +1 -1
- package/worker/include/RTC/SCTP/tx/RetransmissionQueue.hpp +14 -14
- package/worker/include/RTC/SCTP/tx/RoundRobinSendQueue.hpp +1 -1
- package/worker/include/RTC/SctpListener.hpp +2 -2
- package/worker/include/RTC/SimulcastConsumer.hpp +2 -1
- package/worker/include/RTC/TcpServer.hpp +3 -2
- package/worker/include/RTC/Transport.hpp +8 -8
- package/worker/include/RTC/UdpSocket.hpp +3 -2
- package/worker/include/RTC/WebRtcServer.hpp +4 -5
- package/worker/include/RTC/WebRtcTransport.hpp +2 -2
- package/worker/include/Settings.hpp +3 -3
- package/worker/include/Worker.hpp +3 -3
- package/worker/include/handles/TcpServerHandle.hpp +2 -2
- package/worker/meson.build +9 -4
- package/worker/mocks/include/Channel/MockChannelMessageRegistrator.hpp +4 -3
- package/worker/src/Channel/ChannelNotification.cpp +5 -4
- package/worker/src/Channel/ChannelRequest.cpp +9 -6
- package/worker/src/DepLibSRTP.cpp +1 -1
- package/worker/src/RTC/AudioLevelObserver.cpp +2 -2
- package/worker/src/RTC/DataConsumer.cpp +13 -3
- package/worker/src/RTC/DataProducer.cpp +1 -1
- package/worker/src/RTC/DtlsTransport.cpp +3 -3
- package/worker/src/RTC/ICE/IceServer.cpp +1 -1
- package/worker/src/RTC/ICE/StunPacket.cpp +77 -77
- package/worker/src/RTC/PipeTransport.cpp +5 -4
- package/worker/src/RTC/PlainTransport.cpp +9 -8
- package/worker/src/RTC/PortManager.cpp +174 -114
- package/worker/src/RTC/Producer.cpp +0 -1
- package/worker/src/RTC/RTCP/Feedback.cpp +6 -6
- package/worker/src/RTC/RTCP/FeedbackPs.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackPsAfb.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackPsPli.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackPsRemb.cpp +2 -2
- package/worker/src/RTC/RTCP/FeedbackRtp.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackRtpSrReq.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackRtpTransport.cpp +2 -2
- package/worker/src/RTC/RTCP/Packet.cpp +2 -2
- package/worker/src/RTC/RTCP/Sdes.cpp +1 -1
- package/worker/src/RTC/RTP/Codecs/DependencyDescriptor.cpp +2 -1
- package/worker/src/RTC/RTP/Packet.cpp +68 -68
- package/worker/src/RTC/RTP/ProbationGenerator.cpp +3 -3
- package/worker/src/RTC/RTP/RtpStreamRecv.cpp +3 -3
- package/worker/src/RTC/RTP/RtxStream.cpp +2 -2
- package/worker/src/RTC/RTP/SharedPacket.cpp +4 -4
- package/worker/src/RTC/Router.cpp +5 -5
- package/worker/src/RTC/RtcLogger.cpp +1 -1
- package/worker/src/RTC/RtpDictionaries/RtpCodecMimeType.cpp +4 -4
- package/worker/src/RTC/RtpDictionaries/RtpParameters.cpp +2 -3
- package/worker/src/RTC/SCTP/association/Association.cpp +100 -97
- package/worker/src/RTC/SCTP/association/HeartbeatHandler.cpp +6 -6
- package/worker/src/RTC/SCTP/association/NegotiatedCapabilities.cpp +3 -3
- package/worker/src/RTC/SCTP/association/PacketSender.cpp +1 -1
- package/worker/src/RTC/SCTP/association/StreamResetHandler.cpp +2 -2
- package/worker/src/RTC/SCTP/association/TransmissionControlBlock.cpp +5 -5
- package/worker/src/RTC/SCTP/packet/Chunk.cpp +52 -52
- package/worker/src/RTC/SCTP/packet/ErrorCause.cpp +14 -14
- package/worker/src/RTC/SCTP/packet/Packet.cpp +17 -17
- package/worker/src/RTC/SCTP/packet/Parameter.cpp +17 -17
- package/worker/src/RTC/SCTP/packet/TLV.cpp +8 -8
- package/worker/src/RTC/SCTP/packet/chunks/AbortAssociationChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/CookieAckChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/CookieEchoChunk.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/chunks/DataChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/ForwardTsnChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/HeartbeatAckChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/HeartbeatRequestChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/IDataChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/IForwardTsnChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/InitAckChunk.cpp +4 -4
- package/worker/src/RTC/SCTP/packet/chunks/InitChunk.cpp +4 -4
- package/worker/src/RTC/SCTP/packet/chunks/OperationErrorChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/ReConfigChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/SackChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownAckChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownCompleteChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/CookieReceivedWhileShuttingDownErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/InvalidMandatoryParameterErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/InvalidStreamIdentifierErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/MissingMandatoryParameterErrorCause.cpp +4 -4
- package/worker/src/RTC/SCTP/packet/errorCauses/NoUserDataErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/OutOfResourceErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/ProtocolViolationErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/RestartOfAnAssociationWithNewAddressesErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/StaleCookieErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/UnrecognizedChunkTypeErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/UnrecognizedParametersErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/UnresolvableAddressErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/UserInitiatedAbortErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/AddIncomingStreamsRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/AddOutgoingStreamsRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/CookiePreservativeParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/ForwardTsnSupportedParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/HeartbeatInfoParameter.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/IPv4AddressParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/IPv6AddressParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/IncomingSsnResetRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/OutgoingSsnResetRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/ReconfigurationResponseParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/parameters/SsnTsnResetRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/StateCookieParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/parameters/SupportedAddressTypesParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/parameters/SupportedExtensionsParameter.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/UnrecognizedParameterParameter.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/ZeroChecksumAcceptableParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/rx/InterleavedReassemblyStreams.cpp +1 -0
- package/worker/src/RTC/SCTP/rx/TraditionalReassemblyStreams.cpp +1 -0
- package/worker/src/RTC/SCTP/tx/OutstandingData.cpp +8 -8
- package/worker/src/RTC/SCTP/tx/RoundRobinSendQueue.cpp +1 -1
- package/worker/src/RTC/SvcConsumer.cpp +6 -2
- package/worker/src/RTC/TcpServer.cpp +4 -4
- package/worker/src/RTC/Transport.cpp +42 -19
- package/worker/src/RTC/UdpSocket.cpp +4 -4
- package/worker/src/RTC/WebRtcServer.cpp +8 -8
- package/worker/src/RTC/WebRtcTransport.cpp +9 -8
- package/worker/src/Settings.cpp +2 -2
- package/worker/src/lib.cpp +1 -2
- package/worker/subprojects/packagefiles/ankerl-unordered-dense/meson.build +5 -0
- package/worker/subprojects/unordered-dense.wrap +9 -0
- package/worker/tasks.py +293 -196
- package/worker/test/src/RTC/ICE/TestStunPacket.cpp +22 -22
- package/worker/test/src/RTC/ICE/iceCommon.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpEcn.cpp +8 -8
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpNack.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpSrReq.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpTllei.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpTmmb.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestSenderReport.cpp +1 -1
- package/worker/test/src/RTC/RTP/TestPacket.cpp +26 -26
- package/worker/test/src/RTC/RTP/TestSharedPacket.cpp +1 -1
- package/worker/test/src/RTC/RTP/rtpCommon.cpp +1 -1
- package/worker/test/src/RTC/SCTP/association/TestNegotiatedCapabilities.cpp +4 -4
- package/worker/test/src/RTC/SCTP/packet/TestPacket.cpp +14 -14
- package/worker/test/src/RTC/SCTP/packet/chunks/TestAbortAssociationChunk.cpp +4 -4
- package/worker/test/src/RTC/SCTP/packet/chunks/TestCookieAckChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestCookieEchoChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestForwardTsnChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestHeartbeatAckChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestHeartbeatRequestChunk.cpp +9 -9
- package/worker/test/src/RTC/SCTP/packet/chunks/TestIDataChunk.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/chunks/TestIForwardTsnChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestInitAckChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestInitChunk.cpp +8 -8
- package/worker/test/src/RTC/SCTP/packet/chunks/TestOperationErrorChunk.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/chunks/TestReConfigChunk.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/chunks/TestSackChunk.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/chunks/TestShutdownAckChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestShutdownCompleteChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestUnknownChunk.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestCookieReceivedWhileShuttingDownErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestInvalidMandatoryParameterErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestInvalidStreamIdentifierErrorCause.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestMissingMandatoryParameterErrorCause.cpp +11 -11
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestNoUserDataErrorCause.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestOutOfResourceErrorCause.cpp +5 -5
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestProtocolViolationErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestRestartOfAnAssociationWithNewAddressesErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestStaleCookieErrorCause.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnknownErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnrecognizedChunkTypeErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnrecognizedParametersErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnresolvableAddressErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUserInitiatedAbortErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestAddIncomingStreamsRequestParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestAddOutgoingStreamsRequestParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestCookiePreservativeParameter.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/parameters/TestForwardTsnSupportedParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestHeartbeatInfoParameter.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIPv4AddressParameter.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIPv6AddressParameter.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIncomingSsnResetRequestParameter.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestOutgoingSsnResetRequestParameter.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestReconfigurationResponseParameter.cpp +5 -5
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSsnTsnResetRequestParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestStateCookieParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSupportedAddressTypesParameter.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSupportedExtensionsParameter.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/parameters/TestUnknownParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestUnrecognizedParameterParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestZeroChecksumAcceptableParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/sctpCommon.cpp +1 -1
- package/worker/test/src/RTC/SCTP/tx/TestOutstandingData.cpp +3 -3
- package/worker/test/src/RTC/SCTP/tx/TestRetransmissionQueue.cpp +1 -1
- package/worker/test/src/RTC/TestNackGenerator.cpp +1 -1
- package/worker/test/src/RTC/TestPortManager.cpp +126 -0
- package/worker/test/src/RTC/TestTransportCongestionControlServer.cpp +2 -2
- package/worker/test/src/RTC/TestTransportTuple.cpp +3 -2
- package/worker/test/src/Utils/TestCrypto.cpp +3 -3
- package/worker/test/src/Utils/TestString.cpp +1 -1
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
#include "common.hpp"
|
|
5
5
|
#include "RTC/SCTP/packet/TLV.hpp"
|
|
6
|
+
#include <ankerl/unordered_dense.h>
|
|
6
7
|
#include <string>
|
|
7
|
-
#include <unordered_map>
|
|
8
8
|
|
|
9
9
|
namespace RTC
|
|
10
10
|
{
|
|
@@ -25,13 +25,13 @@ namespace RTC
|
|
|
25
25
|
* \ \
|
|
26
26
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
27
27
|
*
|
|
28
|
-
* - Parameter
|
|
29
|
-
* - Parameter
|
|
30
|
-
* the
|
|
31
|
-
* (padding is excluded). Thus, a
|
|
32
|
-
*
|
|
33
|
-
* - Parameter
|
|
34
|
-
* - Padding: Bytes of padding to make the
|
|
28
|
+
* - Parameter type (16 bits).
|
|
29
|
+
* - Parameter length (16 bits): Total length of the parameter, including
|
|
30
|
+
* the parameter type, parameter length and parameter value fields
|
|
31
|
+
* (padding is excluded). Thus, a parameter with a zero-length parameter
|
|
32
|
+
* value field would have a parameter length field of 4.
|
|
33
|
+
* - Parameter value (variable length).
|
|
34
|
+
* - Padding: Bytes of padding to make the parameter total length be
|
|
35
35
|
* multiple of 4 bytes.
|
|
36
36
|
*/
|
|
37
37
|
|
|
@@ -40,7 +40,7 @@ namespace RTC
|
|
|
40
40
|
|
|
41
41
|
class Parameter : public TLV
|
|
42
42
|
{
|
|
43
|
-
// We need that
|
|
43
|
+
// We need that chunk calls protected and private methods in this class.
|
|
44
44
|
friend class Chunk;
|
|
45
45
|
|
|
46
46
|
public:
|
|
@@ -69,7 +69,7 @@ namespace RTC
|
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* Action that is taken if the processing endpoint does not recognize the
|
|
72
|
-
*
|
|
72
|
+
* parameter.
|
|
73
73
|
*/
|
|
74
74
|
enum class ActionForUnknownParameterType : uint8_t
|
|
75
75
|
{
|
|
@@ -89,11 +89,11 @@ namespace RTC
|
|
|
89
89
|
{
|
|
90
90
|
ParameterType type;
|
|
91
91
|
/**
|
|
92
|
-
* The value of the
|
|
93
|
-
* length of the
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
92
|
+
* The value of the parameter length field, which represents the total
|
|
93
|
+
* length of the parameter in bytes, including the parameter type,
|
|
94
|
+
* parameter length and parameter value fields. So if the parameter
|
|
95
|
+
* value field is zero-length, the length field must be 4. The
|
|
96
|
+
* parameter length field does not count any padding.
|
|
97
97
|
*/
|
|
98
98
|
uint16_t length;
|
|
99
99
|
};
|
|
@@ -103,17 +103,17 @@ namespace RTC
|
|
|
103
103
|
|
|
104
104
|
public:
|
|
105
105
|
/**
|
|
106
|
-
* Whether given buffer could be a a valid
|
|
106
|
+
* Whether given buffer could be a a valid parameter.
|
|
107
107
|
*
|
|
108
108
|
* @param buffer
|
|
109
|
-
* @param bufferLength - Can be greater than real
|
|
110
|
-
* @param parameterType - If given buffer is a valid
|
|
109
|
+
* @param bufferLength - Can be greater than real parameter length.
|
|
110
|
+
* @param parameterType - If given buffer is a valid parameter then
|
|
111
111
|
* `parameterType` is rewritten to parsed ParameterType.
|
|
112
|
-
* @param parameterLength - If given buffer is a valid
|
|
113
|
-
* `parameterLength` is rewritten to the value of the
|
|
112
|
+
* @param parameterLength - If given buffer is a valid parameter then
|
|
113
|
+
* `parameterLength` is rewritten to the value of the parameter length
|
|
114
114
|
* field.
|
|
115
|
-
* @param padding - If given buffer is a valid
|
|
116
|
-
* is rewritten to the number of padding bytes in the
|
|
115
|
+
* @param padding - If given buffer is a valid parameter then `padding`
|
|
116
|
+
* is rewritten to the number of padding bytes in the parameter (only
|
|
117
117
|
* the necessary ones to make total length multiple of 4).
|
|
118
118
|
*/
|
|
119
119
|
static bool IsParameter(
|
|
@@ -126,11 +126,11 @@ namespace RTC
|
|
|
126
126
|
static const std::string& ParameterTypeToString(ParameterType parameterType);
|
|
127
127
|
|
|
128
128
|
private:
|
|
129
|
-
static const
|
|
129
|
+
static const ankerl::unordered_dense::map<ParameterType, std::string> ParameterType2String;
|
|
130
130
|
|
|
131
131
|
protected:
|
|
132
132
|
/**
|
|
133
|
-
* Constructor is protected because we only want to create
|
|
133
|
+
* Constructor is protected because we only want to create parameter
|
|
134
134
|
* instances via Parse() and Factory() in subclasses.
|
|
135
135
|
*/
|
|
136
136
|
Parameter(uint8_t* buffer, size_t bufferLength);
|
|
@@ -12,12 +12,12 @@ namespace RTC
|
|
|
12
12
|
/**
|
|
13
13
|
* SCTP TLV (Type-Length-Value).
|
|
14
14
|
*
|
|
15
|
-
* This is the base class of all items in an SCTP
|
|
16
|
-
* - SCTP
|
|
17
|
-
* - SCTP
|
|
18
|
-
* - SCTP
|
|
15
|
+
* This is the base class of all items in an SCTP packet, this is:
|
|
16
|
+
* - SCTP chunk,
|
|
17
|
+
* - SCTP parameter, and
|
|
18
|
+
* - SCTP error cause.
|
|
19
19
|
*
|
|
20
|
-
* All those items have the same
|
|
20
|
+
* All those items have the same length field and 4-byte padded length.
|
|
21
21
|
*
|
|
22
22
|
* 0 1 2 3
|
|
23
23
|
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
|
@@ -59,8 +59,8 @@ namespace RTC
|
|
|
59
59
|
/**
|
|
60
60
|
* Subclasses with header bigger than default one (4 bytes) must override
|
|
61
61
|
* this method and return their header length (excluding variable-length
|
|
62
|
-
* field considered "value", Optional/
|
|
63
|
-
*
|
|
62
|
+
* field considered "value", Optional/variable-length
|
|
63
|
+
* parameters and error causes).
|
|
64
64
|
*/
|
|
65
65
|
virtual size_t GetHeaderLength() const
|
|
66
66
|
{
|
|
@@ -68,7 +68,7 @@ namespace RTC
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
|
-
* The value of the
|
|
71
|
+
* The value of the length field, which includes the length of the header
|
|
72
72
|
* and content (padding excluded).
|
|
73
73
|
*/
|
|
74
74
|
virtual uint16_t GetLengthField() const final
|
|
@@ -101,9 +101,9 @@ namespace RTC
|
|
|
101
101
|
* @remarks
|
|
102
102
|
* - The variable-length value starts after the fixed header, which can be
|
|
103
103
|
* different and have different length in each item definition.
|
|
104
|
-
* - In the case of SCTP
|
|
105
|
-
* class) we assume that a
|
|
106
|
-
* have
|
|
104
|
+
* - In the case of SCTP chunk class and subclasses (which implements this
|
|
105
|
+
* class) we assume that a chunk having variable-length value does not
|
|
106
|
+
* have parameters or error causes.
|
|
107
107
|
*/
|
|
108
108
|
virtual const uint8_t* GetVariableLengthValue() const final
|
|
109
109
|
{
|
|
@@ -118,7 +118,7 @@ namespace RTC
|
|
|
118
118
|
/**
|
|
119
119
|
* Set the variable-length value. It copies the given value into the
|
|
120
120
|
* the variable-length value of the item and updates both the length of
|
|
121
|
-
* the Serializable and the
|
|
121
|
+
* the Serializable and the length field.
|
|
122
122
|
*
|
|
123
123
|
* @throw MediaSoupTypeError - If given `valueLength` is higher than
|
|
124
124
|
* available length.
|
|
@@ -153,7 +153,7 @@ namespace RTC
|
|
|
153
153
|
/**
|
|
154
154
|
* This method doesn't really add an item into the item (that must be done
|
|
155
155
|
* by each subcass) but updates the length of the Serializable and the
|
|
156
|
-
* value of the
|
|
156
|
+
* value of the length field by incrementing it with the length of the
|
|
157
157
|
* given item.
|
|
158
158
|
*/
|
|
159
159
|
virtual void AddItem(const TLV* item) final;
|
|
@@ -10,7 +10,7 @@ namespace RTC
|
|
|
10
10
|
namespace SCTP
|
|
11
11
|
{
|
|
12
12
|
/**
|
|
13
|
-
* Represents user data extracted from a DATA or
|
|
13
|
+
* Represents user data extracted from a DATA or I-DATA Chunk.
|
|
14
14
|
*/
|
|
15
15
|
class UserData
|
|
16
16
|
{
|
|
@@ -63,7 +63,7 @@ namespace RTC
|
|
|
63
63
|
void Dump(int indentation = 0) const;
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
|
-
* Stream Identifier (in DATA and
|
|
66
|
+
* Stream Identifier (in DATA and I-DATA chunks).
|
|
67
67
|
*/
|
|
68
68
|
uint16_t GetStreamId() const
|
|
69
69
|
{
|
|
@@ -79,7 +79,7 @@ namespace RTC
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
* Message Identifier (MID) (only in
|
|
82
|
+
* Message Identifier (MID) (only in I-DATA chunks).
|
|
83
83
|
*/
|
|
84
84
|
uint32_t GetMessageId() const
|
|
85
85
|
{
|
|
@@ -87,7 +87,7 @@ namespace RTC
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
|
-
* Fragment Sequence Number (FSN) (only in
|
|
90
|
+
* Fragment Sequence Number (FSN) (only in I-DATA chunks).
|
|
91
91
|
*/
|
|
92
92
|
uint32_t GetFragmentSequenceNumber() const
|
|
93
93
|
{
|
|
@@ -23,14 +23,14 @@ namespace RTC
|
|
|
23
23
|
* \ \
|
|
24
24
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
25
25
|
*
|
|
26
|
-
* - Chunk
|
|
26
|
+
* - Chunk type (8 bits): 6.
|
|
27
27
|
* - T bit (1 bit): The T bit is set to 0 if the sender filled in the
|
|
28
28
|
* Verification Tag expected by the peer. If the Verification Tag is
|
|
29
29
|
* reflected, the T bit MUST be set to 1. Reflecting means that the sent
|
|
30
30
|
* Verification Tag is the same as the received one.
|
|
31
31
|
* - Length (16 bits).
|
|
32
32
|
*
|
|
33
|
-
* Optional
|
|
33
|
+
* Optional variable-length error causes (anyone).
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
36
|
// Forward declaration.
|
|
@@ -38,7 +38,7 @@ namespace RTC
|
|
|
38
38
|
|
|
39
39
|
class AbortAssociationChunk : public Chunk
|
|
40
40
|
{
|
|
41
|
-
// We need that
|
|
41
|
+
// We need that packet calls protected and private methods in this class.
|
|
42
42
|
friend class Packet;
|
|
43
43
|
|
|
44
44
|
public:
|
|
@@ -46,7 +46,7 @@ namespace RTC
|
|
|
46
46
|
* Parse a AbortAssociationChunk.
|
|
47
47
|
*
|
|
48
48
|
* @remarks
|
|
49
|
-
* `bufferLength` may exceed the exact length of the
|
|
49
|
+
* `bufferLength` may exceed the exact length of the chunk.
|
|
50
50
|
*/
|
|
51
51
|
static AbortAssociationChunk* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
52
52
|
|
|
@@ -54,7 +54,7 @@ namespace RTC
|
|
|
54
54
|
* Create a AbortAssociationChunk.
|
|
55
55
|
*
|
|
56
56
|
* @remarks
|
|
57
|
-
* `bufferLength` could be greater than the
|
|
57
|
+
* `bufferLength` could be greater than the chunk real length.
|
|
58
58
|
*/
|
|
59
59
|
static AbortAssociationChunk* Factory(uint8_t* buffer, size_t bufferLength);
|
|
60
60
|
|
|
@@ -22,32 +22,32 @@ namespace RTC
|
|
|
22
22
|
|
|
23
23
|
public:
|
|
24
24
|
/**
|
|
25
|
-
* The (I)mmediate bit (in DATA and
|
|
25
|
+
* The (I)mmediate bit (in DATA and I-DATA chunks).
|
|
26
26
|
*/
|
|
27
27
|
virtual bool GetI() const = 0;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* The (U)nordered bit (in DATA and
|
|
30
|
+
* The (U)nordered bit (in DATA and I-DATA chunks).
|
|
31
31
|
*/
|
|
32
32
|
virtual bool GetU() const = 0;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* The (B)eginning fragment bit (in DATA and
|
|
35
|
+
* The (B)eginning fragment bit (in DATA and I-DATA chunks).
|
|
36
36
|
*/
|
|
37
37
|
virtual bool GetB() const = 0;
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* The (E)nding fragment bit (in DATA and
|
|
40
|
+
* The (E)nding fragment bit (in DATA and I-DATA chunks).
|
|
41
41
|
*/
|
|
42
42
|
virtual bool GetE() const = 0;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
* TSN (in DATA and
|
|
45
|
+
* TSN (in DATA and I-DATA chunks).
|
|
46
46
|
*/
|
|
47
47
|
virtual uint32_t GetTsn() const = 0;
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
|
-
* Stream Identifier (in DATA and
|
|
50
|
+
* Stream Identifier (in DATA and I-DATA chunks).
|
|
51
51
|
*/
|
|
52
52
|
virtual uint16_t GetStreamId() const = 0;
|
|
53
53
|
|
|
@@ -57,17 +57,17 @@ namespace RTC
|
|
|
57
57
|
virtual uint16_t GetStreamSequenceNumber() const = 0;
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
|
-
* Message Identifier (MID) (only in
|
|
60
|
+
* Message Identifier (MID) (only in I-DATA chunks).
|
|
61
61
|
*/
|
|
62
62
|
virtual uint32_t GetMessageId() const = 0;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
* Fragment Sequence Number (FSN) (only in
|
|
65
|
+
* Fragment Sequence Number (FSN) (only in I-DATA chunks).
|
|
66
66
|
*/
|
|
67
67
|
virtual uint32_t GetFragmentSequenceNumber() const = 0;
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
|
-
* Payload Protocol Identifier (PPID) (in DATA and
|
|
70
|
+
* Payload Protocol Identifier (PPID) (in DATA and I-DATA chunks).
|
|
71
71
|
*/
|
|
72
72
|
virtual uint32_t GetPayloadProtocolId() const = 0;
|
|
73
73
|
|
|
@@ -32,17 +32,17 @@ namespace RTC
|
|
|
32
32
|
uint16_t streamId;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* Only set for
|
|
35
|
+
* Only set for FORWARD-TSN.
|
|
36
36
|
*/
|
|
37
37
|
uint16_t ssn;
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* Only set for
|
|
40
|
+
* Only set for I-FORWARD-TSN.
|
|
41
41
|
*/
|
|
42
42
|
uint32_t mid;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
* Only set for
|
|
45
|
+
* Only set for I-FORWARD-TSN.
|
|
46
46
|
*/
|
|
47
47
|
bool unordered;
|
|
48
48
|
|
|
@@ -9,7 +9,7 @@ namespace RTC
|
|
|
9
9
|
namespace SCTP
|
|
10
10
|
{
|
|
11
11
|
/**
|
|
12
|
-
* SCTP Cookie Acknowledgement Chunk (
|
|
12
|
+
* SCTP Cookie Acknowledgement Chunk (COOKIE-ACK) (11).
|
|
13
13
|
*
|
|
14
14
|
* @see RFC 9260.
|
|
15
15
|
*
|
|
@@ -19,7 +19,7 @@ namespace RTC
|
|
|
19
19
|
* | Type = 11 | Chunk Flags | Length = 4 |
|
|
20
20
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
21
21
|
*
|
|
22
|
-
* - Chunk
|
|
22
|
+
* - Chunk type (8 bits): 11.
|
|
23
23
|
* - Flags (8 bits): All set to 0.
|
|
24
24
|
* - Length (16 bits): 4.
|
|
25
25
|
*/
|
|
@@ -29,7 +29,7 @@ namespace RTC
|
|
|
29
29
|
|
|
30
30
|
class CookieAckChunk : public Chunk
|
|
31
31
|
{
|
|
32
|
-
// We need that
|
|
32
|
+
// We need that packet calls protected and private methods in this class.
|
|
33
33
|
friend class Packet;
|
|
34
34
|
|
|
35
35
|
public:
|
|
@@ -37,7 +37,7 @@ namespace RTC
|
|
|
37
37
|
* Parse a CookieAckChunk.
|
|
38
38
|
*
|
|
39
39
|
* @remarks
|
|
40
|
-
* `bufferLength` may exceed the exact length of the
|
|
40
|
+
* `bufferLength` may exceed the exact length of the chunk.
|
|
41
41
|
*/
|
|
42
42
|
static CookieAckChunk* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
43
43
|
|
|
@@ -45,7 +45,7 @@ namespace RTC
|
|
|
45
45
|
* Create a CookieAckChunk.
|
|
46
46
|
*
|
|
47
47
|
* @remarks
|
|
48
|
-
* `bufferLength` could be greater than the
|
|
48
|
+
* `bufferLength` could be greater than the chunk real length.
|
|
49
49
|
*/
|
|
50
50
|
static CookieAckChunk* Factory(uint8_t* buffer, size_t bufferLength);
|
|
51
51
|
|
|
@@ -9,7 +9,7 @@ namespace RTC
|
|
|
9
9
|
namespace SCTP
|
|
10
10
|
{
|
|
11
11
|
/**
|
|
12
|
-
* SCTP Cookie Echo Chunk (
|
|
12
|
+
* SCTP Cookie Echo Chunk (COOKIE-ECHO) (10).
|
|
13
13
|
*
|
|
14
14
|
* @see RFC 9260.
|
|
15
15
|
*
|
|
@@ -22,7 +22,7 @@ namespace RTC
|
|
|
22
22
|
* \ \
|
|
23
23
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
24
24
|
*
|
|
25
|
-
* - Chunk
|
|
25
|
+
* - Chunk type (8 bits): 10.
|
|
26
26
|
* - Flags (8 bits): All set to 0.
|
|
27
27
|
* - Length (16 bits).
|
|
28
28
|
* - Cookie (variable length).
|
|
@@ -33,7 +33,7 @@ namespace RTC
|
|
|
33
33
|
|
|
34
34
|
class CookieEchoChunk : public Chunk
|
|
35
35
|
{
|
|
36
|
-
// We need that
|
|
36
|
+
// We need that packet calls protected and private methods in this class.
|
|
37
37
|
friend class Packet;
|
|
38
38
|
|
|
39
39
|
public:
|
|
@@ -41,7 +41,7 @@ namespace RTC
|
|
|
41
41
|
* Parse a CookieEchoChunk.
|
|
42
42
|
*
|
|
43
43
|
* @remarks
|
|
44
|
-
* `bufferLength` may exceed the exact length of the
|
|
44
|
+
* `bufferLength` may exceed the exact length of the chunk.
|
|
45
45
|
*/
|
|
46
46
|
static CookieEchoChunk* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
47
47
|
|
|
@@ -49,7 +49,7 @@ namespace RTC
|
|
|
49
49
|
* Create a CookieEchoChunk.
|
|
50
50
|
*
|
|
51
51
|
* @remarks
|
|
52
|
-
* `bufferLength` could be greater than the
|
|
52
|
+
* `bufferLength` could be greater than the chunk real length.
|
|
53
53
|
*/
|
|
54
54
|
static CookieEchoChunk* Factory(uint8_t* buffer, size_t bufferLength);
|
|
55
55
|
|
|
@@ -32,7 +32,7 @@ namespace RTC
|
|
|
32
32
|
* \ \
|
|
33
33
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
34
34
|
*
|
|
35
|
-
* - Chunk
|
|
35
|
+
* - Chunk type (8 bits): 0.
|
|
36
36
|
* - Res (4 bits): All set to 0.
|
|
37
37
|
* - I bit (1 bit): The (I)mmediate bit MAY be set by the sender whenever
|
|
38
38
|
* the sender of a DATA chunk can benefit from the corresponding SACK
|
|
@@ -47,8 +47,8 @@ namespace RTC
|
|
|
47
47
|
* - Length (16 bits): This field indicates the length of the DATA chunk in
|
|
48
48
|
* bytes from the beginning of the type field to the end of the User Data
|
|
49
49
|
* field excluding any padding. A DATA chunk with one byte of user data
|
|
50
|
-
* will have the
|
|
51
|
-
* chunk with a User Data field of length L will have the
|
|
50
|
+
* will have the length field set to 17 (indicating 17 bytes). A DATA
|
|
51
|
+
* chunk with a User Data field of length L will have the length field
|
|
52
52
|
* set to (16 + L) (indicating 16 + L bytes) where L MUST be greater than
|
|
53
53
|
* 0.
|
|
54
54
|
* - TSN (32 bits): This value represents the TSN for this DATA chunk. The
|
|
@@ -56,7 +56,7 @@ namespace RTC
|
|
|
56
56
|
* to 0 after reaching 4294967295.
|
|
57
57
|
* - Stream Identifier S (16 bits): Identifies the stream to which the
|
|
58
58
|
* following user data belongs.
|
|
59
|
-
* - Stream Sequence Number n (16 bits): This value represents the
|
|
59
|
+
* - Stream Sequence Number n (16 bits): This value represents the stream
|
|
60
60
|
* Sequence Number of the following user data within the stream S. Valid
|
|
61
61
|
* range is 0 to 65535. When a user message is fragmented by SCTP for
|
|
62
62
|
* transport, the same Stream Sequence Number MUST be carried in each of
|
|
@@ -65,7 +65,7 @@ namespace RTC
|
|
|
65
65
|
* application (or upper layer) specified protocol identifier.
|
|
66
66
|
* - User Data (variable length): This is the payload user data. The
|
|
67
67
|
* implementation MUST pad the end of the data to a 4-byte boundary with
|
|
68
|
-
* all zero bytes. Any padding MUST NOT be included in the
|
|
68
|
+
* all zero bytes. Any padding MUST NOT be included in the length field.
|
|
69
69
|
*/
|
|
70
70
|
|
|
71
71
|
// Forward declaration.
|
|
@@ -73,7 +73,7 @@ namespace RTC
|
|
|
73
73
|
|
|
74
74
|
class DataChunk : public AnyDataChunk
|
|
75
75
|
{
|
|
76
|
-
// We need that
|
|
76
|
+
// We need that packet calls protected and private methods in this class.
|
|
77
77
|
friend class Packet;
|
|
78
78
|
|
|
79
79
|
public:
|
|
@@ -84,7 +84,7 @@ namespace RTC
|
|
|
84
84
|
* Parse a DataChunk.
|
|
85
85
|
*
|
|
86
86
|
* @remarks
|
|
87
|
-
* `bufferLength` may exceed the exact length of the
|
|
87
|
+
* `bufferLength` may exceed the exact length of the chunk.
|
|
88
88
|
*/
|
|
89
89
|
static DataChunk* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
90
90
|
|
|
@@ -92,7 +92,7 @@ namespace RTC
|
|
|
92
92
|
* Create a DataChunk.
|
|
93
93
|
*
|
|
94
94
|
* @remarks
|
|
95
|
-
* `bufferLength` could be greater than the
|
|
95
|
+
* `bufferLength` could be greater than the chunk real length.
|
|
96
96
|
*/
|
|
97
97
|
static DataChunk* Factory(uint8_t* buffer, size_t bufferLength);
|
|
98
98
|
|
|
@@ -179,7 +179,7 @@ namespace RTC
|
|
|
179
179
|
void SetStreamSequenceNumber(uint16_t value);
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
|
-
* @remarks Only in
|
|
182
|
+
* @remarks Only in I-DATA chunks.
|
|
183
183
|
*/
|
|
184
184
|
uint32_t GetMessageId() const final
|
|
185
185
|
{
|
|
@@ -192,7 +192,7 @@ namespace RTC
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
/**
|
|
195
|
-
* @remarks Only in
|
|
195
|
+
* @remarks Only in I-DATA chunks.
|
|
196
196
|
*/
|
|
197
197
|
uint32_t GetFragmentSequenceNumber() const final
|
|
198
198
|
{
|
|
@@ -243,7 +243,7 @@ namespace RTC
|
|
|
243
243
|
DataChunk* SoftClone(const uint8_t* buffer) const final;
|
|
244
244
|
|
|
245
245
|
/**
|
|
246
|
-
* We need to override this method since this
|
|
246
|
+
* We need to override this method since this chunk has a variable-length
|
|
247
247
|
* value and the fixed header doesn't have default length.
|
|
248
248
|
*/
|
|
249
249
|
size_t GetHeaderLength() const final
|
|
@@ -10,7 +10,7 @@ namespace RTC
|
|
|
10
10
|
namespace SCTP
|
|
11
11
|
{
|
|
12
12
|
/**
|
|
13
|
-
* SCTP Forward Cumulative TSN Chunk (
|
|
13
|
+
* SCTP Forward Cumulative TSN Chunk (FORWARD-TSN) (192)
|
|
14
14
|
*
|
|
15
15
|
* @see RFC 3758.
|
|
16
16
|
*
|
|
@@ -29,7 +29,7 @@ namespace RTC
|
|
|
29
29
|
* | Stream-N | Stream Sequence-N |
|
|
30
30
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
31
31
|
*
|
|
32
|
-
* - Chunk
|
|
32
|
+
* - Chunk type (8 bits): 192.
|
|
33
33
|
* - Flags: All set to 0.
|
|
34
34
|
* - Length (16 bits).
|
|
35
35
|
* - New Cumulative TSN (32 bits): This indicates the new cumulative TSN to
|
|
@@ -44,7 +44,7 @@ namespace RTC
|
|
|
44
44
|
|
|
45
45
|
class ForwardTsnChunk : public AnyForwardTsnChunk
|
|
46
46
|
{
|
|
47
|
-
// We need that
|
|
47
|
+
// We need that packet calls protected and private methods in this class.
|
|
48
48
|
friend class Packet;
|
|
49
49
|
|
|
50
50
|
public:
|
|
@@ -55,7 +55,7 @@ namespace RTC
|
|
|
55
55
|
* Parse a ForwardTsnChunk.
|
|
56
56
|
*
|
|
57
57
|
* @remarks
|
|
58
|
-
* `bufferLength` may exceed the exact length of the
|
|
58
|
+
* `bufferLength` may exceed the exact length of the chunk.
|
|
59
59
|
*/
|
|
60
60
|
static ForwardTsnChunk* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
61
61
|
|
|
@@ -63,7 +63,7 @@ namespace RTC
|
|
|
63
63
|
* Create a ForwardTsnChunk.
|
|
64
64
|
*
|
|
65
65
|
* @remarks
|
|
66
|
-
* `bufferLength` could be greater than the
|
|
66
|
+
* `bufferLength` could be greater than the chunk real length.
|
|
67
67
|
*/
|
|
68
68
|
static ForwardTsnChunk* Factory(uint8_t* buffer, size_t bufferLength);
|
|
69
69
|
|
|
@@ -120,7 +120,7 @@ namespace RTC
|
|
|
120
120
|
ForwardTsnChunk* SoftClone(const uint8_t* buffer) const final;
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
|
-
* We need to override this method since this
|
|
123
|
+
* We need to override this method since this chunk has a variable-length
|
|
124
124
|
* value and the fixed header doesn't have default length.
|
|
125
125
|
*/
|
|
126
126
|
size_t GetHeaderLength() const final
|
|
@@ -9,7 +9,7 @@ namespace RTC
|
|
|
9
9
|
namespace SCTP
|
|
10
10
|
{
|
|
11
11
|
/**
|
|
12
|
-
* SCTP Heartbeat Acknowledgement Chunk (
|
|
12
|
+
* SCTP Heartbeat Acknowledgement Chunk (HEARTBEAT-ACK) (5)
|
|
13
13
|
*
|
|
14
14
|
* @see RFC 9260.
|
|
15
15
|
*
|
|
@@ -23,12 +23,12 @@ namespace RTC
|
|
|
23
23
|
* \ \
|
|
24
24
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
25
25
|
*
|
|
26
|
-
* - Chunk
|
|
26
|
+
* - Chunk type (8 bits): 5.
|
|
27
27
|
* - Flags (8 bits): All set to 0.
|
|
28
28
|
* - Length (16 bits).
|
|
29
29
|
* - Heartbeat Information (variable length).
|
|
30
30
|
*
|
|
31
|
-
* Mandatory
|
|
31
|
+
* Mandatory variable-length Parameters:
|
|
32
32
|
* - Heartbeat Info (1), mandatory.
|
|
33
33
|
*/
|
|
34
34
|
|
|
@@ -37,7 +37,7 @@ namespace RTC
|
|
|
37
37
|
|
|
38
38
|
class HeartbeatAckChunk : public Chunk
|
|
39
39
|
{
|
|
40
|
-
// We need that
|
|
40
|
+
// We need that packet calls protected and private methods in this class.
|
|
41
41
|
friend class Packet;
|
|
42
42
|
|
|
43
43
|
public:
|
|
@@ -45,7 +45,7 @@ namespace RTC
|
|
|
45
45
|
* Parse a HeartbeatAckChunk.
|
|
46
46
|
*
|
|
47
47
|
* @remarks
|
|
48
|
-
* `bufferLength` may exceed the exact length of the
|
|
48
|
+
* `bufferLength` may exceed the exact length of the chunk.
|
|
49
49
|
*/
|
|
50
50
|
static HeartbeatAckChunk* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
51
51
|
|
|
@@ -53,7 +53,7 @@ namespace RTC
|
|
|
53
53
|
* Create a HeartbeatAckChunk.
|
|
54
54
|
*
|
|
55
55
|
* @remarks
|
|
56
|
-
* `bufferLength` could be greater than the
|
|
56
|
+
* `bufferLength` could be greater than the chunk real length.
|
|
57
57
|
*/
|
|
58
58
|
static HeartbeatAckChunk* Factory(uint8_t* buffer, size_t bufferLength);
|
|
59
59
|
|
|
@@ -9,7 +9,7 @@ namespace RTC
|
|
|
9
9
|
namespace SCTP
|
|
10
10
|
{
|
|
11
11
|
/**
|
|
12
|
-
* SCTP Heartbeat Request Chunk (
|
|
12
|
+
* SCTP Heartbeat Request Chunk (HEARTBEAT-REQUEST) (4).
|
|
13
13
|
*
|
|
14
14
|
* @see RFC 9260.
|
|
15
15
|
*
|
|
@@ -23,12 +23,12 @@ namespace RTC
|
|
|
23
23
|
* \ \
|
|
24
24
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
25
25
|
*
|
|
26
|
-
* - Chunk
|
|
26
|
+
* - Chunk type (8 bits): 4.
|
|
27
27
|
* - Flags (8 bits): All set to 0.
|
|
28
28
|
* - Length (16 bits).
|
|
29
29
|
* - Heartbeat Information (variable length).
|
|
30
30
|
*
|
|
31
|
-
* Mandatory
|
|
31
|
+
* Mandatory variable-length Parameters:
|
|
32
32
|
* - Heartbeat Info (1), mandatory.
|
|
33
33
|
*/
|
|
34
34
|
|
|
@@ -37,7 +37,7 @@ namespace RTC
|
|
|
37
37
|
|
|
38
38
|
class HeartbeatRequestChunk : public Chunk
|
|
39
39
|
{
|
|
40
|
-
// We need that
|
|
40
|
+
// We need that packet calls protected and private methods in this class.
|
|
41
41
|
friend class Packet;
|
|
42
42
|
|
|
43
43
|
public:
|
|
@@ -45,7 +45,7 @@ namespace RTC
|
|
|
45
45
|
* Parse a HeartbeatRequestChunk.
|
|
46
46
|
*
|
|
47
47
|
* @remarks
|
|
48
|
-
* `bufferLength` may exceed the exact length of the
|
|
48
|
+
* `bufferLength` may exceed the exact length of the chunk.
|
|
49
49
|
*/
|
|
50
50
|
static HeartbeatRequestChunk* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
51
51
|
|
|
@@ -53,7 +53,7 @@ namespace RTC
|
|
|
53
53
|
* Create a HeartbeatRequestChunk.
|
|
54
54
|
*
|
|
55
55
|
* @remarks
|
|
56
|
-
* `bufferLength` could be greater than the
|
|
56
|
+
* `bufferLength` could be greater than the chunk real length.
|
|
57
57
|
*/
|
|
58
58
|
static HeartbeatRequestChunk* Factory(uint8_t* buffer, size_t bufferLength);
|
|
59
59
|
|