Changeset View
Changeset View
Standalone View
Standalone View
src/netaddress.cpp
Show All 14 Lines | |||||
static const uint8_t pchIPv4[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff}; | static const uint8_t pchIPv4[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff}; | ||||
static const uint8_t pchOnionCat[] = {0xFD, 0x87, 0xD8, 0x7E, 0xEB, 0x43}; | static const uint8_t pchOnionCat[] = {0xFD, 0x87, 0xD8, 0x7E, 0xEB, 0x43}; | ||||
// 0xFD + sha256("bitcoin")[0:5] | // 0xFD + sha256("bitcoin")[0:5] | ||||
static const uint8_t g_internal_prefix[] = {0xFD, 0x6B, 0x88, 0xC0, 0x87, 0x24}; | static const uint8_t g_internal_prefix[] = {0xFD, 0x6B, 0x88, 0xC0, 0x87, 0x24}; | ||||
CNetAddr::CNetAddr() { | CNetAddr::CNetAddr() { | ||||
memset(ip, 0, sizeof(ip)); | memset(ip, 0, sizeof(ip)); | ||||
scopeId = 0; | |||||
} | } | ||||
void CNetAddr::SetIP(const CNetAddr &ipIn) { | void CNetAddr::SetIP(const CNetAddr &ipIn) { | ||||
memcpy(ip, ipIn.ip, sizeof(ip)); | memcpy(ip, ipIn.ip, sizeof(ip)); | ||||
} | } | ||||
void CNetAddr::SetRaw(Network network, const uint8_t *ip_in) { | void CNetAddr::SetRaw(Network network, const uint8_t *ip_in) { | ||||
switch (network) { | switch (network) { | ||||
▲ Show 20 Lines • Show All 705 Lines • Show Last 20 Lines |