tor  0.4.2.0-alpha-dev
btrack.c
Go to the documentation of this file.
1 /* Copyright (c) 2007-2019, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
3 
27 #include "lib/pubsub/pubsub.h"
28 #include "lib/subsys/subsys.h"
29 
30 static int
31 btrack_init(void)
32 {
33  if (btrack_orconn_init())
34  return -1;
35 
36  return 0;
37 }
38 
39 static void
40 btrack_fini(void)
41 {
43  btrack_circ_fini();
44 }
45 
46 static int
47 btrack_add_pubsub(pubsub_connector_t *connector)
48 {
49  if (btrack_orconn_add_pubsub(connector))
50  return -1;
51  if (btrack_circ_add_pubsub(connector))
52  return -1;
53 
54  return 0;
55 }
56 
57 const subsys_fns_t sys_btrack = {
58  .name = "btrack",
59  .supported = true,
60  .level = -30,
61  .initialize = btrack_init,
62  .shutdown = btrack_fini,
63  .add_pubsub = btrack_add_pubsub,
64 };
struct pubsub_connector_t pubsub_connector_t
int btrack_orconn_init(void)
Header file for btrack_orconn.c.
Header file for btrack_circuit.c.
Declare subsystem object for the bootstrap tracker susbystem.
void btrack_orconn_fini(void)
const char * name
Definition: subsys.h:28
Header for OO publish-subscribe functionality.