summaryrefslogtreecommitdiff
path: root/lib/stream.h
AgeCommit message (Collapse)Author
2008-06-07[lib] trivial: add const qualifier to stream_put/writePaul Jakma
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 *.
2008-02-26[c++] remove/rename some names in headers that clash with C++ reserved wordsPaul Jakma
2008-01-30 Peter Szilagyi <sp615@hszk.bme.hu> * lib/stream.h: Remove named 'new' parameter in prototype for c++ header compatibility. * ospfd/ospf_opaque.h: ditto * ospfd/ospfd.h: Renamed struct export to _export for c++ header compatibility. * ospf6d/ospf6_area.h: ditto
2006-01-10[stream] Add quad-word support and stream_resizepaul
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.
2005-11-26[c99] change gcc zero-length array to C99 flexible array declarationpaul
2005-11-26 Paul Jakma <paul.jakma@sun.com> * buffer.c: (struct buffer_data) change gcc zero array declaration to C99 incomplete array. * stream.h: (struct stream) same * ospf_api.c: (struct opaque_lsa) same
2005-05-062005-05-06 Paul Jakma <paul@dishone.st>paul
* (general) extern and static'ification of functions in code and header. Cleanup any definitions with unspecified arguments. Add casts for callback assignments where the callback is defined, typically, as passing void *, but the function being assigned has some other pointer type defined as its argument, as gcc complains about casts from void * to X* via function arguments. Fix some old K&R style function argument definitions. Add noreturn gcc attribute to some functions, as appropriate. Add unused gcc attribute to some functions (eg ones meant to help while debugging) Add guard defines to headers which were missing them. * command.c: (install_node) add const qualifier, still doesnt shut up the warning though, because of the double pointer. (cmp_node) ditto * keychain.c: (key_str2time) Add GET_LONG_RANGE() macro, derived fromn vty.h ones to fix some of the (long) < 0 warnings. * thread.c: (various) use thread_empty (cpu_record_hash_key) should cast to uintptr_t, a stdint.h type * vty.h: Add VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX so they removed from ospfd/ospf_vty.h * zebra.h: Move definition of ZEBRA_PORT to here, to remove dependence of lib on zebra/zserv.h
2005-05-032005-05-03 Paul Jakma <paul@dishone.st>paul
* 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
2005-02-242005-02-24 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* 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).
2005-02-162005-02-16 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* 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.
2005-02-142005-02-14 Paul Jakma <paul.jakma@sun.com>paul
* 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.
2005-02-122005-02-12 Paul Jakma <paul.jakma@sun.com>paul
* stream.h: Unsigned long updated to size_t * stream.c: ditto
2005-02-092005-02-09 Paul Jakma <paul.jakma@sun.com>paul
* (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.
2004-06-112004-06-11 Sowmini Varadhan <sowmini.varadhan@sun.com>paul
* filter.c: (access_list_remark_cmd) buffer_putstr doesnt need cast to u_char. (ipv6_access_list_remark_cmd) ditto. if.c: ditto * network.c: (readn/writen) pointer arg should be type u_char. * plist.c: needs to include stream.h, not declare stream functions internally. (various) Add static qualifier to internal functions. (prefix_list_type_str) extraneous breaks in switch statement. (ip_prefix_list_description_cmd) buffer_putstr doesnt need cast * stream.h: depends on plist.h and export stream_put_prefix * vty.c: (vty_<telnet option build functions>) should use unsigned char, telnet options are 0 -> 255. * zclient.c: various u_char<->char type cleanups. * zebra.h: Having to define CMSG_* can apply to more than just BSDI_NRL. * ripd.c: (rip_distribute_update_all) distribute list hook function pointer prototype requires struct prefix_list * arg. (rip_distribute_update_all_wrapper) update to pass required arg, NULL.
2002-12-13Initial revisionpaul