main: Specialize the periodic events on a per-role basis
commited89bb32535fbf354b406a36f3176380a4e226bf
authorDavid Goulet <dgoulet@torproject.org>
Mon, 16 Apr 2018 19:50:50 +0000 (16 15:50 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Mon, 23 Apr 2018 14:21:59 +0000 (23 10:21 -0400)
tree95f677a956f72401eac55678e6bcf8d5e264a9c6
parent269cd5dba705e0a8ce30f473128779f34caf4da6
main: Specialize the periodic events on a per-role basis

In tor, we have a series of possible "roles" that the tor daemon can be
enabled for. They are:

  Client, Bridge, Relay, Authority (directory or bridge) and Onion service.

They can be combined sometimes. For instance, a Directory Authority is also a
Relay. This adds a "roles" field to a periodic event item object which is used
to know for which roles the event is for.

The next step is to enable the event only if the roles apply. No behavior
change at this commit.

Pars of #25762

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/or/main.c
src/or/periodic.h