Tor
0.4.7.0-alpha-dev
core
or
extend_info_st.h
Go to the documentation of this file.
1
/* Copyright (c) 2001 Matej Pfajfar.
2
* Copyright (c) 2001-2004, Roger Dingledine.
3
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4
* Copyright (c) 2007-2021, The Tor Project, Inc. */
5
/* See LICENSE for licensing information */
6
7
/**
8
* @file extend_info_st.h
9
* @brief Extend-info structure.
10
**/
11
12
#ifndef EXTEND_INFO_ST_H
13
#define EXTEND_INFO_ST_H
14
15
#include "
lib/crypt_ops/crypto_curve25519.h
"
16
#include "
lib/crypt_ops/crypto_ed25519.h
"
17
18
/** Largest number of addresses we handle in an extend_info.
19
*
20
* More are permitted in an EXTEND cell, but we won't handle them. */
21
#define EXTEND_INFO_MAX_ADDRS 2
22
23
/** Information on router used when extending a circuit. We don't need a
24
* full routerinfo_t to extend: we only need addr:port:keyid to build an OR
25
* connection, and onion_key to create the onionskin. Note that for one-hop
26
* general-purpose tunnels, the onion_key is NULL. */
27
struct
extend_info_t
{
28
char
nickname
[
MAX_HEX_NICKNAME_LEN
+1];
/**< This router's nickname for
29
* display. */
30
/** Hash of this router's RSA identity key. */
31
char
identity_digest
[
DIGEST_LEN
];
32
/** Ed25519 identity for this router, if any. */
33
ed25519_public_key_t
ed_identity
;
34
/** IP/Port values for this hop's ORPort(s). Any unused values are set
35
* to a null address. */
36
tor_addr_port_t
orports
[
EXTEND_INFO_MAX_ADDRS
];
37
/** TAP onion key for this hop. */
38
crypto_pk_t
*
onion_key
;
39
/** Ntor onion key for this hop. */
40
curve25519_public_key_t
curve25519_onion_key
;
41
};
42
43
#endif
/* !defined(EXTEND_INFO_ST_H) */
crypto_curve25519.h
Header for crypto_curve25519.c.
crypto_ed25519.h
Header for crypto_ed25519.c.
DIGEST_LEN
#define DIGEST_LEN
Definition:
digest_sizes.h:20
EXTEND_INFO_MAX_ADDRS
#define EXTEND_INFO_MAX_ADDRS
Definition:
extend_info_st.h:21
MAX_HEX_NICKNAME_LEN
#define MAX_HEX_NICKNAME_LEN
Definition:
or.h:115
crypto_pk_t
Definition:
crypto_rsa_nss.c:37
curve25519_public_key_t
Definition:
crypto_curve25519.h:24
ed25519_public_key_t
Definition:
crypto_ed25519.h:23
extend_info_t
Definition:
extend_info_st.h:27
extend_info_t::orports
tor_addr_port_t orports[EXTEND_INFO_MAX_ADDRS]
Definition:
extend_info_st.h:36
extend_info_t::ed_identity
ed25519_public_key_t ed_identity
Definition:
extend_info_st.h:33
extend_info_t::identity_digest
char identity_digest[DIGEST_LEN]
Definition:
extend_info_st.h:31
extend_info_t::nickname
char nickname[MAX_HEX_NICKNAME_LEN+1]
Definition:
extend_info_st.h:28
extend_info_t::onion_key
crypto_pk_t * onion_key
Definition:
extend_info_st.h:38
extend_info_t::curve25519_onion_key
curve25519_public_key_t curve25519_onion_key
Definition:
extend_info_st.h:40
tor_addr_port_t
Definition:
address.h:81
Generated by
1.9.1