aboutsummaryrefslogtreecommitdiff
path: root/src/or/buffers.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-11-15 18:38:52 -0500
committerNick Mathewson <nickm@torproject.org>2013-11-15 18:38:52 -0500
commit91ec6f7269bd7a5b73629f38e9779e84a0fb84f2 (patch)
treeaa3a9530b77790cdb907358aeaa14f84f9ef5f84 /src/or/buffers.h
parent9e907076025ccd91abfad7fc70c09ba4c9228f82 (diff)
downloadtor-91ec6f7269bd7a5b73629f38e9779e84a0fb84f2.tar
tor-91ec6f7269bd7a5b73629f38e9779e84a0fb84f2.tar.gz
Have the OOM handler also count the age the data in a stream buffer
Diffstat (limited to 'src/or/buffers.h')
-rw-r--r--src/or/buffers.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/buffers.h b/src/or/buffers.h
index a5886adc7..677d68d83 100644
--- a/src/or/buffers.h
+++ b/src/or/buffers.h
@@ -25,6 +25,9 @@ size_t buf_datalen(const buf_t *buf);
size_t buf_allocation(const buf_t *buf);
size_t buf_slack(const buf_t *buf);
+uint32_t buf_get_oldest_chunk_timestamp(const buf_t *buf, uint32_t now);
+size_t buf_get_total_allocation(void);
+
int read_to_buf(tor_socket_t s, size_t at_most, buf_t *buf, int *reached_eof,
int *socket_error);
int read_to_buf_tls(tor_tls_t *tls, size_t at_most, buf_t *buf);