nss_countbytes.h 708 B

12345678910111213141516171819202122232425
  1. /* Copyright 2018, The Tor Project, Inc. */
  2. /* See LICENSE for licensing information */
  3. /**
  4. * \file nss_countbytes.h
  5. * \brief Header for nss_countbytes.c, which lets us count the number of
  6. * bytes actually written on a PRFileDesc.
  7. **/
  8. #ifndef TOR_NSS_COUNTBYTES_H
  9. #define TOR_NSS_COUNTBYTES_H
  10. #include "lib/cc/torint.h"
  11. void tor_nss_countbytes_init(void);
  12. struct PRFileDesc;
  13. struct PRFileDesc *tor_wrap_prfiledesc_with_byte_counter(
  14. struct PRFileDesc *stack);
  15. int tor_get_prfiledesc_byte_counts(struct PRFileDesc *fd,
  16. uint64_t *n_read_out,
  17. uint64_t *n_written_out);
  18. #endif