Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Size error when using traces from tcpdump -s #22

Open
yuming-l2 opened this issue Nov 11, 2022 · 0 comments
Open

Size error when using traces from tcpdump -s #22

yuming-l2 opened this issue Nov 11, 2022 · 0 comments

Comments

@yuming-l2
Copy link

With truncated packets, len(pkt) is the truncated length, rather than the actual frame length.
I'm not aware of any good approach to get the original length. If only IP and IPv6 packets are of interest, using L3 size like p.payload.plen+40 if isinstance(p.payload, IPv6) else (p.payload.len if isinstance(p.payload, IP) else len(p)) could be a walkaround.

https://github.com/chicago-cdac/netml/blob/b895f6e4cbde6f08c61d0bdb28ea18dfbbf29bbe/src/netml/pparser/parser.py#L391-L398

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant