Commit graph

16 commits

Author SHA1 Message Date
Pieter Wuille f621326c24 Clean up warnings
* Use -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameters
* Remove xCXXFLAGS usage in makefile.unix
* Fix several recent and older sign-compare warnings
2012-05-09 03:48:30 +02:00
Pieter Wuille 39857190de Support for multiple local addresses 2012-05-04 16:12:23 +02:00
Pieter Wuille 9bab521df8 Support connecting by hostnames passed to proxy (-proxydns) 2012-05-04 16:11:54 +02:00
Pieter Wuille a012e2db59 refactor ConnectSocket 2012-05-04 16:11:54 +02:00
Pieter Wuille 933f2715d8 SOCKS5 connect via hostname 2012-05-04 16:11:54 +02:00
Pieter Wuille 60a87bce87 SOCKS5 support by default
Add -socks=<n> to select SOCKS version to use. 4 and 5 are supported,
5 is default.
2012-05-04 16:11:54 +02:00
Jeff Garzik 3a78f82a78 Fix sign-compare warnings: netbase's Lookup* max-solutions may be unsigned 2012-04-15 16:58:32 -04:00
Jeff Garzik c376ac359e Fix loop index var types, fixing many minor sign comparison warnings
foo.size() typically returns an unsigned integral type; make loop variables
match those types' signedness.
2012-04-15 16:52:09 -04:00
Pieter Wuille 5fee401fe1 CAddrMan: stochastic address manager
Design goals:
 * Only keep a limited number of addresses around, so that addr.dat does not grow without bound.
 * Keep the address tables in-memory, and occasionally write the table to addr.dat.
 * Make sure no (localized) attacker can fill the entire table with his nodes/addresses.

See comments in addrman.h for more detailed information.
2012-02-24 13:41:04 +01:00
Wladimir J. van der Laan d3896211d2 fix typo in CNetAddr::IsRFC4843() (fixes #850) 2012-02-17 14:40:21 +01:00
Gavin Andresen 882164196e Update all copyrights to 2012 2012-02-07 11:28:30 -05:00
Pieter Wuille c981d768b3 Fix handling of default ports 2012-01-17 02:12:35 +01:00
Gavin Andresen 8498c59144 Merge branch 'keepnode' of https://github.com/TheBlueMatt/bitcoin 2012-01-16 16:45:43 -05:00
Matt Corallo b24e6e4d1b Add -keepnode which attempts to -addnode and keep a connection open 2012-01-12 22:13:16 -05:00
Gavin Andresen a1de57a063 Compile with extra warnings turned on. And more makefile/code tidying up.
This turns on most gcc warnings, and removes some unused variables and other code that triggers warnings.
Exceptions are:
 -Wno-sign-compare : triggered by lots of comparisons of signed integer to foo.size(), which is unsigned.
 -Wno-char-subscripts : triggered by the convert-to-hex functions (I may fix this in a future commit).
2012-01-12 20:02:47 -05:00
Pieter Wuille 67a42f929b Network stack refactor
This introduces CNetAddr and CService, respectively wrapping an
(IPv6) IP address and an IP+port combination. This functionality used
to be part of CAddress, which also contains network flags and
connection attempt information. These extra fields are however not
always necessary.

These classes, along with logic for creating connections and doing
name lookups, are moved to netbase.{h,cpp}, which does not depend on
headers.h.

Furthermore, CNetAddr is mostly IPv6-ready, though IPv6
functionality is not yet enabled for the application itself.
2012-01-06 18:55:37 +01:00