#
4658a150 |
| 12-Dec-2023 |
claudio <claudio@openbsd.org> |
Extend imsg and ibuf API with useful getter methods
For ibufs: - various getters for ibufs (ibuf_get* and ibuf_skip) - additional ibuf set/add functions that don't alter byte order - ibuf_truncate a
Extend imsg and ibuf API with useful getter methods
For ibufs: - various getters for ibufs (ibuf_get* and ibuf_skip) - additional ibuf set/add functions that don't alter byte order - ibuf_truncate and ibuf_rewind - ibuf_from_buffer and ibuf_from_ibuf to populate a reader ibuf - a getter for the msgbuf queuelen
For imsg: - various getters for imsg (especially imsg_get_data() which can be used in most cases as a simple one call api with all error checks). All the imsg.hdr fields can also be accessed by getters. - The imsg data is now actually an ibuf but the old imsg.data pointer is kept for now to not break every imsg application. - Introduce imsg_forward to simply forward a message from one channel to an other (used in the control socket code).
Since this requires a major bump take the oportunity to also cleanup some function signatures to use size_t for length fields. Also internal data structures are removed from the public header.
With and OK tb@
show more ...
|
#
19778535 |
| 19-Jun-2023 |
claudio <claudio@openbsd.org> |
Improve the ibuf API by adding these functions: Functions extending ibuf_add to work with more specific data types ibuf_add_buf, ibuf_add_zero, ibuf_add_n8, ibuf_add_n16, ibuf_add_n32, ibuf_add_n
Improve the ibuf API by adding these functions: Functions extending ibuf_add to work with more specific data types ibuf_add_buf, ibuf_add_zero, ibuf_add_n8, ibuf_add_n16, ibuf_add_n32, ibuf_add_n64 Functions replacing ibuf_seek where data at a specific offset is modified ibuf_set, ibuf_set_n8, ibuf_set_n16, ibuf_set_n32, ibuf_set_n64 Functions to check, get and set the filedescriptor stored on the ibuf ibuf_fd_avail, ibuf_fd_get, ibuf_fd_set and ibuf_data() to access the data buffer, to be used together with ibuf_size()
On top of this add an optimized imsg_compose_ibuf() where an ibuf is wrapped into an imsg in an efficent way.
Finally remove msgbuf_drain since it is not used by anything outside of the ibuf code. Because of this removal bump the major of libutil.
Remove ibuf_data() in iked since the same function is now provided by libutil. OK tb@
show more ...
|
#
696b5899 |
| 24-Oct-2019 |
tb <tb@openbsd.org> |
The ber_* namespace is used by liblber since time immemorial, so move our BER API to the unused ober_* prefix to avoid some breakage in ports.
Problem diagnosed by jmatthew with ber_free() in samba,
The ber_* namespace is used by liblber since time immemorial, so move our BER API to the unused ober_* prefix to avoid some breakage in ports.
Problem diagnosed by jmatthew with ber_free() in samba, but there are many others as pointed out by sthen.
tests & ok rob ok sthen (who had an almost identical diff for libutil) "go head hit it" deraadt
show more ...
|
#
d4b95dc4 |
| 11-May-2019 |
rob <rob@openbsd.org> |
The BER API is currently used by ldap, ldapd, ldapctl, ypldap, snmpd, and snmpctl. Separate copies of ber.[ch] have existed and been maintained in sync in ldap, ldapd, ypldap and snmpd.
This commit
The BER API is currently used by ldap, ldapd, ldapctl, ypldap, snmpd, and snmpctl. Separate copies of ber.[ch] have existed and been maintained in sync in ldap, ldapd, ypldap and snmpd.
This commit moves the BER API into /usr/lib/libutil. All current consumers already link libutil. ldapd and snmpd regress passes, and release builds.
With help from tb@ and guenther@.
ok deraadt@, tb@
show more ...
|
#
8c897735 |
| 14-Dec-2017 |
kettenis <kettenis@openbsd.org> |
Make a few internal symbols static and add a Symbols.map version script to control which symbols are exported from the shared library.
ok guenther@, deraadt@, jca@
|