aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bwmgt.c
AgeCommit message (Collapse)Author
2020-07-14addr: Use tor_addr_t instead of uint32_t for IPv4David Goulet
This changes a LOT of code but in the end, behavior is the same. Unfortunately, many functions had to be changed to accomodate but in majority of cases, to become simpler. Functions are also removed specifically those that were there to convert an IPv4 as a host format to a tor_addr_t. Those are not needed anymore. The IPv4 address field has been standardized to "ipv4_addr", the ORPort to "ipv4_orport" (currently IPv6 uses ipv6_orport) and DirPort to "ipv4_dirport". This is related to Sponsor 55 work that adds IPv6 support for relays and this work is needed in order to have a common interface between IPv4 and IPv6. Closes #40043. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11Merge branch 'ticket33029_042_01' into ticket33029_043_03David Goulet
Conflicts: doc/tor.1.txt src/app/config/config.c src/app/config/or_options_st.h src/core/mainloop/connection.h Between 042 and 043, the dirauth options were modularized so this merge commit address this by moving the AuthDirRejectUncompressedRequests to the module along with a series of accessors. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11test: Add unit test for connection_dir_is_global_write_low()David Goulet
Part of #33029 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-01-16Bump copyright date to 2019Nick Mathewson
2018-08-06Merge branch 'maint-0.3.4'Nick Mathewson
2018-08-06Rename SEC identifier to BW_SEC in test_bwmgt.hNick Mathewson
Apparently Solaris 10 defines SEC somewhere in its headers, causing a compilation problem. Fixes bug 26994; bugfix on 0.3.4.1-alpha.
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-05Clean up include paths for libtor-evloop (automated)Nick Mathewson
2018-07-03Replace U64_LITERAL with the standard UINT64_CNick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-04-16token: Fix uint32_t to uint64_t conversionDavid Goulet
Unfortunately, the units passed to monotime_coarse_stamp_units_to_approx_msec() was always 0 due to a type conversion. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-13Fix "make check-spaces"Nick Mathewson
2018-04-13Refactor "timestamp" not to be its own type coupled to token buffersNick Mathewson
Really, the uint32_t is only an optimization; any kind of unit should work fine. Some users might want to use time_t or monotime_coarse_t or something like that.
2018-04-13Start re-refactoring the token bucket interface.Nick Mathewson
Begin by creating a lowest-level triple of the types needed to implement a token bucket: a configuration, a timestamp, and the raw bucket itself. Note that for low-level buckets, the units of the timestamp and the bucket itself are unspecified: each user can use a different type. (This patch breaks check-spaces; a later patch will fix it)
2018-04-13Rename token_bucket_t to token_bucket_rw_t.Nick Mathewson
This is a simple search-and-replace to rename the token bucket type to indicate that it contains both a read and a write bucket, bundled with their configuration. It's preliminary to refactoring the bucket type.
2018-04-13Increase tolerances for imprecise time.Nick Mathewson
2018-04-13Accept small hops backward in the monotonic timer.Nick Mathewson
2018-04-13Add a new token-bucket backend abstraction, with testsNick Mathewson
This differs from our previous token bucket abstraction in a few ways: 1) It is an abstraction, and not a collection of fields. 2) It is meant to be used with monotonic timestamps, which should produce better results than calling gettimeofday over and over.