Age | Commit message (Collapse) | Author |
|
* 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>
|
|
2008-06-07 Paul Jakma <paul@jakma.org>
* stream.{c,h}: (stream_{put,write}) add const qualifier to source
argument. Change u_char to void *.
|
|
2006-01-19 Paul Jakma <paul.jakma@sun.com>
* stream.c: (stream_getq_from) should use POSIX uint64_t
not u_int64_t. Latter is neither a traditional BSD type, nor
a POSIX type.
|
|
2006-01-10 Paul Jakma <paul.jakma@sun.com>
* stream.c: (stream_new) Allocate stream data as seperate object.
(stream_free) free the data.
(stream_resize) new function, resize stream to new size.
(stream_{get,put}q*) new functions to get/put quad word size
types.
* stream.h: (struct stream) make data seperate from the stream.
Export new stream_resize and quad-word get/put functions.
|
|
* stream.h: Add comment about the special zero-ing ability of
stream_put.
(stream_recvmsg, stream_write) should return ssize_t and size_t
respectively. Should both be extern linkage.
(stream_recvfrom) Stream aware wrapper around recvfrom, in style
of stream_read_try.
* stream.c: (stream_recvfrom) new function, wrapper around recvfrom.
(stream_recvmsg, stream_write) ssize_t and size_t return values
|
|
* stream.c: (stream_read_try) Log a warning message if a fatal
I/O error occurs.
(stream_fifo_new) Fix prototype.
* stream.h: Fix prototype for stream_fifo_new (need void arg).
|
|
* stream.c: (stream_new) fix dumb mistake.
|
|
* stream.c: (stream_read_try) Use new ERRNO_IO_RETRY macro.
|
|
* stream.h: Declare new function stream_read_try suitable for use
with non-blocking file descriptors. Indicate that stream_read
and stream_read_unblock are deprecated.
* stream.c: (stream_read_try) New function for use with non-blocking
I/O.
(stream_recvmsg) Should return -1 if the stream is too small to
contain the data.
|
|
* stream.h: Unsigned long updated to size_t
* stream.c: ditto
* stream.h: Add stream_copy, stream_dup, stream_recvmsg.
Add comment describing struct stream abstraction, and various
other comments.
Deprecate several unsafe/ambigious macros.
Add STREAM_WRITEABLE and STREAM_READABLE.
Add (stream_getl_from) for symmetry.
Update stream_forward_{endp,getp} to use size_t offset.
Make stream data a 0 length array, rather than a seperate malloc.
* stream.c: Add consistency checks. Update to follow stream.h
changes.
(stream_new) Alloc stream+data in one go.
(stream_copy) new function, copy a stream.
(stream_dup) new function, dup a stream.
(stream_recvmsg) new function, recvmsg data into a stream.
(stream_empty) no need to check getp == 0.
|
|
* stream.h: Unsigned long updated to size_t
* stream.c: ditto
|
|
* (global) Update code to match stream.h changes.
stream_get_putp effectively replaced with stream_get_endp.
stream_forward renamed to stream_forward_getp.
stream_forward_endp introduced to replace some previous
setting/manual twiddling of putp by daemons.
* lib/stream.h: Remove putp. Update reference to putp with endp.
Add stream_forward_endp, which daemons were doing manually.
Rename stream_forward to stream_forward_getp.
lib/stream.c: Remove/update references to putp.
introduce stream_forward_endp.
|
|
* stream.c: Dont allocate streams with 0 sized data buffers
|
|
|