1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-29 04:54:28 +01:00

Added support for IPv6 addresses in DNS.

This commit is contained in:
Matias Fontanini
2012-11-20 23:57:02 -03:00
parent 2a0b248518
commit 08b4c92dac
5 changed files with 53 additions and 8 deletions

View File

@@ -41,6 +41,10 @@ namespace Tins {
std::fill(address, address + address_size, 0);
}
IPv6Address::IPv6Address(const_iterator ptr) {
std::copy(ptr, ptr + address_size, address);
}
IPv6Address::IPv6Address(const std::string &addr) {
if(inet_pton(AF_INET6, addr.c_str(), address) == 0)
throw malformed_address();