Set tun_addaddr ipv agnostic and add support for ipv6

sgsnemu (the only user of this API so far) has been modified to use the
new API with in46_addr.

FreeBSD code for IPv6 has not been tested.

Change-Id: Ie36afe6eaf393855a4a708000ef4ad0192bf4767
diff --git a/lib/tun.h b/lib/tun.h
index 411deea..6f7c0ff 100644
--- a/lib/tun.h
+++ b/lib/tun.h
@@ -80,8 +80,8 @@
 extern int tun_decaps(struct tun_t *this);
 extern int tun_encaps(struct tun_t *tun, void *pack, unsigned len);
 
-extern int tun_addaddr(struct tun_t *this, struct in_addr *addr,
-		       struct in_addr *dstaddr, struct in_addr *netmask);
+extern int tun_addaddr(struct tun_t *this, struct in46_addr *addr,
+		       struct in46_addr *dstaddr, size_t prefixlen);
 
 extern int tun_setaddr(struct tun_t *this, struct in46_addr *our_adr,
 		       struct in46_addr *his_adr, size_t prefixlen);