spicy icon indicating copy to clipboard operation
spicy copied to clipboard

Add support for error recovery with known gap

Open bbannier opened this issue 4 years ago • 1 comments

The initial implementation of error recovery with #1054 did not add code which can recover from a gap of known size. Such a gap could come e.g., from Zeek via spicy-plugin. We should add something taking advantage of this information.

The implementation should be pretty straight-forward if we can easily correlate input bytes to fields, e.g., if all fields in the gap consume a fixed amount of data (literals & other atomic fields, explicit &size).

To support recovery with a gap containing other field types we would need some heuristic on where to continue parsing. It might be impossible to support this in general.

A special case of this is when the initial part of the input stream was missing. See https://github.com/zeek/spicy-plugin/issues/135 for some context on how Zeek could/should use this with partial connections.

bbannier avatar Feb 21 '22 20:02 bbannier

First question is where we would put a &synchronize attribute (if at all).

bbannier avatar Feb 22 '22 09:02 bbannier