IXP_SRV_READBUF(3)
π IXP_SRV_READBUF(3) π
okay bestie, welcome to the Library Functions Manual for libixp β this page is your group-chat rundown of ixp_srv_readbuf and ixp_srv_writebuf, and yes they are the iconic duo. π
β¨ NAME β¨
ixp_srv_readbufixp_srv_writebuf
π SYNOPSIS π
#include <ixp_srvutil.h>
void ixp_srv_readbuf(Ixp9Req *req, char *buf, uint len);
void ixp_srv_writebuf(Ixp9Req *req, char **buf, uint *len, uint max);
πΈ DESCRIPTION πΈ
okay so these are utility functions for handling TRead and TWrite requests for files backed by in-memory buffers. For both functions, buf points to a buffer and len specifies the length of the buffer. π
In the case of ixp_srv_writebuf, these values add a level of pointer indirection, and it updates the values if they change. Thatβs why the signature has char **buf and uint *len, iykyk. β¨
If max has a value other than 0, ixp_srv_writebuf will truncate any writes to that point in the buffer. Otherwise, *buf is assumed to be malloc(3) allocated, and is reallocated to fit the new data as necessary. The buffer is always left nul-terminated. π
π BUGS π
heads up, bestie: ixp_srv_writebuf always truncates its buffer to the end of the most recent write. no cap, thatβs the whole bug note. π
xoxo, from the libixp Manual, stamped 2012 Dec ππ¦
π¦ where this page comes from
- nixos 26.05: libixp 0-unstable-2022-04-04
- nixpkgs unstable: libixp 0-unstable-2022-04-04
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms