Feature #3531
closedapp-layer: signal stream engine about expected data size with next character
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.
Updated by Victor Julien over 4 years ago
- 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?
Updated by Philippe Antoine over 4 years ago
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 ?
Updated by Victor Julien over 4 years ago
- Related to Feature #3444: app-layer: signal stream engine about expected data size added
Updated by Philippe Antoine over 4 years ago
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...
Updated by Philippe Antoine over 4 years ago
- Status changed from New to Rejected
Does not seem relevant