summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-07-13 19:16:49 +0000
committerNick Mathewson <nickm@torproject.org>2004-07-13 19:16:49 +0000
commit5f7738d4cc91df8b61bf3a9e9f55271500f9facc (patch)
treec44ab7dfe7bc1b87644ba682d285e3b77fce2402 /src/or/or.h
parentc2103eb63a15d2bb840e4ce7932ff12f21c95145 (diff)
downloadtor-5f7738d4cc91df8b61bf3a9e9f55271500f9facc.tar.gz
tor-5f7738d4cc91df8b61bf3a9e9f55271500f9facc.zip
Code to parse tor version numbers so we can do an is-newer-than check.
svn:r2044
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 61ed9a5a22..a9f1208664 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1383,6 +1383,15 @@ void routerlist_update_from_runningrouters(routerlist_t *list,
/********************************* routerparse.c ************************/
+typedef struct tor_version_t {
+ int major;
+ int minor;
+ int micro;
+ enum { VER_PRE=0, VER_RC=1, VER_RELEASE=2 } status;
+ int patchlevel;
+ enum { IS_CVS=0, IS_NOT_CVS=1} cvs;
+} tor_version_t;
+
int router_get_router_hash(const char *s, char *digest);
int router_get_dir_hash(const char *s, char *digest);
int router_get_runningrouters_hash(const char *s, char *digest);
@@ -1399,7 +1408,9 @@ int router_add_exit_policy_from_string(routerinfo_t *router, const char *s);
struct exit_policy_t *router_parse_exit_policy_from_string(const char *s);
int check_software_version_against_directory(const char *directory,
int ignoreversion);
-
+int tor_version_parse(const char *s, tor_version_t *out);
+int tor_version_compare(tor_version_t *a, tor_version_t *b);
+int tor_version_compare_to_mine(const char *s);
#endif