Added support for ipv6 and packets are now grouped before being sent to the database