Tor  0.4.7.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-2021, 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_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
void extend_info_free_(extend_info_t *info)
Definition: extendinfo.c:169
const tor_addr_port_t * extend_info_get_orport(const extend_info_t *ei, int family)
Definition: extendinfo.c:263
int extend_info_add_orport(extend_info_t *ei, const tor_addr_t *addr, uint16_t port)
Definition: extendinfo.c:67
const tor_addr_port_t * extend_info_pick_orport(const extend_info_t *ei)
Definition: extendinfo.c:278
bool extend_info_any_orport_addr_is_internal(const extend_info_t *ei)
Definition: extendinfo.c:318
extend_info_t * extend_info_dup(extend_info_t *info)
Definition: extendinfo.c:180
bool extend_info_has_orport(const extend_info_t *ei, const tor_addr_t *addr, uint16_t port)
Definition: extendinfo.c:243
extend_info_t * extend_info_from_node(const node_t *r, int for_direct_connect)
Definition: extendinfo.c:92
int extend_info_addr_is_allowed(const tor_addr_t *addr)
Definition: extendinfo.c:224
Definition: node_st.h:34