Skip to content

Parser: stream resynchronization on corrupt or partial frames #2

@rcbevans

Description

@rcbevans

The stream parser stops on the first invalid frame (bad CRC, truncated data, unknown frame type). This makes it unusable for real-world TCP captures or log files that may contain partial frames from connection drops or interleaved non-protocol bytes.

A resync mode should:

  • On parse error, scan forward byte-by-byte for the next 0xAA sync byte
  • Validate the candidate frame (check FRAMESIZE bounds, verify CRC)
  • Resume parsing from the valid frame
  • Report skipped byte count and error location

This would make inspect practical for analyzing messy captures without requiring clean data.

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