diff options
| author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-05-11 11:41:23 -0300 | 
|---|---|---|
| committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-11-24 07:54:07 -0300 | 
| commit | 91804f630cfe6ce783743c8bc9216132613e7975 (patch) | |
| tree | 91f34124fcc722064cb9da4a9a477c03d0f13e4c /lib/stream.h | |
| parent | 9bcab3130beb309d8a9e109162cd3010cd98ffa3 (diff) | |
lib: add new stream function to reorganize buffer
The function was originally implemented for zebra data plane FPM plugin,
but another code places could use it.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'lib/stream.h')
| -rw-r--r-- | lib/stream.h | 10 | 
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/stream.h b/lib/stream.h index 4f75f121ca..dedbf37984 100644 --- a/lib/stream.h +++ b/lib/stream.h @@ -262,6 +262,16 @@ extern int stream_empty(struct stream *); /* is the stream empty? */  /* debugging */  extern void stream_hexdump(const struct stream *s); +/** + * Reorganize the buffer data so it can fit more. This function is normally + * called right after stream data is consumed so we can read more data + * (the functions that consume data start with `stream_get*()` and macros + * `STREAM_GET*()`). + * + * \param s stream pointer. + */ +extern void stream_pulldown(struct stream *s); +  /* deprecated */  extern uint8_t *stream_pnt(struct stream *);  | 
