summaryrefslogtreecommitdiff
path: root/src/or/networkstatus.h
AgeCommit message (Collapse)Author
2018-07-05Move literally everything out of src/orNick Mathewson
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.
2018-06-21Rectify include paths (automated).Nick Mathewson
You have no idea how glad I am that this is automated.
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-05-11Merge remote-tracking branch 'catalyst-github/bug25756'Nick Mathewson
2018-05-09config: Move any_client_port_set() to config.cDavid Goulet
This functions is now used outside of networkstatus.c and makes more sense to be in config.c. It is also renamed to options_any_client_port_set() for the config.c namespace. No code behavior change. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-08Factor out warn_early_consensus()Taylor Yu
Factor out the early consensus warning code from networkstatus_set_current_consensus() into a new function warn_early_consensus().
2018-05-01ns: Move dirvote_get_voter_sig_by_alg() to networkstatus.cDavid Goulet
It makes more sense to be in networkstatus.c so move it there and rename it with the "networkstatus_" prefix. Part of #25988 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-27ns: Move ns_detached_signatures_free() to networkstatus.cDavid Goulet
From dirvote.c to networkstatus.c where it makes more sense both in terms of namespace and subsystem responsability. This removes one less dependency on the dirauth module. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-23main: Launch periodic events by rolesDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-12-11Add networkstatus_consensus_has_ipv6() and unit teststeor
networkstatus_consensus_has_ipv6() tells us whether the consensus method of our current consensus supports IPv6 ORPorts in the consensus. Part of #23827.
2017-12-08Fix wide lines introduced by previous patch.Nick Mathewson
2017-12-08Replace all FREE_AND_NULL* uses to take a type and a free function.Nick Mathewson
This commit was made mechanically by this perl script: \#!/usr/bin/perl -w -i -p next if /^#define FREE_AND_NULL/; s/\bFREE_AND_NULL\((\w+),/FREE_AND_NULL\(${1}_t, ${1}_free_,/; s/\bFREE_AND_NULL_UNMATCHED\(/FREE_AND_NULL\(/;
2017-12-08Switch to a safer FREE_AND_NULL implementationNick Mathewson
This one only evaluates the input once, so it cannot mess up even if there are side effects.
2017-12-08Change the free macro convention in the rest of src/or/*.hNick Mathewson
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-15Merge remote-tracking branch 'dgoulet/ticket12541_032_02'Nick Mathewson
2017-09-12Remove named_map and unnamed_map from networkstatus.cNick Mathewson
2017-09-12Remove networkstatus_nickname_is_unnamed()Neel Chauhan
2017-09-07consensus: Add a generic notification function on new consensusMatt Traudt
Some groundwork for the KIST scheduler implementation. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-22Refactor node lookup APIs to take flagsNick Mathewson
Right now there's a single warn_if_unnamed flag for router_get_consensus_status_by_nickname() and node_get_by_nickname(), that is nearly always 1. I've turned it into an 'unsigned' bitfield, and inverted its sense. I've added the flags argument to node_get_by_hex_id() too, though it does nothing there right now. I've removed the router_get_consensus_status_by_nickname() function, since it was only used in once place. This patch changes the warning behavior of GETINFO ns/name/<name>, since all other name lookups from the controller currently warn. Later I'm going to add more flags, for ed25519 support.
2017-08-08Don't set HSDir index if we don't have a live consensus.George Kadianakis
We also had to alter the SRV functions to take a consensus as optional input, since we might be setting our HSDir index using a consensus that is currently being processed and won't be returned by the networkstatus_get_live_consensus() function. This change has two results: a) It makes sure we are using a fresh consensus with the right SRV value when we are calculating the HSDir hash ring. b) It ensures that we will not use the sr_get_current/previous() functions when we don't have a consensus which would have falsely triggered the disaster SRV logic.
2017-05-15Implement functions to expose valid/fresh-until and votersNick Mathewson
These still won't do anything till I get the values to be filled in. Also, I changed the API a little (with corresponding changes in directory.c) to match things that it's easier to store.
2017-05-10simplify functions now that they don't use options paramRoger Dingledine
2017-05-08clang-i386: use house style for public-when-testing variablesNick Mathewson
This fixes a warning from jenkins.
2017-05-04Request (and try to use) consensus diffs.Nick Mathewson
2017-03-15Run the copyright update script.Nick Mathewson
2017-01-30Fix a pair of compilation errors.Nick Mathewson
2016-12-16Merge branch 'prop271_030_v1_squashed'Nick Mathewson
2016-12-16Add a wrapper for a common networkstatus param patternNick Mathewson
We frequently want to check a networkstatus parameter only when it isn't overridden from the torrc file.
2016-12-12Merge remote-tracking branch 'rubiate/ticket20511'Nick Mathewson
2016-11-30Add parameters for new (prop271) guard algorithm.Nick Mathewson
These are taken from the proposal, and defined there. Some of them should turn into consensus parameters. Also, remove some dead code that was there to make compilation work, and use ATTR_UNUSED like a normal person.
2016-11-30Collect old guard algorithm parameters into one placeNick Mathewson
2016-11-30Fetch unknown certificates if FetchUselessDescriptors is trueteor
2016-11-30Stop discarding consensus flavors and descriptors we wanted to fetchteor
Instead, fetch and store consensus flavors and descriptors we wanted to fetch. And serve them if we are a directory cache (or authority).
2016-11-10Do not serve a consensus if it is too oldrubiate
Closes ticket 20511.
2016-07-01Merge remote-tracking branch 'dgoulet/ticket16943_029_05-squashed'Nick Mathewson
Trivial Conflicts: src/or/or.h src/or/routerparse.c
2016-07-01prop250: Add unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-06-29Expose GETINFO download status statics for test suite and make things mockableAndrea Shepard
2016-06-29Add router descriptor download status queries to GETINFOAndrea Shepard
2016-06-27Expose consensus download statuses on the control portAndrea Shepard
2016-05-19Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-19Restore and improve download schedule unit teststeor (Tim Wilson-Brown)
2016-05-17Merge remote-tracking branch 'teor/bug18963-remember-v2'Nick Mathewson
2016-05-11Fetch certificates from the same directory as previous certificatesteor (Tim Wilson-Brown)
Improves the fix to #18963.
2016-05-11Fetch certificates from the same directory as the consensusteor (Tim Wilson-Brown)
Resolves ticket 18963; fix on #4483 in 0.2.8.1-alpha.
2016-05-10get rid of another no-longer-used functionRoger Dingledine
2016-05-09avoid another redundant checkRoger Dingledine
we should avoid launching a consensus fetch if we don't want one, but if we do end up with an extra one, we should let the other checks take care of it.
2016-05-09avoid following through on a consensus fetch if we have one already arrivingRoger Dingledine
2016-05-09fix typos/etc before i go nuts on #18809Roger Dingledine