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:
parent
e2aa56b472
commit
24b1990cf6
@ -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;
|
||||
|
@ -56,6 +56,11 @@ namespace openvpn {
|
||||
public:
|
||||
enum { SIZE=128 };
|
||||
|
||||
static constexpr int ip_version()
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
bool defined() const
|
||||
{
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user