1. 21 Sep, 2018 2 commits
    • Nick Mathewson's avatar
      Split main.c into main.c and mainloop.c · c7ce6b98
      Nick Mathewson authored
      The main.c code is responsible for initialization and shutdown;
      the mainloop.c code is responsible for running the main loop of Tor.
      
      Splitting the "generic event loop" part of mainloop.c from the
      event-loop-specific part is not done as part of this patch.
      c7ce6b98
    • Nick Mathewson's avatar
      Move the non-crypto parts of onion.c out of src/core/crypto · 98ef3e82
      Nick Mathewson authored
      The parts for handling cell formats should be in src/core/or.
      
      The parts for handling onionskin queues should be in src/core/or.
      
      Only the crypto wrapper belongs in src/core/crypto.
      98ef3e82
  2. 18 Sep, 2018 1 commit
  3. 05 Jul, 2018 2 commits
    • Nick Mathewson's avatar
      Fix every include path changed in the previous commit (automated) · ef486e3c
      Nick Mathewson authored
      I am very glad to have written this script.
      ef486e3c
    • Nick Mathewson's avatar
      Move literally everything out of src/or · 63b4ea22
      Nick Mathewson authored
      This commit won't build yet -- it just puts everything in a slightly
      more logical place.
      
      The reasoning here is that "src/core" will hold the stuff that every (or
      nearly every) tor instance will need in order to do onion routing.
      Other features (including some necessary ones) will live in
      "src/feature".  The "src/app" directory will hold the stuff needed
      to have Tor be an application you can actually run.
      
      This commit DOES NOT refactor the former contents of src/or into a
      logical set of acyclic libraries, or change any code at all.  That
      will have to come in the future.
      
      We will continue to move things around and split them in the future,
      but I hope this lays a reasonable groundwork for doing so.
      63b4ea22
  4. 03 Jul, 2018 2 commits
  5. 01 Jul, 2018 2 commits
  6. 21 Jun, 2018 3 commits
  7. 20 Jun, 2018 2 commits
  8. 15 Jun, 2018 6 commits
  9. 26 Apr, 2018 1 commit
  10. 06 Apr, 2018 1 commit
  11. 20 Mar, 2018 1 commit
  12. 17 Mar, 2018 1 commit
    • Nick Mathewson's avatar
      Extract the cryptographic parts of crypt_path_t and or_circuit_t. · 5ecad6c9
      Nick Mathewson authored
      Additionally, this change extracts the functions that created and
      freed these elements.
      
      These structures had common "forward&reverse stream&digest"
      elements, but they were initialized and freed through cpath objects,
      and different parts of the code depended on them.  Now all that code
      is extacted, and kept in relay_crypto.c
      5ecad6c9
  13. 15 Feb, 2018 1 commit
    • David Goulet's avatar
      cmux: Remove round-robin circuit policy · c235c32b
      David Goulet authored
      
      
      Since 0.2.4, tor uses EWMA circuit policy to prioritize. The previous
      algorithm, round-robin, hasn't been used since then but was still used as a
      fallback.
      
      Now that EWMA is mandatory, remove that code entirely and enforce a cmux
      policy to be set.
      
      This is part of a circuitmux cleanup to improve performance and reduce
      complexity in the code. We'll be able to address future optimization with this
      work.
      
      Closes #25268
      
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
      c235c32b
  14. 07 Feb, 2018 1 commit
  15. 06 Feb, 2018 1 commit
  16. 31 Jan, 2018 2 commits
  17. 19 Jan, 2018 2 commits
  18. 12 Jan, 2018 1 commit
  19. 20 Dec, 2017 1 commit
  20. 08 Dec, 2017 2 commits
  21. 07 Dec, 2017 2 commits
  22. 05 Dec, 2017 2 commits
    • David Goulet's avatar
      68601a85
    • David Goulet's avatar
      hs-v3: Cleanup HS circuits when marking as closed · e80893e5
      David Goulet authored
      
      
      First, hs_service_intro_circ_has_closed() is now called in circuit_mark_for
      close() because the HS subsystem needs to learn when an intro point is
      actually not established anymore as soon as possible. There is a time window
      between a close and a free.
      
      Second, when we mark for close, we also remove it from the circuitmap because
      between the close and the free, a service can launch an new circuit to that
      same intro point and thus register it which only succeeds if the intro point
      authentication key is not already in the map.
      
      However, we still do a remove from the circuitmap in circuit_free() in order
      to also cleanup the circuit if it wasn't marked for close prior to the free.
      
      Fixes #23603
      
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
      e80893e5
  23. 27 Nov, 2017 1 commit
    • Nick Mathewson's avatar
      Add a new notion of "stamps" to be a fast 32-bit monotonic timestamp · c3c0a05f
      Nick Mathewson authored
      The goal here is to replace our use of msec-based timestamps with
      something less precise, but easier to calculate.  We're doing this
      because calculating lots of msec-based timestamps requires lots of
      64/32 division operations, which can be inefficient on 32-bit
      platforms.
      
      We make sure that these stamps can be calculated using only the
      coarse monotonic timer and 32-bit bitwise operations.
      c3c0a05f