Tor  0.4.4.0-alpha-dev
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-2020, 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 */
20  /** For use in a consensus networkstatus document (ns flavor) */
22  /** For use in a vote networkstatus document */
24  /** For passing to the controlport in response to a GETINFO request */
26  /** For use in a consensus networkstatus document (microdesc flavor) */
29 
30 /** Maximum allowable length of a version line in a networkstatus. */
31 #define MAX_V_LINE_LEN 128
32 
34  const routerstatus_t *rs,
35  const char *version,
36  const char *protocols,
38  const vote_routerstatus_t *vrs);
39 
40 #endif /* !defined(TOR_FMT_ROUTERSTATUS_H) */
char * routerstatus_format_entry(const routerstatus_t *rs, const char *version, const char *protocols, routerstatus_format_type_t format, const vote_routerstatus_t *vrs)
routerstatus_format_type_t