MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetIn6Addr

Method GetIn6Addr

src/netaddress.cpp:642–650  ·  view source on GitHub ↗

* Try to get our IPv6 (or CJDNS) address. * * @param[out] pipv6Addr The in6_addr struct to which to copy. * * @returns Whether or not the operation was successful, in particular, whether * or not our address was an IPv6 address. * * @see CNetAddr::IsIPv6() */

Source from the content-addressed store, hash-verified

640 * @see CNetAddr::IsIPv6()
641 */
642bool CNetAddr::GetIn6Addr(struct in6_addr* pipv6Addr) const
643{
644 if (!IsIPv6() && !IsCJDNS()) {
645 return false;
646 }
647 assert(sizeof(*pipv6Addr) == m_addr.size());
648 memcpy(pipv6Addr, m_addr.data(), m_addr.size());
649 return true;
650}
651
652bool CNetAddr::HasLinkedIPv4() const
653{

Callers 1

PCPWrapAddressFunction · 0.80

Calls 4

IsIPv6Function · 0.85
IsCJDNSFunction · 0.85
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected