aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.h
AgeCommit message (Collapse)Author
2014-10-06add -timeout default as constant and use themPhilip Kaufmann
- update help message text - simplify code in init to check for -timeout
2014-09-02Rename IMPLEMENT_SERIALIZE to ADD_SERIALIZE_METHODSPieter Wuille
2014-09-01Serializer simplifications after IMPLEMENT_SERIALIZE overhaulPieter Wuille
2014-09-01Merge pull request #4737Pieter Wuille
31e9a83 Use CSizeComputer to avoid counting sizes in SerializationOp (Pieter Wuille) 84881f8 rework overhauled serialization methods to non-static (Kamil Domanski) 5d96b4a remove fields of ser_streamplaceholder (Kamil Domanski) 3d796f8 overhaul serialization code (Kamil Domanski)
2014-08-31Use CSizeComputer to avoid counting sizes in SerializationOpPieter Wuille
2014-08-31rework overhauled serialization methods to non-staticKamil Domanski
Thanks to Pieter Wuille for most of the work on this commit. I did not fixup the overhaul commit, because a rebase conflicted with "remove fields of ser_streamplaceholder". I prefer not to risk making a mistake while resolving it.
2014-08-31overhaul serialization codeKamil Domanski
The implementation of each class' serialization/deserialization is no longer passed within a macro. The implementation now lies within a template of form: template <typename T, typename Stream, typename Operation> inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) { size_t nSerSize = 0; /* CODE */ return nSerSize; } In cases when codepath should depend on whether or not we are just deserializing (old fGetSize, fWrite, fRead flags) an additional clause can be used: bool fRead = boost::is_same<Operation, CSerActionUnserialize>(); The IMPLEMENT_SERIALIZE macro will now be a freestanding clause added within class' body (similiar to Qt's Q_OBJECT) to implement GetSerializeSize, Serialize and Unserialize. These are now wrappers around the "SerializationOp" template.
2014-08-28add missing header end commentsPhilip Kaufmann
- ensures a consistent usage in header files - also add a blank line after the copyright header where missing - also remove orphan new-lines at the end of some files
2014-08-20Remove all other print() methodsWladimir J. van der Laan
All unused.
2014-07-30Add GetNetworkName functionWladimir J. van der Laan
Returns the network name for an Network enum.
2014-07-17net: add SetSocketNonBlocking() as OS independent wrapperPhilip Kaufmann
2014-07-17Convert closesocket 'compat wrapper' to function in netbaseWladimir J. van der Laan
Simpler alternative to #4348. The current setup with closesocket() is strange. It poses as a compatibility wrapper but adds functionality. Rename it and make it a documented utility function in netbase. Code movement only, zero effect on the functionality.
2014-07-07remove SOCKS4 support from core and GUIPhilip Kaufmann
- now we support SOCKS5 only
2014-06-23build: fix build weirdness after 54372482.Cory Fields
bitcoin-config.h moved, but the old file is likely to still exist when reconfiguring or switching branches. This would've caused files to not rebuild correctly, and other strange problems. Make the path explicit so that the old one cannot be found. Core libs use config/bitcoin-config.h. Libs (like crypto) which don't want access to bitcoin's headers continue to use -Iconfig and #include bitcoin-config.h.
2014-05-31remove dup of extern int nConnectTimeout; in netbasePhilip Kaufmann
2014-05-25Merge pull request #4183Wladimir J. van der Laan
f40dbee remove CPubKey::VerifyCompact( ) which is never used (Kamil Domanski) 28b6c1d remove GetMedianTime( ) which is never used (Kamil Domanski) 5bd4adc remove LookupHostNumeric( ) which is never used (Kamil Domanski) 595f691 remove LogException( ) which is never used (Kamil Domanski) f4057cb remove CTransaction::IsNewerThan which is never used (Kamil Domanski) 0e31e56 remove CWallet::AddReserveKey which is never used (Kamil Domanski)
2014-05-23Replace non-threadsafe strerrorWladimir J. van der Laan
Log the name of the error as well as the error code if a network problem happens. This makes network troubleshooting more convenient. Use thread-safe strerror_r and the WIN32 equivalent FormatMessage.
2014-05-20remove LookupHostNumeric( ) which is never usedKamil Domanski
2014-05-09net: Add CSubNet class for subnet matchingWladimir J. van der Laan
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...)
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-03fix #3049 by changing comment for CNetAddr::IsRFC4193()Philip Kaufmann
2013-09-05autotools: switch to autotools buildsystemCory Fields
2012-10-11Merge pull request #1913 from sipa/noi2pWladimir J. van der Laan
Remove I2P support from netbase
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-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-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-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-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-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-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-11Separate listening sockets, -bind=<addr>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-04Support for multiple local addressesPieter Wuille
2012-05-04Support connecting by hostnames passed to proxy (-proxydns)Pieter Wuille
2012-04-17Remove headers.hPieter Wuille
2012-04-15Fix sign-compare warnings: netbase's Lookup* max-solutions may be unsignedJeff Garzik
2012-04-03VC2010 compile fixesWladimir J. van der Laan
2012-03-30fixed typo in comment in netbase.h and bignum.hPhilip Kaufmann
2012-03-26Begin doxygen-compatible commentsPieter Wuille
2012-02-07Update all copyrights to 2012Gavin Andresen