From: Nick Mathewson Date: Tue, 11 Aug 2009 21:01:36 +0000 (-0400) Subject: Documentation for inspect_evbuffer X-Git-Tag: tor-0.2.3.1-alpha~362^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6899f3a74fafb6eef814832830c11d5bc6e9c33;p=thirdparty%2Ftor.git Documentation for inspect_evbuffer --- diff --git a/src/or/buffers.c b/src/or/buffers.c index 4e65de29fc..9d667d4b44 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -1013,7 +1013,13 @@ fetch_var_cell_from_buf(buf_t *buf, var_cell_t **out, int linkproto) } #ifdef USE_BUFFEREVENTS -/* DOCDOC */ +/** Try to read n bytes from buf at pos (which may be + * NULL for the start fo the buffer), copying the data only if necessary. Set + * *data to a pointer to the desired bytes. Set free_out to 1 + * if we needed to malloc *data because the original bytes were + * noncontiguous; 0 otherwise. Return the number of bytes actually available + * at data. + */ static size_t inspect_evbuffer(struct evbuffer *buf, char **data, size_t n, int *free_out, struct evbuffer_ptr *pos)