lib: add stream_set_endp()

  * lib/stream.[ch]:

    - Add stream_set_endp(). This can be used to trim data (for
      example, padding) at the end of a stream.

    - Fix swapped 'getp' and 'endp' parameters in STREAM_WARN_OFFSETS.

From: Subbaiah Venkata <svenkata@google.com>
Signed-off-by: Avneesh Sachdev <avneesh@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@diac24.net>
2 files changed