Tor  0.4.7.0-alpha-dev
Macros | Functions
or_periodic.c File Reference

Periodic callbacks for the onion routing subsystem. More...

#include "orconfig.h"
#include "core/or/or.h"
#include "core/mainloop/periodic.h"
#include "core/or/channel.h"
#include "core/or/circuituse.h"
#include "core/or/or_periodic.h"
#include "feature/relay/routermode.h"

Go to the source code of this file.

Macros

#define DECLARE_EVENT(name, roles, flags)
 
#define FL(name)   (PERIODIC_EVENT_FLAG_ ## name)
 
#define CHANNEL_CHECK_INTERVAL   (60*60)
 

Functions

static int check_canonical_channels_callback (time_t now, const or_options_t *options)
 
 DECLARE_EVENT (check_canonical_channels, RELAY, FL(NEED_NET))
 
static int expire_old_circuits_serverside_callback (time_t now, const or_options_t *options)
 
 DECLARE_EVENT (expire_old_circuits_serverside, ROUTER, FL(NEED_NET))
 
void or_register_periodic_events (void)
 

Detailed Description

Periodic callbacks for the onion routing subsystem.

Definition in file or_periodic.c.

Macro Definition Documentation

◆ DECLARE_EVENT

#define DECLARE_EVENT (   name,
  roles,
  flags 
)
Value:
static periodic_event_item_t name ## _event = \
PERIODIC_EVENT(name, \
PERIODIC_EVENT_ROLE_##roles, \
flags)
const char * name
Definition: config.c:2434

Definition at line 24 of file or_periodic.c.

Function Documentation

◆ expire_old_circuits_serverside_callback()

static int expire_old_circuits_serverside_callback ( time_t  now,
const or_options_t options 
)
static

Periodic callback: as a server, see if we have any old unused circuits that should be expired

Definition at line 50 of file or_periodic.c.