Feature #3531
closed
app-layer: signal stream engine about expected data size with next character
Added by Philippe Antoine over 4 years ago.
Updated over 4 years ago.
Description
Currently the TCP based app-layers assemble the buffer they work on themselves. This leads to unnecessary buffering and code complexity. Instead, the app-layer API should allow the parsers to signal to the stream layer below how much data they need before the record is complete.
This can be with a specified length, or with a new expected character, for instance in text protocols such as FTP where we wait for end of line.
Some thoughts:
- we should think about a limit. If the requested char does not appear in the stream, queuing should not be endless.
- is registering a single char enough or do we have a need for registering multiple at once?
Nice thoughts.
Limit is needed indeed.
A simple char may not be enough... As end of lines can get tricky (cf SSH split between CR and LF)
Maybe a callback function hasEnoughData will be more generic ?
- Parent task deleted (
#3444)
- Related to Feature #3444: app-layer: signal stream engine about expected data size added
Maybe the app layer parser can just signal to he TCP engine : this is not complete, keep buffering...
And be responsible for the limit they use...
- Status changed from New to Rejected
Also available in: Atom
PDF