1. 25 Apr, 2019 4 commits
    • Nick Mathewson's avatar
      Allow kvlines in control commands. · 0841a693
      Nick Mathewson authored
      0841a693
    • Nick Mathewson's avatar
      Use parsing code for the simpler controller commands. · 01b07c54
      Nick Mathewson authored
      (This should be all of the command that work nicely with positional
      arguments only.)
      
      Some of these commands should probably treat extra arguments as
      incorrect, but for now I'm trying to be careful not to break
      any existing users.
      01b07c54
    • Nick Mathewson's avatar
      When parsing a multiline controller command, be careful with linebreaks · dbfe1a14
      Nick Mathewson authored
      The first line break in particular was mishandled: it was discarded
      if no arguments came before it, which made it impossible to
      distinguish arguments from the first line of the body.
      
      To solve this, we need to allocate a copy of the command rather than
      using NUL to separate it, since we might have "COMMAND\n" as our input.
      
      Fixes ticket 29984.
      dbfe1a14
    • Nick Mathewson's avatar
      Start on a command-parsing tool for controller commands. · de70eebc
      Nick Mathewson authored
      There _is_ an underlying logic to these commands, but it isn't
      wholly uniform, given years of tweaks and changes.  Fortunately I
      think there is a superset that will work.
      
      This commit adds a parser for some of the most basic cases -- the
      ones currently handled by getargs_helper() and some of the
      object-taking ones.  Soon will come initial tests; then I'll start using
      the parser.
      
      After that, I'll expand the parser to handle the other cases that come
      up in the controller protocol.
      de70eebc
  2. 12 Apr, 2019 3 commits
  3. 25 Mar, 2019 3 commits
  4. 24 Jan, 2019 1 commit
  5. 16 Jan, 2019 2 commits
  6. 03 Jan, 2019 1 commit
  7. 21 Dec, 2018 1 commit
    • Taylor Yu's avatar
      Add origin circuit event pubsub system · a0b4fa1f
      Taylor Yu authored
      Add a publish-subscribe subsystem to publish messages about changes to
      origin circuits.
      
      Functions in circuitbuild.c and circuitlist.c publish messages to this
      subsystem.
      
      Move circuit event constants out of control.h so that subscribers
      don't have to include all of control.h to take actions based on
      messages they receive.
      
      Part of ticket 27167.
      a0b4fa1f
  8. 20 Dec, 2018 3 commits
  9. 18 Dec, 2018 1 commit
  10. 17 Dec, 2018 2 commits
  11. 14 Dec, 2018 1 commit
  12. 10 Dec, 2018 1 commit
    • Taylor Yu's avatar
      Log bootstrap tag names · 1b855af5
      Taylor Yu authored
      Add the bootstrap tag name to the log messages, so people
      troubleshooting connection problems can look up a symbol instead of a
      number.  Closes ticket 28731.
      1b855af5
  13. 30 Nov, 2018 1 commit
  14. 19 Nov, 2018 1 commit
  15. 15 Nov, 2018 2 commits
  16. 14 Nov, 2018 1 commit
  17. 05 Nov, 2018 1 commit
  18. 01 Oct, 2018 3 commits
  19. 27 Sep, 2018 2 commits
    • Nick Mathewson's avatar
      Split geoip from geoip-related stats. · f403af22
      Nick Mathewson authored
      This commit just moves the code to two separate files. The geoip
      code still has a few needless dependencies on core/* and features/*.
      f403af22
    • Nick Mathewson's avatar
      Move the predicted ports code out of rephist.c · 241c1505
      Nick Mathewson authored
      It differs from the rest of the rephist code in that it's actually
      necessary for Tor to operate, so it should probably go somewhere
      else.  I'm not sure where yet, so I'll leave it in the same
      directory, but give it its own file.
      241c1505
  20. 25 Sep, 2018 3 commits
  21. 21 Sep, 2018 2 commits
    • Nick Mathewson's avatar
      Split directory.c code into several modules · 194acfb5
      Nick Mathewson authored
      Parts of this C file naturally belong in dircache, dirclient, and
      dircommon: so, move them there.
      194acfb5
    • 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
  22. 20 Sep, 2018 1 commit
    • Nick Mathewson's avatar
      Split most of dirserv.c into several new modules · b54a5e70
      Nick Mathewson authored
      In dirauth:
        * bwauth.c reads and uses bandwidth files
        * guardfraction.c reads and uses the guardfraction file
        * reachability.c tests relay reachability
        * recommend_pkg.c handles the recommended-packages lines.
        * recv_descs.c handles fingerprint files and processing incoming
          routerinfos that relays upload to us
        * voteflag.c computes flag thresholds and sets those thresholds on
          routerstatuses when computing votes
      
      In control:
        * fmt_serverstatus.c generates the ancient "v1 server status"
          format that controllers expect.
      
      In nodelist:
        * routerstatus_fmt.c formats routerstatus entries for a consensus,
          a vote, or for the controller.
      b54a5e70