ClickHouse/src/Common/IPv6ToBinary.h

14 lines
305 B
C++
Raw Normal View History

2020-10-10 18:37:02 +00:00
#pragma once
#include <array>
#include <common/types.h>
namespace Poco { namespace Net { class IPAddress; }}
namespace DB
{
/// Convert IP address to 16-byte array with IPv6 data (big endian). If it's an IPv4, map it to IPv6.
std::array<char, 16> IPv6ToBinary(const Poco::Net::IPAddress & address);
}