Replies: 1 comment 1 reply
-
@PhyxionNL @chmorgan Any comments, ideas, opinion here? Thanks. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm currently working on a RTCP decoder and I'm facing the following issue.
So far, the design of the class Packet assumes that the payload packet is a singleton, resulting into a chain of packets.
Example:
RawData -> RawIPPacket -> IPv6Packet -> UDPPacket -> RtcpPacket -> PayloadPacketOrData
or
RawData -> RawIPPacket -> IPv6Packet -> UDPPacket -> DnsPacket
But in some cases / protocols, the payload of UdpPacket (can be TcpPacket too) is actually an array of packets (e.g. 2 RtcpPacket) and not a single one. Additionally, each RtcpPacket has its own payload.
For now, my first Draft makes the second RtcpPacket the PayloadPacketOrData of the first one (which is then its ParentPacket), but this is not really correct neither satisfying. Specially, because the method p.Extract(); returns only a single packet (here the first one) and not an array.
Any idea how do you want to address that?
I see 2 options (below), maybe you have a better idea:
With the first option, we don't touch the existing code too much, but we can't really do this p.Extract();. And we introduce a "Packet" in the chain which is actually not really a Packet.
With the second option, we have to deal with a major refactoring, impacting a lot the existing code and interfaces.
Thanks for feedback and comments.
Julien.
Beta Was this translation helpful? Give feedback.
All reactions