lib/tun.h: Remove non-endian-safe redefinition of IP header

We can simply use 'struct iphdr' from netinet/ip.h to achieve
the same goal (and be portable).

Change-Id: Ieece22e127dc14a7ffdc3b05656628989ad00b32
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 0d0e569..4fb2066 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -34,6 +34,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
+#include <netinet/ip.h>
 #include <arpa/inet.h>
 #include <sys/wait.h>
 #include <sys/stat.h>
@@ -43,6 +44,7 @@
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <net/if.h>
+#include <net/if.h>
 
 #include <errno.h>
 
@@ -221,13 +223,13 @@
 {
 	struct ippoolm_t *ipm;
 	struct in46_addr dst;
-	struct tun_packet_t *iph = (struct tun_packet_t *)pack;
+	struct iphdr *iph = (struct iphdr *)pack;
 
-	if (iph->ver == 4) {
+	if (iph->version == 4) {
 		if (len < sizeof(*iph) || len < 4*iph->ihl)
 			return -1;
 		dst.len = 4;
-		dst.v4.s_addr = iph->dst;
+		dst.v4.s_addr = iph->daddr;
 	} else {
 		LOGP(DGGSN, LOGL_NOTICE, "non-IPv4 packet received from tun\n");
 		return -1;