aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuit.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-10-02 20:00:38 +0000
committerNick Mathewson <nickm@torproject.org>2003-10-02 20:00:38 +0000
commit985a3e14923e4d8a8b9e2914a66a800f89713da6 (patch)
tree38ed8d05e0291ac896f38d63a6f2e975686abc68 /src/or/circuit.c
parent6ac42f5ec059421fdfbeb3ef8f2b4448c14b2947 (diff)
downloadtor-985a3e14923e4d8a8b9e2914a66a800f89713da6.tar
tor-985a3e14923e4d8a8b9e2914a66a800f89713da6.tar.gz
Add new cell fullness and bandwidth stats.
svn:r533
Diffstat (limited to 'src/or/circuit.c')
-rw-r--r--src/or/circuit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/circuit.c b/src/or/circuit.c
index 25bd4d312..e047fc9e4 100644
--- a/src/or/circuit.c
+++ b/src/or/circuit.c
@@ -10,6 +10,9 @@ static void circuit_free_cpath(crypt_path_t *cpath);
static void circuit_free_cpath_node(crypt_path_t *victim);
static aci_t get_unique_aci_by_addr_port(uint32_t addr, uint16_t port, int aci_type);
+unsigned long stats_n_relay_cells_relayed = 0;
+unsigned long stats_n_relay_cells_delivered = 0;
+
/********* START VARIABLES **********/
static circuit_t *global_circuitlist=NULL;
@@ -240,15 +243,18 @@ int circuit_deliver_relay_cell(cell_t *cell, circuit_t *circ,
if(recognized) {
if(cell_direction == CELL_DIRECTION_OUT) {
+ ++stats_n_relay_cells_delivered;
log_fn(LOG_DEBUG,"Sending to exit.");
return connection_edge_process_relay_cell(cell, circ, conn, EDGE_EXIT, NULL);
}
if(cell_direction == CELL_DIRECTION_IN) {
+ ++stats_n_relay_cells_delivered;
log_fn(LOG_DEBUG,"Sending to AP.");
return connection_edge_process_relay_cell(cell, circ, conn, EDGE_AP, layer_hint);
}
}
+ ++stats_n_relay_cells_relayed;
/* not recognized. pass it on. */
if(cell_direction == CELL_DIRECTION_OUT)
conn = circ->n_conn;