aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist/describe.c
AgeCommit message (Collapse)Author
2020-07-14node: Standardize interface of format_node_description()David Goulet
Pass the IPv4 before the IPv6 like all our other interfaces. Changes unreleased code related to #40043. Closes #40045 Signed-off-by: David Goulet <dgoulet@torproject.org>
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-07-02Allow multiple addresses in extend_info_t.Nick Mathewson
In practice, there will be at most one ipv4 address and ipv6 address for now, but this code is designed to not care which address is which until forced to do so. This patch does not yet actually create extend_info_t objects with multiple addresses. Closes #34069.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-08-29nodelist: Use safe string functions in describe.cteor
Rewrite format_node_description() and router_get_verbose_nickname() to use strlcpy() and strlcat(). The previous implementation used memcpy() and pointer arithmetic, which was error-prone. Closes ticket 31545. This is CID 1452819.
2019-08-22nodelist: Clear buffers and detect more caller errors in describe.cteor
Part of 21003.
2019-08-19nodelist: Add support for multiple addresses in describe.cteor
Also prepare for unit tests. Part of 21003.
2019-08-19nodelist: Remove support for is_named in describe.cteor
The Named flag is deprecated. Removing support from the formatting code simplifies the unit tests. Part of 21003.
2019-08-19nodelist: Move router_get_verbose_nickname() declarationteor
The declaration was in nodelist/routerinfo.h, but the implementation was in nodelist/describe.h. Part of 21003.
2019-01-16Bump copyright date to 2019Nick Mathewson
2018-09-25Revise things that had included router.h beforeNick Mathewson
Make them only include the headers that they needed, and sort their headers while we're at it.
2018-09-25Extract nickname-checking functions from router.cNick Mathewson
2018-09-25Move the various _describe() functions out of router.cNick Mathewson
Note that I haven't separated the headers yet (there's still an