Tor  0.4.5.0-alpha-dev
versions.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 versions.h
9  * \brief Header file for versions.c.
10  **/
11 
12 #ifndef TOR_VERSIONS_H
13 #define TOR_VERSIONS_H
14 
15 /** Possible statuses of a version of Tor, given opinions from the directory
16  * servers. */
17 typedef enum version_status_t {
18  VS_RECOMMENDED=0, /**< This version is listed as recommended. */
19  VS_OLD=1, /**< This version is older than any recommended version. */
20  VS_NEW=2, /**< This version is newer than any recommended version. */
21  VS_NEW_IN_SERIES=3, /**< This version is newer than any recommended version
22  * in its series, but later recommended versions exist.
23  */
24  VS_UNRECOMMENDED=4, /**< This version is not recommended (general case). */
25  VS_EMPTY=5, /**< The version list was empty; no agreed-on versions. */
26  VS_UNKNOWN, /**< We have no idea. */
28 
29 time_t tor_get_approx_release_date(void);
30 
31 version_status_t tor_version_is_obsolete(const char *myversion,
32  const char *versionlist);
33 int tor_version_parse_platform(const char *platform,
34  tor_version_t *version_out,
35  int strict);
36 int tor_version_as_new_as(const char *platform, const char *cutoff);
37 int tor_version_parse(const char *s, tor_version_t *out);
40 void sort_version_list(smartlist_t *lst, int remove_duplicates);
41 
43  const char *protocols,
44  const char *version);
45 
47 
48 #endif /* !defined(TOR_VERSIONS_H) */
protover_summary_flags_t
Definition: or.h:810
VS_NEW
@ VS_NEW
Definition: versions.h:20
tor_version_is_obsolete
version_status_t tor_version_is_obsolete(const char *myversion, const char *versionlist)
Definition: versions.c:53
VS_EMPTY
@ VS_EMPTY
Definition: versions.h:25
tor_version_parse
int tor_version_parse(const char *s, tor_version_t *out)
Definition: versions.c:206
version_status_t
version_status_t
Definition: versions.h:17
tor_version_t
Definition: tor_version_st.h:21
protover_summary_cache_free_all
void protover_summary_cache_free_all(void)
Definition: versions.c:531
tor_version_as_new_as
int tor_version_as_new_as(const char *platform, const char *cutoff)
Definition: versions.c:171
tor_version_same_series
int tor_version_same_series(tor_version_t *a, tor_version_t *b)
Definition: versions.c:356
tor_version_parse_platform
int tor_version_parse_platform(const char *platform, tor_version_t *version_out, int strict)
Definition: versions.c:127
sort_version_list
void sort_version_list(smartlist_t *lst, int remove_duplicates)
Definition: versions.c:391
summarize_protover_flags
void summarize_protover_flags(protover_summary_flags_t *out, const char *protocols, const char *version)
Definition: versions.c:501
VS_UNRECOMMENDED
@ VS_UNRECOMMENDED
Definition: versions.h:24
VS_UNKNOWN
@ VS_UNKNOWN
Definition: versions.h:26
VS_NEW_IN_SERIES
@ VS_NEW_IN_SERIES
Definition: versions.h:21
VS_RECOMMENDED
@ VS_RECOMMENDED
Definition: versions.h:18
VS_OLD
@ VS_OLD
Definition: versions.h:19
smartlist_t
Definition: smartlist_core.h:26
tor_get_approx_release_date
time_t tor_get_approx_release_date(void)
Definition: versions.c:25
tor_version_compare
int tor_version_compare(tor_version_t *a, tor_version_t *b)
Definition: versions.c:315