Tor  0.4.7.0-alpha-dev
hs_stats.c
Go to the documentation of this file.
1 /* Copyright (c) 2016-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
3 
4 /**
5  * \file hs_stats.c
6  * \brief Keeps stats about the activity of our onion service(s).
7  **/
8 
9 #include "core/or/or.h"
10 #include "feature/hs/hs_stats.h"
11 #include "feature/hs/hs_service.h"
12 
13 /** Number of v3 INTRODUCE2 cells received */
14 static uint32_t n_introduce2_v3 = 0;
15 /** Number of attempts to make a circuit to a rendezvous point */
16 static uint32_t n_rendezvous_launches = 0;
17 
18 /** Note that we received another INTRODUCE2 cell. */
19 void
21 {
23 }
24 
25 /** Return the number of v3 INTRODUCE2 cells we have received. */
26 uint32_t
28 {
29  return n_introduce2_v3;
30 }
31 
32 /** Note that we attempted to launch another circuit to a rendezvous point. */
33 void
35 {
37 }
38 
39 /** Return the number of rendezvous circuits we have attempted to launch. */
40 uint32_t
42 {
43  return n_rendezvous_launches;
44 }
45 
Header file containing service data for the HS subsystem.
uint32_t hs_stats_get_n_introduce2_v3_cells(void)
Definition: hs_stats.c:27
void hs_stats_note_introduce2_cell(void)
Definition: hs_stats.c:20
uint32_t hs_stats_get_n_rendezvous_launches(void)
Definition: hs_stats.c:41
static uint32_t n_introduce2_v3
Definition: hs_stats.c:14
static uint32_t n_rendezvous_launches
Definition: hs_stats.c:16
void hs_stats_note_service_rendezvous_launch(void)
Definition: hs_stats.c:34
Header file for hs_stats.c.
Master header file for Tor-specific functionality.