Tor
0.4.7.0-alpha-dev
feature
nodelist
fmt_routerstatus.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 fmt_routerstatus.h
9
* \brief Header file for fmt_routerstatus.c.
10
**/
11
12
#ifndef TOR_FMT_ROUTERSTATUS_H
13
#define TOR_FMT_ROUTERSTATUS_H
14
15
/** An enum to describe what format we're generating a routerstatus line in.
16
*/
17
typedef
enum
{
18
/** For use in a v2 opinion */
19
NS_V2
,
20
/** For use in a consensus networkstatus document (ns flavor) */
21
NS_V3_CONSENSUS
,
22
/** For use in a vote networkstatus document */
23
NS_V3_VOTE
,
24
/** For passing to the controlport in response to a GETINFO request */
25
NS_CONTROL_PORT
,
26
/** For use in a consensus networkstatus document (microdesc flavor) */
27
NS_V3_CONSENSUS_MICRODESC
28
}
routerstatus_format_type_t
;
29
30
/** Maximum allowable length of a version line in a networkstatus. */
31
#define MAX_V_LINE_LEN 128
32
33
char
*
routerstatus_format_entry
(
34
const
routerstatus_t
*rs,
35
const
char
*version,
36
const
char
*protocols,
37
routerstatus_format_type_t
format,
38
const
vote_routerstatus_t
*vrs);
39
40
#endif
/* !defined(TOR_FMT_ROUTERSTATUS_H) */
routerstatus_format_type_t
routerstatus_format_type_t
Definition:
fmt_routerstatus.h:17
NS_V3_VOTE
@ NS_V3_VOTE
Definition:
fmt_routerstatus.h:23
NS_CONTROL_PORT
@ NS_CONTROL_PORT
Definition:
fmt_routerstatus.h:25
NS_V3_CONSENSUS
@ NS_V3_CONSENSUS
Definition:
fmt_routerstatus.h:21
NS_V3_CONSENSUS_MICRODESC
@ NS_V3_CONSENSUS_MICRODESC
Definition:
fmt_routerstatus.h:27
NS_V2
@ NS_V2
Definition:
fmt_routerstatus.h:19
routerstatus_format_entry
char * routerstatus_format_entry(const routerstatus_t *rs, const char *version, const char *protocols, routerstatus_format_type_t format, const vote_routerstatus_t *vrs)
Definition:
fmt_routerstatus.c:43
routerstatus_t
Definition:
routerstatus_st.h:19
vote_routerstatus_t
Definition:
vote_routerstatus_st.h:18
Generated by
1.9.1