tor_version_st.h 876 B

1234567891011121314151617181920212223242526272829303132
  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-2019, The Tor Project, Inc. */
  5. /* See LICENSE for licensing information */
  6. #ifndef TOR_VERSION_ST_H
  7. #define TOR_VERSION_ST_H
  8. #define MAX_STATUS_TAG_LEN 32
  9. /** Structure to hold parsed Tor versions. This is a little messier
  10. * than we would like it to be, because we changed version schemes with 0.1.0.
  11. *
  12. * See version-spec.txt for the whole business.
  13. */
  14. struct tor_version_t {
  15. int major;
  16. int minor;
  17. int micro;
  18. /** Release status. For version in the post-0.1 format, this is always
  19. * VER_RELEASE. */
  20. enum { VER_PRE=0, VER_RC=1, VER_RELEASE=2, } status;
  21. int patchlevel;
  22. char status_tag[MAX_STATUS_TAG_LEN];
  23. int svn_revision;
  24. int git_tag_len;
  25. char git_tag[DIGEST_LEN];
  26. };
  27. #endif