#include <net_permissions.h>
#include <netaddress.h>
#include <netbase.h>
#include <netgroup.h>
#include <protocol.h>
#include <serialize.h>
#include <streams.h>
#include <test/util/setup_common.h>
#include <util/strencodings.h>
#include <util/translation.h>
#include <string>
#include <boost/test/unit_test.hpp>
Go to the source code of this file.
|
static CNetAddr | ResolveIP (const std::string &ip) |
|
static CNetAddr | CreateInternal (const std::string &host) |
|
| BOOST_AUTO_TEST_CASE (netbase_networks) |
|
| BOOST_AUTO_TEST_CASE (netbase_properties) |
|
static bool | TestSplitHost (const std::string &test, const std::string &host, uint16_t port, bool validPort=true) |
|
| BOOST_AUTO_TEST_CASE (netbase_splithost) |
|
static bool | TestParse (std::string src, std::string canon) |
|
| BOOST_AUTO_TEST_CASE (netbase_lookupnumeric) |
|
| BOOST_AUTO_TEST_CASE (embedded_test) |
|
| BOOST_AUTO_TEST_CASE (subnet_test) |
|
| BOOST_AUTO_TEST_CASE (netbase_getgroup) |
|
| BOOST_AUTO_TEST_CASE (netbase_parsenetwork) |
|
| BOOST_AUTO_TEST_CASE (netpermissions_test) |
|
| BOOST_AUTO_TEST_CASE (netbase_dont_resolve_strings_with_embedded_nul_characters) |
|
static const std::vector< CAddress > | fixture_addresses ({ CAddress{ CService(CNetAddr(in6_addr(IN6ADDR_LOOPBACK_INIT)), 0), NODE_NONE, NodeSeconds{0x4966bc61s}, }, CAddress{ CService(CNetAddr(in6_addr(IN6ADDR_LOOPBACK_INIT)), 0x00f1), NODE_NETWORK, NodeSeconds{0x83766279s}, }, CAddress{ CService(CNetAddr(in6_addr(IN6ADDR_LOOPBACK_INIT)), 0xf1f2), static_cast< ServiceFlags >(NODE_WITNESS|NODE_COMPACT_FILTERS|NODE_NETWORK_LIMITED), NodeSeconds{0xffffffffs}, }, }) |
|
| BOOST_AUTO_TEST_CASE (caddress_serialize_v1) |
|
| BOOST_AUTO_TEST_CASE (caddress_unserialize_v1) |
|
| BOOST_AUTO_TEST_CASE (caddress_serialize_v2) |
|
| BOOST_AUTO_TEST_CASE (caddress_unserialize_v2) |
|
| BOOST_AUTO_TEST_CASE (isbadport) |
|
◆ BOOST_AUTO_TEST_CASE() [1/15]
BOOST_AUTO_TEST_CASE |
( |
caddress_serialize_v1 |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [2/15]
BOOST_AUTO_TEST_CASE |
( |
caddress_serialize_v2 |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [3/15]
BOOST_AUTO_TEST_CASE |
( |
caddress_unserialize_v1 |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [4/15]
BOOST_AUTO_TEST_CASE |
( |
caddress_unserialize_v2 |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [5/15]
BOOST_AUTO_TEST_CASE |
( |
embedded_test |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [6/15]
BOOST_AUTO_TEST_CASE |
( |
isbadport |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [7/15]
BOOST_AUTO_TEST_CASE |
( |
netbase_dont_resolve_strings_with_embedded_nul_characters |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [8/15]
BOOST_AUTO_TEST_CASE |
( |
netbase_getgroup |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [9/15]
BOOST_AUTO_TEST_CASE |
( |
netbase_lookupnumeric |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [10/15]
BOOST_AUTO_TEST_CASE |
( |
netbase_networks |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [11/15]
BOOST_AUTO_TEST_CASE |
( |
netbase_parsenetwork |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [12/15]
BOOST_AUTO_TEST_CASE |
( |
netbase_properties |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [13/15]
BOOST_AUTO_TEST_CASE |
( |
netbase_splithost |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [14/15]
BOOST_AUTO_TEST_CASE |
( |
netpermissions_test |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [15/15]
BOOST_AUTO_TEST_CASE |
( |
subnet_test |
| ) |
|
◆ CreateInternal()
static CNetAddr CreateInternal |
( |
const std::string & |
host | ) |
|
|
static |
◆ fixture_addresses()
static const std::vector< CAddress > fixture_addresses |
( |
{ CAddress{ CService(CNetAddr(in6_addr(IN6ADDR_LOOPBACK_INIT)), 0), NODE_NONE, NodeSeconds{0x4966bc61s}, }, CAddress{ CService(CNetAddr(in6_addr(IN6ADDR_LOOPBACK_INIT)), 0x00f1), NODE_NETWORK, NodeSeconds{0x83766279s}, }, CAddress{ CService(CNetAddr(in6_addr(IN6ADDR_LOOPBACK_INIT)), 0xf1f2), static_cast< ServiceFlags >(NODE_WITNESS|NODE_COMPACT_FILTERS|NODE_NETWORK_LIMITED), NodeSeconds{0xffffffffs}, }, } |
| ) |
|
|
static |
◆ ResolveIP()
static CNetAddr ResolveIP |
( |
const std::string & |
ip | ) |
|
|
static |
◆ TestParse()
static bool TestParse |
( |
std::string |
src, |
|
|
std::string |
canon |
|
) |
| |
|
static |
◆ TestSplitHost()
static bool TestSplitHost |
( |
const std::string & |
test, |
|
|
const std::string & |
host, |
|
|
uint16_t |
port, |
|
|
bool |
validPort = true |
|
) |
| |
|
static |
◆ stream_addrv1_hex
constexpr const char* stream_addrv1_hex |
|
staticconstexpr |
Initial value:=
"03"
"61bc6649"
"0000000000000000"
"00000000000000000000000000000001"
"0000"
"79627683"
"0100000000000000"
"00000000000000000000000000000001"
"00f1"
"ffffffff"
"4804000000000000"
"00000000000000000000000000000001"
"f1f2"
Definition at line 518 of file netbase_tests.cpp.
◆ stream_addrv2_hex
constexpr const char* stream_addrv2_hex |
|
staticconstexpr |
Initial value:=
"03"
"61bc6649"
"00"
"02"
"10"
"00000000000000000000000000000001"
"0000"
"79627683"
"01"
"02"
"10"
"00000000000000000000000000000001"
"00f1"
"ffffffff"
"fd4804"
"02"
"10"
"00000000000000000000000000000001"
"f1f2"
Definition at line 538 of file netbase_tests.cpp.