Skip to content

New version length checks & packets captured with a smaller snaplen #90

Answered by JulianSchmid
GyulyVGC asked this question in Q&A
Discussion options

You must be logged in to vote

Ah now I understand the question better. Etherparse will not modify any fields of the original headers, it only modifies the length of the slice stored in "LaxPacketHeaders::payload". The headers will be decoded with the original values (even if they are inconsistent).

So yes, reading theIpv6Hedaer::payload_len & Ip4Header::total_len will still give you the length of the original packet, even if the overall packet has been cut off.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@GyulyVGC
Comment options

@JulianSchmid
Comment options

Answer selected by JulianSchmid
@GyulyVGC
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants