diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-08-11 17:01:36 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-09-27 12:31:13 -0400 |
commit | f6899f3a74fafb6eef814832830c11d5bc6e9c33 (patch) | |
tree | 32d1439f02d0fe514f687929fd1b6c812c934b0e /src/or/buffers.c | |
parent | 698085d56e5da2524630bfbc439554153743326a (diff) | |
download | tor-f6899f3a74fafb6eef814832830c11d5bc6e9c33.tar.gz tor-f6899f3a74fafb6eef814832830c11d5bc6e9c33.zip |
Documentation for inspect_evbuffer
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r-- | src/or/buffers.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 <b>n</b> bytes from <b>buf</b> at <b>pos</b> (which may be + * NULL for the start fo the buffer), copying the data only if necessary. Set + * *<b>data</b> to a pointer to the desired bytes. Set <b>free_out</b> to 1 + * if we needed to malloc *<b>data</b> because the original bytes were + * noncontiguous; 0 otherwise. Return the number of bytes actually available + * at <b>data</b>. + */ static size_t inspect_evbuffer(struct evbuffer *buf, char **data, size_t n, int *free_out, struct evbuffer_ptr *pos) |