Changeset View
Changeset View
Standalone View
Standalone View
src/netaddress.cpp
Show All 10 Lines | |||||
#include "netaddress.h" | #include "netaddress.h" | ||||
#include "tinyformat.h" | #include "tinyformat.h" | ||||
#include "utilstrencodings.h" | #include "utilstrencodings.h" | ||||
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 unsigned char g_internal_prefix[] = {0xFD, 0x6B, 0x88, | static const uint8_t g_internal_prefix[] = {0xFD, 0x6B, 0x88, 0xC0, 0x87, 0x24}; | ||||
0xC0, 0x87, 0x24}; | |||||
void CNetAddr::Init() { | void CNetAddr::Init() { | ||||
memset(ip, 0, sizeof(ip)); | memset(ip, 0, sizeof(ip)); | ||||
scopeId = 0; | 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)); | ||||
▲ Show 20 Lines • Show All 701 Lines • Show Last 20 Lines |