2017-03-15 21:13:17 +01:00
|
|
|
/* * Copyright (c) 2012-2017, The Tor Project, Inc. */
|
2012-10-01 06:41:25 +02:00
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \file circuitmux_ewma.h
|
|
|
|
* \brief Header file for circuitmux_ewma.c
|
|
|
|
**/
|
|
|
|
|
2012-10-12 18:13:10 +02:00
|
|
|
#ifndef TOR_CIRCUITMUX_EWMA_H
|
|
|
|
#define TOR_CIRCUITMUX_EWMA_H
|
2012-10-01 06:41:25 +02:00
|
|
|
|
|
|
|
#include "or.h"
|
|
|
|
#include "circuitmux.h"
|
|
|
|
|
2018-02-15 19:51:34 +01:00
|
|
|
/* The public EWMA policy callbacks object. */
|
2012-10-01 10:54:42 +02:00
|
|
|
extern circuitmux_policy_t ewma_policy;
|
|
|
|
|
|
|
|
/* Externally visible EWMA functions */
|
2018-02-15 19:51:34 +01:00
|
|
|
void cmux_ewma_set_options(const or_options_t *options,
|
|
|
|
const networkstatus_t *consensus);
|
2012-10-01 06:41:25 +02:00
|
|
|
|
2018-04-26 16:18:39 +02:00
|
|
|
void circuitmux_ewma_free_all(void);
|
|
|
|
|
|
|
|
#ifdef CIRCUITMUX_EWMA_PRIVATE
|
|
|
|
STATIC unsigned cell_ewma_get_current_tick_and_fraction(double *remainder_out);
|
|
|
|
STATIC void cell_ewma_initialize_ticks(void);
|
|
|
|
#endif
|
|
|
|
|
2017-09-15 22:24:44 +02:00
|
|
|
#endif /* !defined(TOR_CIRCUITMUX_EWMA_H) */
|
2012-10-01 06:41:25 +02:00
|
|
|
|