Tor  0.4.7.0-alpha-dev
nss_countbytes.h
Go to the documentation of this file.
1 /* Copyright 2018-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
3 
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  **/
9 
10 #ifndef TOR_NSS_COUNTBYTES_H
11 #define TOR_NSS_COUNTBYTES_H
12 
13 #include "lib/cc/torint.h"
14 
15 void tor_nss_countbytes_init(void);
16 
17 struct PRFileDesc;
18 struct PRFileDesc *tor_wrap_prfiledesc_with_byte_counter(
19  struct PRFileDesc *stack);
20 
21 int tor_get_prfiledesc_byte_counts(struct PRFileDesc *fd,
22  uint64_t *n_read_out,
23  uint64_t *n_written_out);
24 
25 #endif /* !defined(TOR_NSS_COUNTBYTES_H) */
struct PRFileDesc * tor_wrap_prfiledesc_with_byte_counter(struct PRFileDesc *stack)
int tor_get_prfiledesc_byte_counts(struct PRFileDesc *fd, uint64_t *n_read_out, uint64_t *n_written_out)
void tor_nss_countbytes_init(void)
Integer definitions used throughout Tor.