1 /* Copyright 2018-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
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.
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);
18 struct PRFileDesc
*tor_wrap_prfiledesc_with_byte_counter(
19 struct PRFileDesc
*stack
);
21 int tor_get_prfiledesc_byte_counts(struct PRFileDesc
*fd
,
23 uint64_t *n_written_out
);
25 #endif /* !defined(TOR_NSS_COUNTBYTES_H) */