2018-09-27 14:21:17 +02:00
|
|
|
/* Copyright (c) 2001 Matej Pfajfar.
|
|
|
|
* Copyright (c) 2001-2004, Roger Dingledine.
|
|
|
|
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
|
2019-01-16 18:33:22 +01:00
|
|
|
* Copyright (c) 2007-2019, The Tor Project, Inc. */
|
2018-09-27 14:21:17 +02:00
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
|
|
|
/**
|
2019-10-16 14:18:26 +02:00
|
|
|
* \file predict_ports.h
|
2018-09-27 14:21:17 +02:00
|
|
|
* \brief Header file for predict_ports.c.
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef TOR_PREDICT_PORTS_H
|
|
|
|
#define TOR_PREDICT_PORTS_H
|
|
|
|
|
|
|
|
void predicted_ports_init(void);
|
|
|
|
void rep_hist_note_used_port(time_t now, uint16_t port);
|
|
|
|
smartlist_t *rep_hist_get_predicted_ports(time_t now);
|
|
|
|
void rep_hist_remove_predicted_ports(const smartlist_t *rmv_ports);
|
|
|
|
void rep_hist_note_used_resolve(time_t now);
|
|
|
|
void rep_hist_note_used_internal(time_t now, int need_uptime,
|
|
|
|
int need_capacity);
|
|
|
|
int rep_hist_get_predicted_internal(time_t now, int *need_uptime,
|
|
|
|
int *need_capacity);
|
|
|
|
|
|
|
|
int any_predicted_circuits(time_t now);
|
|
|
|
int rep_hist_circbuilding_dormant(time_t now);
|
|
|
|
int predicted_ports_prediction_time_remaining(time_t now);
|
|
|
|
void predicted_ports_free_all(void);
|
|
|
|
|
2019-06-05 15:33:35 +02:00
|
|
|
#endif /* !defined(TOR_PREDICT_PORTS_H) */
|