Skip to content

Size error when using traces from tcpdump -s #22

Description

@yuming-l2

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions