aboutsummaryrefslogtreecommitdiff
path: root/src/common/address.h
Commit message (Collapse)AuthorAge
* Make relays handle an address suggestion from a directory server giving an ↵Linus Nordberg2012-03-28
| | | | | | | | | IPv6 address. last_guessed_ip becomes a tor_addr_t. Most parts of router_new_address_suggestion() learns about IPv6 (resolve_my_address() is still IPv4 only).
* First chunk of support for bridges on IPv6Linus Nordberg2011-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | Comments below focus on changes, see diff for added code. New type tor_addr_port_t holding an IP address and a TCP/UDP port. New flag in routerinfo_t, ipv6_preferred. This should go in the node_t instead but not now. Replace node_get_addr() with - node_get_prim_addr() for primary address, i.e. IPv4 for now - node_get_pref_addr() for preferred address, IPv4 or IPv6. Rename node_get_addr_ipv4h() node_get_prim_addr_ipv4h() for consistency. The primary address will not allways be an IPv4 address. Same for node_get_orport() -> node_get_prim_orport(). Rewrite node_is_a_configured_bridge() to take all OR ports into account. Extend argument list to extend_info_from_node and extend_info_from_router with a flag indicating if we want to use the routers primary address or the preferred address. Use the preferred address in as few situtations as possible for allowing clients to connect to bridges over IPv6.
* Purge ATTR_PURE from the codeSebastian Hahn2011-11-25
| | | | | We're using it incorrectly in many cases, and it doesn't help as far as we know.
* Stop using addr_port_lookup as an address splitting functionNick Mathewson2011-10-11
| | | | | | It's too risky to have a function where if you leave one parameter NULL, it splits up address:port strings, but if you set it, it does hostname resolution.
* Change "reverse_lookup_name" functions to refer to "PTR_name"sNick Mathewson2011-10-11
| | | | | | | | | | Under the new convention, having a tor_addr.*lookup function that doesn't do hostname resolution is too close for comfort. I used this script here, and have made no other changes. s/tor_addr_parse_reverse_lookup_name/tor_addr_parse_PTR_name/g; s/tor_addr_to_reverse_lookup_name/tor_addr_to_PTR_name/g;
* Fix names of functions that convert strings to addrsNick Mathewson2011-10-11
| | | | | | | | | | | | | | | | | | | | Now let's have "lookup" indicate that there can be a hostname resolution, and "parse" indicate that there wasn't. Previously, we had one "lookup" function that did resolution; four "parse" functions, half of which did resolution; and a "from_str()" function that didn't do resolution. That's confusing and error-prone! The code changes in this commit are exactly the result of this perl script, run under "perl -p -i.bak" : s/tor_addr_port_parse/tor_addr_port_lookup/g; s/parse_addr_port(?=[^_])/addr_port_lookup/g; s/tor_addr_from_str/tor_addr_parse/g; This patch leaves aton and pton alone: their naming convention and behavior is is determined by the sockets API. More renaming may be needed.
* Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-13
|\ | | | | | | | | | | | | Conflicts: src/or/config.c src/or/dirserv.c src/or/or.h
| * Add a new "tor_sockaddr_to_str()" functionNick Mathewson2011-05-13
| | | | | | | | | | It does what it says on the tin. It turns out I'll want this in a couple of places.
* | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-04-07
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/common/address.c src/common/compat_libevent.c src/common/memarea.c src/common/util.h src/or/buffers.c src/or/circuitbuild.c src/or/circuituse.c src/or/connection.c src/or/directory.c src/or/networkstatus.c src/or/or.h src/or/routerlist.c
* | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-03-16
|\| | | | | | | | | | | | | Trivial Conflicts in src/common/crypto.c src/or/main.h src/or/or.h
| * Doxygen documentation for about 100 things that didn't have anyNick Mathewson2011-03-16
| | | | | | | | About 860 doxygen-less things remain in 0.2.2
* | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-03
|\|
| * Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-01-03
| |\ | | | | | | | | | | | | | | | Conflicts: src/common/test.h src/or/test.c
| | * Bump copyright statements to 2011Nick Mathewson2011-01-03
| | |
* | | Merge branch 'bug1992_part1'Nick Mathewson2010-10-15
|\ \ \
| * | | refactor all these tor_inet_ntoa idiomsRoger Dingledine2010-10-01
| |/ / | | | | | | | | | but don't refactor the ones that look messy
* | | Make the return value of tor_addr_sockaddr always be signedNick Mathewson2010-10-15
| | |
* | | Fix a compile warning on OSX 10.6Sebastian Hahn2010-10-07
|/ /
* | Merge remote branch 'origin/maint-0.2.1'Nick Mathewson2010-02-27
|\| | | | | | | | | | | Conflicts: src/common/test.h src/or/test.c
| * Update Tor Project copyright yearsNick Mathewson2010-02-27
| |
| * Update copyright to 2009.Karsten Loesing2009-05-04
| |
* | Make tor_addr_copy() conform to memcpy requirementsNick Mathewson2010-02-09
| | | | | | | | | | | | | | | | The src and dest of a memcpy() call aren't supposed to overlap, but we were sometimes calling tor_addr_copy() as a no-op. Also, tor_addr_assign was a redundant copy of tor_addr_copy(); this patch removes it.
* | Update copyright to 2009.Karsten Loesing2009-05-02
|/
* Remove svn $Id$s from our source, and remove tor --version --version.Nick Mathewson2009-01-04
| | | | | | | | The subversion $Id$ fields made every commit force a rebuild of whatever file got committed. They were not actually useful for telling the version of Tor files in the wild. svn:r17867
* Use a consistent naming standard for header file guard macros, taking care ↵Nick Mathewson2008-12-29
| | | | | | not to collide with any system headers. This tripped us up on Android. svn:r17805
* Refactor tor_addr_t manipulation functions so that as few as possible look ↵Nick Mathewson2008-12-26
| | | | | | at the tor_addr_t representation. svn:r17790
* some fixes i found in my sandboxRoger Dingledine2008-12-25
| | | | svn:r17771
* Fix most DOCDOCs remaining and/or added by redox.Nick Mathewson2008-12-22
| | | | svn:r17734
* Add DOCDOC comments for all undocumented functions. Add missing *s to other ↵Nick Mathewson2008-12-22
| | | | | | comments so that they will get recognized as doxygen. svn:r17729
* Move in-addr.arpa parsing and generation into address.c, and simplify the ↵Nick Mathewson2008-12-19
| | | | | | code that does it elsewhere. Incidentally, this lets exit servers answer requests for ip6.arpa addresses. svn:r17707
* Try once again to make BSD compilation happy.Nick Mathewson2008-08-08
| | | | svn:r16474
* r17666@tombo: nickm | 2008-08-07 15:12:30 -0400Nick Mathewson2008-08-07
| | | | | | | Make tor_addr_from_sockaddr also give away the port in a useful format svn:r16458
* r17641@31-33-44: nickm | 2008-08-05 16:07:53 -0400Nick Mathewson2008-08-05
| | | | | | | Initial conversion of uint32_t addr to tor_addr_t addr in connection_t and related types. Most of the Tor wire formats using these new types are in, but the code to generate and use it is not. This is a big patch. Let me know what it breaks for you. svn:r16435
* r17426@tombo: nickm | 2008-07-28 20:34:03 -0400Nick Mathewson2008-07-29
| | | | | | | More test coverage for tor_addr_t; fix a couple of bugs. svn:r16234
* r17391@pc-10-8-1-079: nickm | 2008-07-25 17:11:17 +0200Nick Mathewson2008-07-25
| | | | | | | Tor_addr_compare did a semantic comparison, such that ::1.2.3.4 and 1.2.3.4 were "equal". we sometimes need an exact comparison. Add a feature to do that. svn:r16210
* r17358@pc-10-8-1-079: nickm | 2008-07-25 16:41:03 +0200Nick Mathewson2008-07-25
Split out the address manipulation functions from compat and util: they were about 21% of the total of those, and spread out too much. svn:r16208