aboutsummaryrefslogtreecommitdiff
path: root/src/or/relay_crypto.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-03-17 10:21:57 -0400
committerNick Mathewson <nickm@torproject.org>2018-03-17 10:23:44 -0400
commit80955be6ecae7095d267981b39d10237aabc38a6 (patch)
tree2493b6603455eedc8ebea5f709c60d1d27717a78 /src/or/relay_crypto.h
parent320dcf65b7c8e382b27260a037bd1e93e563ccb9 (diff)
downloadtor-80955be6ecae7095d267981b39d10237aabc38a6.tar.gz
tor-80955be6ecae7095d267981b39d10237aabc38a6.zip
Move relay-crypto functions from relay.[ch] to relay_crypto.[ch]
This should help us improve modularity, and should also make it easier for people to experiment with other relay crypto strategies down the road. This commit is pure function movement.
Diffstat (limited to 'src/or/relay_crypto.h')
-rw-r--r--src/or/relay_crypto.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/or/relay_crypto.h b/src/or/relay_crypto.h
new file mode 100644
index 0000000000..8d09179417
--- /dev/null
+++ b/src/or/relay_crypto.h
@@ -0,0 +1,23 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2017, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file relay.h
+ * \brief Header file for relay.c.
+ **/
+
+#ifndef TOR_RELAY_CRYPTO_H
+#define TOR_RELAY_CRYPTO_H
+
+int relay_decrypt_cell(circuit_t *circ, cell_t *cell,
+ cell_direction_t cell_direction,
+ crypt_path_t **layer_hint, char *recognized);
+void relay_encrypt_cell_outbound(cell_t *cell, origin_circuit_t *or_circ,
+ crypt_path_t *layer_hint);
+void relay_encrypt_cell_inbound(cell_t *cell, or_circuit_t *or_circ);
+
+#endif /* !defined(TOR_RELAY_CRYPTO_H) */
+