Tor  0.4.6.0-alpha-dev
extendinfo.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-2020, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 /**
8  * @file extendinfo.h
9  * @brief Header for core/or/extendinfo.c
10  **/
11 
12 #ifndef TOR_CORE_OR_EXTENDINFO_H
13 #define TOR_CORE_OR_EXTENDINFO_H
14 
15 extend_info_t *extend_info_new(const char *nickname,
16  const char *rsa_id_digest,
17  const struct ed25519_public_key_t *ed_id,
18  crypto_pk_t *onion_key,
19  const struct curve25519_public_key_t *ntor_key,
20  const tor_addr_t *addr, uint16_t port);
21 extend_info_t *extend_info_from_node(const node_t *r, int for_direct_connect);
24 #define extend_info_free(info) \
25  FREE_AND_NULL(extend_info_t, extend_info_free_, (info))
27 int extend_info_supports_tap(const extend_info_t* ei);
28 int extend_info_supports_ntor(const extend_info_t* ei);
29 int extend_info_has_preferred_onion_key(const extend_info_t* ei);
31  const tor_addr_t *addr, uint16_t port);
33  const tor_addr_t *addr,
34  uint16_t port);
36  int family);
39 
40 #endif /* !defined(TOR_CORE_OR_EXTENDINFO_H) */
extend_info_any_orport_addr_is_internal
bool extend_info_any_orport_addr_is_internal(const extend_info_t *ei)
Definition: extendinfo.c:318
tor_addr_t
Definition: address.h:69
extend_info_has_orport
bool extend_info_has_orport(const extend_info_t *ei, const tor_addr_t *addr, uint16_t port)
Definition: extendinfo.c:243
extend_info_new
extend_info_t * extend_info_new(const char *nickname, const char *rsa_id_digest, const ed25519_public_key_t *ed_id, crypto_pk_t *onion_key, const curve25519_public_key_t *ntor_key, const tor_addr_t *addr, uint16_t port)
Definition: extendinfo.c:33
tor_addr_port_t
Definition: address.h:81
node_t
Definition: node_st.h:34
ed25519_public_key_t
Definition: crypto_ed25519.h:23
extend_info_dup
extend_info_t * extend_info_dup(extend_info_t *info)
Definition: extendinfo.c:180
extend_info_free_
void extend_info_free_(extend_info_t *info)
Definition: extendinfo.c:169
curve25519_public_key_t
Definition: crypto_curve25519.h:24
crypto_pk_t
Definition: crypto_rsa_nss.c:37
extend_info_addr_is_allowed
int extend_info_addr_is_allowed(const tor_addr_t *addr)
Definition: extendinfo.c:224
extend_info_get_orport
const tor_addr_port_t * extend_info_get_orport(const extend_info_t *ei, int family)
Definition: extendinfo.c:263
extend_info_from_node
extend_info_t * extend_info_from_node(const node_t *r, int for_direct_connect)
Definition: extendinfo.c:92
extend_info_add_orport
int extend_info_add_orport(extend_info_t *ei, const tor_addr_t *addr, uint16_t port)
Definition: extendinfo.c:67
extend_info_t
Definition: extend_info_st.h:27
extend_info_pick_orport
const tor_addr_port_t * extend_info_pick_orport(const extend_info_t *ei)
Definition: extendinfo.c:278