Author :
claudio
Date :
2024-11-21 13:03:21
Hash :04d83f12 Message :Add ibuf_read and msgbuf_read to read from a socket and msgbuf_get
to return the ibufs generated by the previous two functions.
Error out if the hdrsz argument in msgbuf_new_reader is 0 or too big.
Also check that the rbuf is allocated in ibuf_read and msgbuf_read.
If not return EINVAL.
Implement the imsg API using these functions and introduce
imsgbuf_set_maxsize() to alter the maximum message size and
imsgbuf_allow_fdpass() to allow fd passing (which is now off by default).
Also cleanup the internals a bit and make imsgbuf_init() return int.
OK tb@