* 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() */
| 640 | * @see CNetAddr::IsIPv6() |
| 641 | */ |
| 642 | bool 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 | |
| 652 | bool CNetAddr::HasLinkedIPv4() const |
| 653 | { |
no test coverage detected