netstatus.h (942B)
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-2021, The Tor Project, Inc. */ 5 /* See LICENSE for licensing information */ 6 7 /** 8 * @file netstatus.h 9 * @brief Header for netstatus.c 10 **/ 11 12 #ifndef TOR_NETSTATUS_H 13 #define TOR_NETSTATUS_H 14 15 int net_is_disabled(void); 16 int net_is_completely_disabled(void); 17 18 void note_user_activity(time_t now); 19 void reset_user_activity(time_t now); 20 time_t get_last_user_activity_time(void); 21 22 void set_network_participation(bool participation); 23 bool is_participating_on_network(void); 24 25 struct mainloop_state_t; 26 27 void netstatus_flush_to_state(struct mainloop_state_t *state, time_t now); 28 void netstatus_load_from_state(const struct mainloop_state_t *state, 29 time_t now); 30 void netstatus_note_clock_jumped(time_t seconds_diff); 31 32 #endif /* !defined(TOR_NETSTATUS_H) */