]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Create onion.h
authorSebastian Hahn <sebastian@torproject.org>
Fri, 23 Jul 2010 18:38:25 +0000 (20:38 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Tue, 27 Jul 2010 08:00:45 +0000 (10:00 +0200)
src/or/circuitbuild.c
src/or/circuitlist.c
src/or/command.c
src/or/cpuworker.c
src/or/main.c
src/or/onion.c
src/or/onion.h [new file with mode: 0644]
src/or/or.h
src/test/test.c

index 5b360807d5be866144b980c6b9da48b592932d51..00c9026faaa0d57e1717fa3b99317503560cadac 100644 (file)
@@ -23,6 +23,7 @@
 #include "directory.h"
 #include "main.h"
 #include "networkstatus.h"
+#include "onion.h"
 #include "router.h"
 #include "routerlist.h"
 #include "crypto.h"
index b8c2737663166ff9f93486801827e32a10a5aca0..044cdb9c3409b0428c425cdc5c37ab2ca97c675a 100644 (file)
@@ -19,6 +19,7 @@
 #include "connection_or.h"
 #include "control.h"
 #include "networkstatus.h"
+#include "onion.h"
 #include "rendclient.h"
 #include "rendcommon.h"
 #include "routerlist.h"
index 796f75cde4eba9f1a5e431206bd396519a013921..b3b7c2d37488a845ccd9e1eba56df72377aa4b9c 100644 (file)
@@ -25,6 +25,7 @@
 #include "control.h"
 #include "cpuworker.h"
 #include "hibernate.h"
+#include "onion.h"
 #include "router.h"
 #include "routerlist.h"
 
index 4ab6d4164f8ab0fdbb9b2c2c7a628582d0b29ffc..2760d96665378bb01c681b9b82ebb3978e09f404 100644 (file)
@@ -20,6 +20,7 @@
 #include "connection.h"
 #include "cpuworker.h"
 #include "main.h"
+#include "onion.h"
 #include "router.h"
 
 /** The maximum number of cpuworker processes we will keep around. */
index 67688bd6df09a1b45a5765222d3ace7a4fea9664..b30a77edddbf46f3fc98f023544066e07b5e1283 100644 (file)
@@ -34,6 +34,7 @@
 #include "microdesc.h"
 #include "networkstatus.h"
 #include "ntmain.h"
+#include "onion.h"
 #include "rendclient.h"
 #include "rendcommon.h"
 #include "rendservice.h"
index 5b4f3a07c7d65c17ef452b2ac357eebf04d845bd..1612d389de0946f6f3556ceffa4254661a9189e7 100644 (file)
@@ -13,6 +13,7 @@
 #include "or.h"
 #include "circuitlist.h"
 #include "config.h"
+#include "onion.h"
 
 /** Type for a linked list of circuits that are waiting for a free CPU worker
  * to process a waiting onion handshake. */
diff --git a/src/or/onion.h b/src/or/onion.h
new file mode 100644 (file)
index 0000000..e84dbb4
--- /dev/null
@@ -0,0 +1,48 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2010, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file onion.h
+ * \brief Header file for onion.c.
+ **/
+
+#ifndef _TOR_ONION_H
+#define _TOR_ONION_H
+
+int onion_pending_add(or_circuit_t *circ, char *onionskin);
+or_circuit_t *onion_next_task(char **onionskin_out);
+void onion_pending_remove(or_circuit_t *circ);
+
+int onion_skin_create(crypto_pk_env_t *router_key,
+                      crypto_dh_env_t **handshake_state_out,
+                      char *onion_skin_out);
+
+int onion_skin_server_handshake(const char *onion_skin,
+                                crypto_pk_env_t *private_key,
+                                crypto_pk_env_t *prev_private_key,
+                                char *handshake_reply_out,
+                                char *key_out,
+                                size_t key_out_len);
+
+int onion_skin_client_handshake(crypto_dh_env_t *handshake_state,
+                                const char *handshake_reply,
+                                char *key_out,
+                                size_t key_out_len);
+
+int fast_server_handshake(const char *key_in,
+                          char *handshake_reply_out,
+                          char *key_out,
+                          size_t key_out_len);
+
+int fast_client_handshake(const char *handshake_state,
+                          const char *handshake_reply_out,
+                          char *key_out,
+                          size_t key_out_len);
+
+void clear_pending_onions(void);
+
+#endif
+
index 2afbac6f3861bc2ad7304092ef2d6b9074e3cae0..8322cf3d47485ee43e73ea5cd349943f6707cf69 100644 (file)
@@ -3293,40 +3293,6 @@ typedef enum version_status_t {
   VS_UNKNOWN, /**< We have no idea. */
 } version_status_t;
 
-/********************************* onion.c ***************************/
-
-int onion_pending_add(or_circuit_t *circ, char *onionskin);
-or_circuit_t *onion_next_task(char **onionskin_out);
-void onion_pending_remove(or_circuit_t *circ);
-
-int onion_skin_create(crypto_pk_env_t *router_key,
-                      crypto_dh_env_t **handshake_state_out,
-                      char *onion_skin_out);
-
-int onion_skin_server_handshake(const char *onion_skin,
-                                crypto_pk_env_t *private_key,
-                                crypto_pk_env_t *prev_private_key,
-                                char *handshake_reply_out,
-                                char *key_out,
-                                size_t key_out_len);
-
-int onion_skin_client_handshake(crypto_dh_env_t *handshake_state,
-                                const char *handshake_reply,
-                                char *key_out,
-                                size_t key_out_len);
-
-int fast_server_handshake(const char *key_in,
-                          char *handshake_reply_out,
-                          char *key_out,
-                          size_t key_out_len);
-
-int fast_client_handshake(const char *handshake_state,
-                          const char *handshake_reply_out,
-                          char *key_out,
-                          size_t key_out_len);
-
-void clear_pending_onions(void);
-
 /********************************* policies.c ************************/
 
 /* (length of "accept 255.255.255.255/255.255.255.255:65535-65535\n" plus a
index 7e6bf70550d8ec94d845f80fb74e48753230a0a4..a1e286819621c07015c43b07e5c34cb61be7a616 100644 (file)
@@ -53,6 +53,7 @@ double fabs(double x);
 #include "torgzip.h"
 #include "mempool.h"
 #include "memarea.h"
+#include "onion.h"
 
 #ifdef USE_DMALLOC
 #include <dmalloc.h>