Open alikovvl opened 11 months ago
If the data buffer is larger than the packet, it will be completely saved in a pcap file. This results in a large pcap file and makes it difficult to analyze. Such buffers are obtained by using ArrayPool.Rent.
got an example?
https://github.com/dotpcap/sharppcap/blob/b6a0533200400c6b80377067286e7c6c221d2c2b/SharpPcap/LibPcap/CaptureFileWriterDevice.cs#L202
This will happen if the buffer size is not equal to the packet size.
you need to create Span<byte> with correct size from the array you rented.
Span<byte>
Sharppcap.Issue479.zip
If the data buffer is larger than the packet, it will be completely saved in a pcap file. This results in a large pcap file and makes it difficult to analyze. Such buffers are obtained by using ArrayPool.Rent.