Net: Add IPv6 Link-Local Address Support

This commit is contained in:
mruddy
2016-04-05 22:26:38 +00:00
parent 1b2460bd58
commit eda3d92489
2 changed files with 9 additions and 4 deletions

View File

@@ -44,6 +44,7 @@ class CNetAddr
{
protected:
unsigned char ip[16]; // in network byte order
uint32_t scopeId; // for scoped/link-local ipv6 addresses
public:
CNetAddr();
@@ -89,7 +90,7 @@ class CNetAddr
std::vector<unsigned char> GetGroup() const;
int GetReachabilityFrom(const CNetAddr *paddrPartner = NULL) const;
CNetAddr(const struct in6_addr& pipv6Addr);
CNetAddr(const struct in6_addr& pipv6Addr, const uint32_t scope = 0);
bool GetIn6Addr(struct in6_addr* pipv6Addr) const;
friend bool operator==(const CNetAddr& a, const CNetAddr& b);