unparseable.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* Copyright (c) 2001 Matej Pfajfar.
  2. * Copyright (c) 2001-2004, Roger Dingledine.
  3. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  4. * Copyright (c) 2007-2018, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. /**
  7. * \file unparseable.h
  8. * \brief Header file for unparseable.c.
  9. **/
  10. #ifndef TOR_UNPARSEABLE_H
  11. #define TOR_UNPARSEABLE_H
  12. #include "lib/cc/torint.h"
  13. MOCK_DECL(void,dump_desc,(const char *desc, const char *type));
  14. void dump_desc_fifo_cleanup(void);
  15. void dump_desc_init(void);
  16. #ifdef UNPARSEABLE_PRIVATE
  17. /*
  18. * One entry in the list of dumped descriptors; filename dumped to, length,
  19. * SHA-256 and timestamp.
  20. */
  21. typedef struct {
  22. char *filename;
  23. size_t len;
  24. uint8_t digest_sha256[DIGEST256_LEN];
  25. time_t when;
  26. } dumped_desc_t;
  27. struct smartlist_t;
  28. EXTERN(uint64_t, len_descs_dumped)
  29. EXTERN(struct smartlist_t *, descs_dumped)
  30. MOCK_DECL(STATIC dumped_desc_t *, dump_desc_populate_one_file,
  31. (const char *dirname, const char *f));
  32. STATIC void dump_desc_populate_fifo_from_directory(const char *dirname);
  33. #endif
  34. #endif /* !defined(TOR_UNPARSEABLE_H) */