routerinfo.h 954 Bytes
Newer Older
1
2
3
/* Copyright (c) 2001 Matej Pfajfar.
 * Copyright (c) 2001-2004, Roger Dingledine.
 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4
 * Copyright (c) 2007-2020, The Tor Project, Inc. */
5
6
7
8
9
10
11
12
13
14
/* See LICENSE for licensing information */

/**
 * \file routerinfo.h
 * \brief Header file for routerinfo.c.
 **/

#ifndef TOR_ROUTERINFO_H
#define TOR_ROUTERINFO_H

15
int router_get_orport(const routerinfo_t *router,
16
17
                       tor_addr_port_t *addr_port_out,
                       int family);
18
19
20
int router_has_orport(const routerinfo_t *router,
                      const tor_addr_port_t *orport);

21
22
23
24
struct ed25519_public_key_t;
const struct ed25519_public_key_t *routerinfo_get_ed25519_id(
                      const routerinfo_t *ri);

25
26
27
28
29
smartlist_t *router_get_all_orports(const routerinfo_t *ri);

const char *router_purpose_to_string(uint8_t p);
uint8_t router_purpose_from_string(const char *s);

Nick Mathewson's avatar
Nick Mathewson committed
30
#endif /* !defined(TOR_ROUTERINFO_H) */