diff options
author | Roger Dingledine <arma@torproject.org> | 2013-09-01 04:40:05 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2013-09-04 23:21:45 -0400 |
commit | bb32bfa2f240d3f417e11b08d98069e0a4a8307e (patch) | |
tree | c11fbaf775522e65f1d7084ec3abed517325496c /src/or/onion.h | |
parent | 87a18514efc7af2ee70d3f180aede5a8da95457c (diff) | |
download | tor-bb32bfa2f240d3f417e11b08d98069e0a4a8307e.tar.gz tor-bb32bfa2f240d3f417e11b08d98069e0a4a8307e.zip |
refactor and give it unit tests
Diffstat (limited to 'src/or/onion.h')
-rw-r--r-- | src/or/onion.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/onion.h b/src/or/onion.h index db4c999c9e..d62f032b87 100644 --- a/src/or/onion.h +++ b/src/or/onion.h @@ -15,6 +15,7 @@ struct create_cell_t; int onion_pending_add(or_circuit_t *circ, struct create_cell_t *onionskin); or_circuit_t *onion_next_task(struct create_cell_t **onionskin_out); +int onion_num_pending(uint16_t handshake_type); void onion_pending_remove(or_circuit_t *circ); void clear_pending_onions(void); @@ -99,6 +100,9 @@ typedef struct extended_cell_t { created_cell_t created_cell; } extended_cell_t; +void create_cell_init(create_cell_t *cell_out, uint8_t cell_type, + uint16_t handshake_type, uint16_t handshake_len, + const uint8_t *onionskin); int create_cell_parse(create_cell_t *cell_out, const cell_t *cell_in); int created_cell_parse(created_cell_t *cell_out, const cell_t *cell_in); int extend_cell_parse(extend_cell_t *cell_out, const uint8_t command, |