ixp_srv_readbuf.3 (1095B)
1 .TH "IXP_SRV_READBUF" 3 "2010 Jun" "libixp Manual" 2 3 .SH NAME 4 .P 5 ixp_srv_readbuf, ixp_srv_writebuf 6 7 .SH SYNOPSIS 8 .nf 9 #include <ixp_srvutil.h> 10 11 void ixp_srv_readbuf(Ixp9Req *req, char *buf, uint len); 12 13 void ixp_srv_writebuf(Ixp9Req *req, char **buf, uint *len, uint max); 14 .fi 15 16 .SH DESCRIPTION 17 .P 18 Utility functions for handling TRead and TWrite requests for 19 files backed by in\-memory buffers. For both functions, IbufR 20 points to a buffer and IlenR specifies the length of the 21 buffer. In the case of ixp_srv_writebuf, these values add a 22 level of pointer indirection, and updates the values if they 23 change. 24 25 .P 26 If ImaxR has a value other than 0, ixp_srv_writebuf will 27 truncate any writes to that point in the buffer. Otherwise, 28 I*bufR is assumed to be malloc(3) allocated, and is 29 reallocated to fit the new data as necessary. The buffer is 30 is always left nul\-terminated. 31 32 .SH BUGS 33 .P 34 ixp_srv_writebuf always truncates its buffer to the end 35 of the most recent write. 36 37 38 .\" man code generated by txt2tags 2.5 (http://txt2tags.sf.net) 39 .\" cmdline: txt2tags -o- ixp_srv_readbuf.man3 40