Added write support for ipv6.