mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
Create onion.h
This commit is contained in:
parent
af0c954bc5
commit
f6852fe031
@ -23,6 +23,7 @@
|
|||||||
#include "directory.h"
|
#include "directory.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "networkstatus.h"
|
#include "networkstatus.h"
|
||||||
|
#include "onion.h"
|
||||||
#include "router.h"
|
#include "router.h"
|
||||||
#include "routerlist.h"
|
#include "routerlist.h"
|
||||||
#include "crypto.h"
|
#include "crypto.h"
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "connection_or.h"
|
#include "connection_or.h"
|
||||||
#include "control.h"
|
#include "control.h"
|
||||||
#include "networkstatus.h"
|
#include "networkstatus.h"
|
||||||
|
#include "onion.h"
|
||||||
#include "rendclient.h"
|
#include "rendclient.h"
|
||||||
#include "rendcommon.h"
|
#include "rendcommon.h"
|
||||||
#include "routerlist.h"
|
#include "routerlist.h"
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "control.h"
|
#include "control.h"
|
||||||
#include "cpuworker.h"
|
#include "cpuworker.h"
|
||||||
#include "hibernate.h"
|
#include "hibernate.h"
|
||||||
|
#include "onion.h"
|
||||||
#include "router.h"
|
#include "router.h"
|
||||||
#include "routerlist.h"
|
#include "routerlist.h"
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "connection.h"
|
#include "connection.h"
|
||||||
#include "cpuworker.h"
|
#include "cpuworker.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
#include "onion.h"
|
||||||
#include "router.h"
|
#include "router.h"
|
||||||
|
|
||||||
/** The maximum number of cpuworker processes we will keep around. */
|
/** The maximum number of cpuworker processes we will keep around. */
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "microdesc.h"
|
#include "microdesc.h"
|
||||||
#include "networkstatus.h"
|
#include "networkstatus.h"
|
||||||
#include "ntmain.h"
|
#include "ntmain.h"
|
||||||
|
#include "onion.h"
|
||||||
#include "rendclient.h"
|
#include "rendclient.h"
|
||||||
#include "rendcommon.h"
|
#include "rendcommon.h"
|
||||||
#include "rendservice.h"
|
#include "rendservice.h"
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include "or.h"
|
#include "or.h"
|
||||||
#include "circuitlist.h"
|
#include "circuitlist.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "onion.h"
|
||||||
|
|
||||||
/** Type for a linked list of circuits that are waiting for a free CPU worker
|
/** Type for a linked list of circuits that are waiting for a free CPU worker
|
||||||
* to process a waiting onion handshake. */
|
* to process a waiting onion handshake. */
|
||||||
|
48
src/or/onion.h
Normal file
48
src/or/onion.h
Normal file
@ -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
|
||||||
|
|
34
src/or/or.h
34
src/or/or.h
@ -3293,40 +3293,6 @@ typedef enum version_status_t {
|
|||||||
VS_UNKNOWN, /**< We have no idea. */
|
VS_UNKNOWN, /**< We have no idea. */
|
||||||
} version_status_t;
|
} 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 ************************/
|
/********************************* policies.c ************************/
|
||||||
|
|
||||||
/* (length of "accept 255.255.255.255/255.255.255.255:65535-65535\n" plus a
|
/* (length of "accept 255.255.255.255/255.255.255.255:65535-65535\n" plus a
|
||||||
|
@ -53,6 +53,7 @@ double fabs(double x);
|
|||||||
#include "torgzip.h"
|
#include "torgzip.h"
|
||||||
#include "mempool.h"
|
#include "mempool.h"
|
||||||
#include "memarea.h"
|
#include "memarea.h"
|
||||||
|
#include "onion.h"
|
||||||
|
|
||||||
#ifdef USE_DMALLOC
|
#ifdef USE_DMALLOC
|
||||||
#include <dmalloc.h>
|
#include <dmalloc.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user