aboutsummaryrefslogtreecommitdiff
path: root/src/common/address.c
Commit message (Collapse)AuthorAge
* Check return value in fmt_addrNick Mathewson2011-07-20
| | | | | | | Previously, if tor_addr_to_str() returned NULL, we would reuse the last value returned by fmt_addr(). (This could happen if we were erroneously asked to format an AF_UNSPEC address.) Now instead we return "???".
* 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 'public/3122_memcmp_squashed' into ↵Nick Mathewson2011-05-11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug3122_memcmp_022 Conflicts throughout. All resolved in favor of taking HEAD and adding tor_mem* or fast_mem* ops as appropriate. src/common/Makefile.am src/or/circuitbuild.c src/or/directory.c src/or/dirserv.c src/or/dirvote.c src/or/networkstatus.c src/or/rendclient.c src/or/rendservice.c src/or/router.c src/or/routerlist.c src/or/routerparse.c src/or/test.c
| * Automated conversion of memcmp to tor_memcmp/tor_mem[n]eqNick Mathewson2011-05-11
| | | | | | | | | | | | | | | | | | | | | | | | This commit is _exactly_ the result of perl -i -pe 's/\bmemcmp\(/tor_memcmp\(/g' src/*/*.[ch] perl -i -pe 's/\!\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*==\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*!=\s*tor_memcmp\(/tor_memneq\(/g' src/*/*.[ch] git checkout src/common/di_ops.[ch] git checkout src/or/test.c git checkout src/common/test.h
* | Standardize our printf code on %d, not %i.Nick Mathewson2011-04-19
| |
* | Improve a few commentsSebastian Hahn2011-03-28
| |
* | Triage the XXX022 and XXX021 comments remaining in the codeNick Mathewson2011-03-25
| | | | | | | | | | Remove some, postpone others, leave some alone. Now the only remaining XXX022s are ones that seem important to fix or investigate.
* | Fixup tor_addr_to_sockaddr return conventionNick Mathewson2011-03-25
| |
* | Doxygen documentation for about 100 things that didn't have anyNick Mathewson2011-03-16
| | | | | | | | About 860 doxygen-less things remain in 0.2.2
* | Fix up all doxygen warnings other than "foo is not documented"Nick Mathewson2011-03-16
| |
* | Fix setting target port in get_interface_address6Sebastian Hahn2011-03-05
| | | | | | | | | | | | | | We want to use the discard port correctly, so a htons() was missing. Also we need to set it correctly depending on address family. Review provided by danieldg
* | Fix connect() failures in get_interface_address6()Sebastian Hahn2011-03-05
| | | | | | | | | | The third argument for connect should be dependent on the address family. Issue spotted by piebeer who also wrote the patch.
* | 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
| |
* | Rename log.h to torlog.hNick Mathewson2010-07-09
| | | | | | | | | | | | | | | | | | | | This should make us conflict less with system files named "log.h". Yes, we shouldn't have been conflicting with those anyway, but some people's compilers act very oddly. The actual change was done with one "git mv", by editing Makefile.am, and running find . -name '*.[ch]' | xargs perl -i -pe 'if (/^#include.*\Wlog.h/) {s/log.h/torlog.h/; }'
* | commit my annotations while i was hunting down the host order bugRoger Dingledine2010-03-05
| |
* | 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
| |
* | 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.
* Use an _actual_ fix for the byte-reverse warning.Nick Mathewson2009-09-01
| | | | | | (Given that we're pretty much assuming that int is 32 bits, and given that hex values are always unsigned, taking out the "ul" from 0xff000000 should be fine.)
* Use a simpler fix for the byte-reversing warningNick Mathewson2009-09-01
|
* Fix compile warnings on Snow LeopardSebastian Hahn2009-09-01
| | | | Big thanks to nickm and arma for helping me with this!
* Spell-check Tor.Nick Mathewson2009-05-27
|
* Update copyright to 2009.Karsten Loesing2009-05-04
|
* Fix an error in tor_addr_parse that kept us from having a hidden service or ↵Nick Mathewson2009-01-21
| | | | | | a bridge live at an IPv6 address. svn:r18206
* Note a problem in the interface tor_addr_to_sockaddr.Nick Mathewson2009-01-06
| | | | svn:r17982
* 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
* Only set sin_len/sin6_len when they exist.Nick Mathewson2009-01-02
| | | | svn:r17851
* Try harder to make sure we zero-out the extraneous sockaddr fields and that ↵Nick Mathewson2009-01-02
| | | | | | we set sockaddr_len. Conceivably a backport candidate, though nothing has yet been sen to break. svn:r17849
* Remove some code that is #ifdefed out, and that we no longer seem to use, if ↵Nick Mathewson2008-12-30
| | | | | | we ever did. svn:r17827
* Fix bug in recent address.c patch: actually set the value of address * to ↵Nick Mathewson2008-12-29
| | | | | | 0.0.0.0 as we did before. This makes CMP_EXACT comparisons with bitmask 0 work on address * again. svn:r17801
* Fix compilation under gethostbyname-based systems.Nick Mathewson2008-12-27
| | | | svn:r17800
* 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
* get_interface_addr6(), and by extension get_interface_addr(), were pretty ↵Nick Mathewson2008-12-26
| | | | | | borked. Copying a tor_addr_t from a sockaddr_storage using memcpy is a poor notion. svn:r17789
* Refactor tor_addr_compare_masked() so that CMP_SEMANTIC makes more sense, ↵Nick Mathewson2008-12-26
| | | | | | and has decent semantics for maskbits; and so that CMP_EXACT works right for bits==0. svn:r17788
* some fixes i found in my sandboxRoger Dingledine2008-12-25
| | | | svn:r17771
* Properly zero-out addresses when setting them. Probably this was not ↵Nick Mathewson2008-12-23
| | | | | | hurting anything. svn:r17749
* Fix all of the doxygen warnings not pertaining to missing documentation.Nick Mathewson2008-12-22
| | | | svn:r17727
* 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
* Downlgrade tweak, and answer lots of XXX021s. No actual code fixes in this ↵Nick Mathewson2008-12-18
| | | | | | patch. svn:r17686
* Resolve many DOCDOCs.Nick Mathewson2008-12-17
| | | | svn:r17662
* Fix a possible negative shift in address comparison. May fix bug 845 and ↵Nick Mathewson2008-10-29
| | | | | | bug 811 svn:r17169
* fix typoRoger Dingledine2008-09-24
| | | | svn:r16949
* Fix mingw build with --enable-gcc-warnings set.Nick Mathewson2008-09-04
| | | | svn:r16759
* An asterisk makes a difference sometimes. Fixes bug 809.Nick Mathewson2008-09-04
| | | | svn:r16758
* take out a line that i think is extraneous. come on, what couldRoger Dingledine2008-09-01
| | | | | | | go wrong? svn:r16714
* 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
* r17643@31-33-44: nickm | 2008-08-05 16:18:25 -0400Nick Mathewson2008-08-05
| | | | | | | Oops. Remove code to set (nonportable) sin_len fields. Added it to try to fix a bug that turned out to be something else. svn:r16436
* 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