summaryrefslogtreecommitdiff
path: root/plugin/type_inet/item_inetfunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/type_inet/item_inetfunc.cc')
-rw-r--r--plugin/type_inet/item_inetfunc.cc21
1 files changed, 2 insertions, 19 deletions
diff --git a/plugin/type_inet/item_inetfunc.cc b/plugin/type_inet/item_inetfunc.cc
index 8b32eb7366b..4d2f96f7cc9 100644
--- a/plugin/type_inet/item_inetfunc.cc
+++ b/plugin/type_inet/item_inetfunc.cc
@@ -221,23 +221,6 @@ longlong Item_func_is_ipv4::val_int()
return !tmp.is_null() && !Inet4_null(*tmp.string()).is_null();
}
-class IP6 : public Inet6Bundle::Fbt
-{
-public:
- IP6(Item* arg) : Inet6Bundle::Fbt(arg) {}
- bool is_v4compat() const
- {
- static_assert(sizeof(in6_addr) == IN6_ADDR_SIZE, "unexpected in6_addr size");
- return IN6_IS_ADDR_V4COMPAT((struct in6_addr *) m_buffer);
- }
- bool is_v4mapped() const
- {
- static_assert(sizeof(in6_addr) == IN6_ADDR_SIZE, "unexpected in6_addr size");
- return IN6_IS_ADDR_V4MAPPED((struct in6_addr *) m_buffer);
- }
-};
-
-
/**
Checks if the passed string represents an IPv6-address.
*/
@@ -255,7 +238,7 @@ longlong Item_func_is_ipv6::val_int()
longlong Item_func_is_ipv4_compat::val_int()
{
- IP6 ip6(args[0]);
+ Inet6Bundle::Fbt ip6(args[0]);
return !ip6.is_null() && ip6.is_v4compat();
}
@@ -266,6 +249,6 @@ longlong Item_func_is_ipv4_compat::val_int()
longlong Item_func_is_ipv4_mapped::val_int()
{
- IP6 ip6(args[0]);
+ Inet6Bundle::Fbt ip6(args[0]);
return !ip6.is_null() && ip6.is_v4mapped();
}