0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 20:13:05 +02:00

IPv4::Addr, IPv6::Addr: added static constexpr ip_version() method

Signed-off-by: James Yonan <james@openvpn.net>
This commit is contained in:
James Yonan 2021-10-17 14:03:04 -06:00
parent e2aa56b472
commit 24b1990cf6
2 changed files with 10 additions and 0 deletions

View File

@ -59,6 +59,11 @@ namespace openvpn {
typedef std::uint32_t base_type;
typedef std::int32_t signed_base_type;
static constexpr int ip_version()
{
return 4;
}
bool defined() const
{
return true;

View File

@ -56,6 +56,11 @@ namespace openvpn {
public:
enum { SIZE=128 };
static constexpr int ip_version()
{
return 6;
}
bool defined() const
{
return true;