tor  0.4.2.0-alpha-dev
relay_sys.c
Go to the documentation of this file.
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-2019, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
12 #include "orconfig.h"
13 #include "core/or/or.h"
14 
15 #include "feature/relay/dns.h"
16 #include "feature/relay/ext_orport.h"
20 #include "feature/relay/routerkeys.h"
21 #include "feature/relay/router.h"
22 
23 #include "lib/subsys/subsys.h"
24 
25 static int
26 subsys_relay_initialize(void)
27 {
28  relay_register_periodic_events();
29  return 0;
30 }
31 
32 static void
33 subsys_relay_shutdown(void)
34 {
35  dns_free_all();
38  routerkeys_free_all();
40 }
41 
42 const struct subsys_fns_t sys_relay = {
43  .name = "relay",
44  .supported = true,
45  .level = 50,
46  .initialize = subsys_relay_initialize,
47  .shutdown = subsys_relay_shutdown,
48 };
void clear_pending_onions(void)
Definition: onion_queue.c:351
Header for feature/relay/relay_sys.c.
Header for feature/relay/relay_periodic.c.
void dns_free_all(void)
Definition: dns.c:400
Master header file for Tor-specific functionality.
Header file for onion_queue.c.
void router_free_all(void)
Definition: router.c:3461
void ext_orport_free_all(void)
Definition: ext_orport.c:657
Header file for router.c.
const char * name
Definition: subsys.h:28
Header file for dns.c.