]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/net/ip.h
[SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph
[net-next-2.6.git] / include / net / ip.h
index e79c3e3aa4f61f8bc1bf3dc7f579a2193af06848..75f226d26e0d2ea550fef199b0f2626bd71d5381 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/types.h>
 #include <linux/ip.h>
 #include <linux/in.h>
+#include <linux/skbuff.h>
 
 #include <net/inet_sock.h>
 #include <net/snmp.h>
@@ -43,6 +44,11 @@ struct inet_skb_parm
 #define IPSKB_REROUTED         16
 };
 
+static inline unsigned int ip_hdrlen(const struct sk_buff *skb)
+{
+       return ip_hdr(skb)->ihl * 4;
+}
+
 struct ipcm_cookie
 {
        __be32                  addr;
@@ -74,7 +80,6 @@ struct msghdr;
 struct net_device;
 struct packet_type;
 struct rtable;
-struct sk_buff;
 struct sockaddr;
 
 extern void            ip_mc_dropsocket(struct sock *);