2018-09-25 17:22:14 -04:00
|
|
|
/* Copyright (c) 2001 Matej Pfajfar.
|
|
|
|
* Copyright (c) 2001-2004, Roger Dingledine.
|
|
|
|
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
|
2019-01-16 12:33:22 -05:00
|
|
|
* Copyright (c) 2007-2019, The Tor Project, Inc. */
|
2018-09-25 17:22:14 -04:00
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
2019-10-26 11:13:29 -04:00
|
|
|
/**
|
|
|
|
* @file netstatus.h
|
|
|
|
* @brief Header for netstatus.c
|
|
|
|
**/
|
|
|
|
|
2018-09-25 17:22:14 -04:00
|
|
|
#ifndef TOR_NETSTATUS_H
|
|
|
|
#define TOR_NETSTATUS_H
|
|
|
|
|
|
|
|
int net_is_disabled(void);
|
|
|
|
int net_is_completely_disabled(void);
|
|
|
|
|
2018-11-13 15:33:46 -05:00
|
|
|
void note_user_activity(time_t now);
|
|
|
|
void reset_user_activity(time_t now);
|
|
|
|
time_t get_last_user_activity_time(void);
|
|
|
|
|
|
|
|
void set_network_participation(bool participation);
|
|
|
|
bool is_participating_on_network(void);
|
|
|
|
|
2018-12-04 11:56:05 -05:00
|
|
|
void netstatus_flush_to_state(or_state_t *state, time_t now);
|
|
|
|
void netstatus_load_from_state(const or_state_t *state, time_t now);
|
2018-12-04 12:21:14 -05:00
|
|
|
void netstatus_note_clock_jumped(time_t seconds_diff);
|
2018-12-04 11:56:05 -05:00
|
|
|
|
2019-06-05 09:33:35 -04:00
|
|
|
#endif /* !defined(TOR_NETSTATUS_H) */
|