aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.cpp
AgeCommit message (Collapse)Author
2014-05-01Remove build-time no-IPv6 settingWladimir J. van der Laan
The year is 2014. All supported operating systems have IPv6 support, most certainly at build time (this doesn't mean that IPv6 is configured, of course). If noone is exercising the functionality to disable it, that means it doesn't get tested, and IMO it's better to get rid of it. (it's also not used consistently in RPC/boost and Net code...)
2014-04-09Correct some proxy related socket leaks.Gregory Maxwell
2014-02-09Copyright header updates s/2013/2014 on files whose last git commit was done ↵gubatron
in 2014. contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does.
2014-01-23Remove redundant .c_str()sWladimir J. van der Laan
After the tinyformat switch sprintf() family functions support passing actual std::string objects. Remove unnecessary c_str calls (236 of them) in logging and formatting.
2013-11-15core: remove includes in .cpp, if header is already in .hPhilip Kaufmann
- example: if util.h includes stdint.h, remove it from util.cpp, as util.h is the first header included in util.cpp
2013-11-11Improve logging of failed connectionsGavin Andresen
2013-11-10Cleanup code using forward declarations.Brandon Dahler
Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
2013-10-20Bump Year Number to 2013super3
2013-10-04Hurricane Electric uses block 2001:470::, not 2011:470::David Hill
2013-09-18Replace printf with LogPrintf / LogPrintGavin Andresen
2013-09-05autotools: switch to autotools buildsystemCory Fields
2013-07-17Fix fcntl include in net.cpp & netbase.cppfcicq
2013-04-27fix !O_NONBLOCK where ~O_NONBLOCK was meantWladimir J. van der Laan
Using ! on a non-zero value will always return 0. Also remove some duplicate and superfluous code in other places.
2012-12-18Split off hash.h from util.hPieter Wuille
2012-11-09don't use memset() in privacy/security relevant code partsPhilip Kaufmann
As memset() can be optimized out by a compiler it should not be used in privacy/security relevant code parts. OpenSSL provides the safe OPENSSL_cleanse() function in crypto.h, which perfectly does the job of clean and overwrite data. For details see: http://www.viva64.com/en/b/0178/ - change memset() to OPENSSL_cleanse() where appropriate - change a hard-coded number from netbase.cpp into a sizeof()
2012-10-11Merge pull request #1913 from sipa/noi2pWladimir J. van der Laan
Remove I2P support from netbase
2012-10-11Merge pull request #1901 from laanwj/2012_10_remove_strlcpyWladimir J. van der Laan
get rid of strlcpy.h
2012-10-07Remove I2P support from netbasePieter Wuille
I2P apparently needs 256 bits to store a fully routable address. Garlicat requires a centralized lookup service to map the 80-bit addresses to fully routable ones (as far as I understood), so that's not really usable in our situation. To support I2P routing and peer exchange for it, another solution is needed. This will most likely imply a network protocol change, and extension of the 'addr' message.
2012-10-07get rid of strlcpy.hWladimir J. van der Laan
Don't use hand-rolled string manipulation routine with a fixed buffer in the bitcoin core, instead make use of c++ strings and boost.
2012-10-04add LOCK() for proxy related data-structuresPhilip Kaufmann
- fix #1560 by properly locking proxy related data-structures - update GetProxy() and introduce GetNameProxy() to be able to use a thread-safe local copy from proxyInfo and nameproxyInfo - update usage of GetProxy() all over the source to match the new behaviour, as it now fills a full proxyType object - rename GetNameProxy() into HaveNameProxy() to be more clear
2012-09-21Merge pull request #1793 from Diapolo/fix_signed_unsigned_strprintfWladimir J. van der Laan
fix signed/unsigned in strprintf and CNetAddr::GetByte()
2012-09-18Trim trailing whitespace for src/*.{h,cpp}Jeff Garzik
2012-09-12fix signed/unsigned in strprintf and CNetAddr::GetByte()Philip Kaufmann
- I checked every occurance of strprintf() in the code and used %u, where unsigned vars are used - the change to GetByte() was made, as ip is an unsigned char
2012-08-01Bugfix: Fix a variety of misspellingsLuke Dashjr
2012-07-07Fix OBO in socks5 auth proposal. This fixes compatibility with openssh's ↵Douglas Huff
socks5 proxy and tor's .2.3.x branch.
2012-06-23Rewrite CNetAddr::GetReachabilityFrom()Pieter Wuille
Add support for Tor/I2P networks, and make code more readable.
2012-06-23Node support for Tor hidden servicesPieter Wuille
This commit adds support for .onion addresses (mapped into the IPv6 by using OnionCat's range and encoding), and the ability to connect to them via a SOCKS5 proxy.
2012-06-19Fix netbase testsPieter Wuille
* Do not rely on "a.b.c" being interpreted as "a.0.b.c" * Parse numeric addresses for address families for which no device is configured
2012-06-18Merge pull request #1399 from sipa/ipparseGavin Andresen
Improve parsing of IPv6 addresses
2012-06-18Merge branch 'signbugs' of https://github.com/wizeman/bitcoinGavin Andresen
Resolved minor conflict in main.cpp
2012-06-14Improve parsing of IPv6 addressesPieter Wuille
Implement the following rules: * Interpret [X]:Y as host=X port=Y, if Y is an integer * Interpret X:Y as host=X port=Y, if Y is an integer and X contains no colon * Interpret X:Y as host=X:Y port=default otherwise
2012-06-05fix two signed/unsigned comparison warnings in netbase.cppPhilip Kaufmann
2012-05-31Rework network config settingsPieter Wuille
2012-05-18Update License in File HeadersFordy
I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
2012-05-14Use getnameinfo() to get canonical IPv6 addressesPieter Wuille
2012-05-13Make CNetAddr::GetHash() return an unsigned val.Ricardo M. Correia
This prevents an undefined operation in main.cpp, when shifting the hash value left by 32 bits. Shifting a signed int left into the sign bit is undefined in C++11.
2012-05-12Merge pull request #1277 from Diapolo/IPv6_IPv4_stringsJeff Garzik
use "IPv6" and "IPv4" in strings as these are the official spellings
2012-05-13use "IPv6" and "IPv4" in strings as these are the official spellings and ↵Philip Kaufmann
make ParseNetwork() in netbase.cpp case-insensitive
2012-05-13Only check for port# after : in ConnectSocketByNamePieter Wuille
2012-05-11Separate listening sockets, -bind=<addr>Pieter Wuille
2012-05-11Use NET_ identifiers in CNetAddr::GetGroup()Pieter Wuille
2012-05-11Add -noproxy to circumvent proxy for some networkPieter Wuille
2012-05-11Limited relaying/storing of foreign addressesPieter Wuille
Introduce a boolean variable for each "network" (ipv4, ipv6, tor, i2p), and track whether we are likely to able to connect to it. Addresses in "addr" messages outside of our network get limited relaying and are not stored in addrman.
2012-05-11Preliminary support for Tor/I2P hidden servicesPieter Wuille
There are plans to let Bitcoin function as Tor/I2P hidden service. To do so, we could use the established encoding provided by OnionCat and GarliCat (without actually using those tools) to embed Tor/I2P addresses in IPv6. This patch makes these addresses considered routable, so they can travel over the Bitcoin network in 'addr' messages. This will hopefully make it easier to deploy real hidden service support later.
2012-05-11IPv6 node supportPieter Wuille
This will make bitcoin relay valid routable IPv6 addresses, and when USE_IPV6 is enabled, listen on IPv6 interfaces and attempt connections to IPv6 addresses.
2012-05-09Clean up warningsPieter Wuille
* 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-04Support for multiple local addressesPieter Wuille
2012-05-04Support connecting by hostnames passed to proxy (-proxydns)Pieter Wuille
2012-05-04refactor ConnectSocketPieter Wuille
2012-05-04SOCKS5 connect via hostnamePieter Wuille