tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

nss_countbytes.h (750B)


      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) */