summaryrefslogtreecommitdiff
path: root/src/or/relay.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-12-17 17:20:19 +0000
committerNick Mathewson <nickm@torproject.org>2008-12-17 17:20:19 +0000
commit68a6935afb9566cb2e521997b48741a1037b5802 (patch)
tree13b331ba233cc12e4055852db73c6a1d98a0228b /src/or/relay.c
parent44e19a4949f39687363c8b1098ebea4c98625afb (diff)
downloadtor-68a6935afb9566cb2e521997b48741a1037b5802.tar.gz
tor-68a6935afb9566cb2e521997b48741a1037b5802.zip
Change CELL_DIRECTION_* to an enum.
svn:r17646
Diffstat (limited to 'src/or/relay.c')
-rw-r--r--src/or/relay.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index 83dfea5c0a..4ebfc12cbb 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -16,10 +16,10 @@ const char relay_c_id[] =
#include "or.h"
#include "mempool.h"
-static int relay_crypt(circuit_t *circ, cell_t *cell, int cell_direction,
+static int relay_crypt(circuit_t *circ, cell_t *cell, cell_direction_t cell_direction,
crypt_path_t **layer_hint, char *recognized);
static edge_connection_t *relay_lookup_conn(circuit_t *circ, cell_t *cell,
- int cell_direction,
+ cell_direction_t cell_direction,
crypt_path_t *layer_hint);
static int
@@ -141,7 +141,8 @@ relay_crypt_one_payload(crypto_cipher_env_t *cipher, char *in,
* Return -<b>reason</b> on failure.
*/
int
-circuit_receive_relay_cell(cell_t *cell, circuit_t *circ, int cell_direction)
+circuit_receive_relay_cell(cell_t *cell, circuit_t *circ,
+ cell_direction_t cell_direction)
{
or_connection_t *or_conn=NULL;
crypt_path_t *layer_hint=NULL;
@@ -252,7 +253,7 @@ circuit_receive_relay_cell(cell_t *cell, circuit_t *circ, int cell_direction)
* else return 0.
*/
static int
-relay_crypt(circuit_t *circ, cell_t *cell, int cell_direction,
+relay_crypt(circuit_t *circ, cell_t *cell, cell_direction_t cell_direction,
crypt_path_t **layer_hint, char *recognized)
{
relay_header_t rh;
@@ -326,7 +327,7 @@ relay_crypt(circuit_t *circ, cell_t *cell, int cell_direction,
*/
static int
circuit_package_relay_cell(cell_t *cell, circuit_t *circ,
- int cell_direction,
+ cell_direction_t cell_direction,
crypt_path_t *layer_hint)
{
or_connection_t *conn; /* where to send the cell */
@@ -379,7 +380,7 @@ circuit_package_relay_cell(cell_t *cell, circuit_t *circ,
* attached to circ, return that conn, else return NULL.
*/
static edge_connection_t *
-relay_lookup_conn(circuit_t *circ, cell_t *cell, int cell_direction,
+relay_lookup_conn(circuit_t *circ, cell_t *cell, cell_direction_t cell_direction,
crypt_path_t *layer_hint)
{
edge_connection_t *tmpconn;
@@ -472,7 +473,7 @@ relay_send_command_from_edge(uint16_t stream_id, circuit_t *circ,
{
cell_t cell;
relay_header_t rh;
- int cell_direction;
+ cell_direction_t cell_direction;
/* XXXX NM Split this function into a separate versions per circuit type? */
tor_assert(circ);
@@ -1801,7 +1802,7 @@ connection_or_flush_from_first_active_circuit(or_connection_t *conn, int max,
* transmitting in <b>direction</b>. */
void
append_cell_to_circuit_queue(circuit_t *circ, or_connection_t *orconn,
- cell_t *cell, int direction)
+ cell_t *cell, cell_direction_t direction)
{
cell_queue_t *queue;
int streams_blocked;