circuitmux_ewma.h 795 B

123456789101112131415161718192021222324252627282930
  1. /* * Copyright (c) 2012-2019, The Tor Project, Inc. */
  2. /* See LICENSE for licensing information */
  3. /**
  4. * \file circuitmux_ewma.h
  5. * \brief Header file for circuitmux_ewma.c
  6. **/
  7. #ifndef TOR_CIRCUITMUX_EWMA_H
  8. #define TOR_CIRCUITMUX_EWMA_H
  9. #include "core/or/or.h"
  10. #include "core/or/circuitmux.h"
  11. /* The public EWMA policy callbacks object. */
  12. extern circuitmux_policy_t ewma_policy;
  13. /* Externally visible EWMA functions */
  14. void cmux_ewma_set_options(const or_options_t *options,
  15. const networkstatus_t *consensus);
  16. void circuitmux_ewma_free_all(void);
  17. #ifdef CIRCUITMUX_EWMA_PRIVATE
  18. STATIC unsigned cell_ewma_get_current_tick_and_fraction(double *remainder_out);
  19. STATIC void cell_ewma_initialize_ticks(void);
  20. #endif
  21. #endif /* !defined(TOR_CIRCUITMUX_EWMA_H) */