Merge branch 'tor-gitlab/mr/568'
[tor.git] / src / lib / tls / nss_countbytes.h
blob47aab05d31fc1ba6d44c534134e790ece774797e
1 /* Copyright 2018-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
4 /**
5 * \file nss_countbytes.h
6 * \brief Header for nss_countbytes.c, which lets us count the number of
7 * bytes actually written on a PRFileDesc.
8 **/
10 #ifndef TOR_NSS_COUNTBYTES_H
11 #define TOR_NSS_COUNTBYTES_H
13 #include "lib/cc/torint.h"
15 void tor_nss_countbytes_init(void);
17 struct PRFileDesc;
18 struct PRFileDesc *tor_wrap_prfiledesc_with_byte_counter(
19 struct PRFileDesc *stack);
21 int tor_get_prfiledesc_byte_counts(struct PRFileDesc *fd,
22 uint64_t *n_read_out,
23 uint64_t *n_written_out);
25 #endif /* !defined(TOR_NSS_COUNTBYTES_H) */