From: t_jeang Date: Tue, 6 Jan 2009 12:05:21 +0000 (+0000) Subject: Backport of eddc9ec53be2ecdbf4efe0efd4a83052594f0ac0 providing a X-Git-Tag: git-d3e5a938e7ed718f6d191e8b6b176fcfeb88a294 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9b3a86d32e39c2aa502f75a2f1e9366e0728ab0e;p=xenclient%2Fkernel.git Backport of eddc9ec53be2ecdbf4efe0efd4a83052594f0ac0 providing a functional alternative without removing the iph field. commit eddc9ec53be2ecdbf4efe0efd4a83052594f0ac0 Author: Arnaldo Carvalho de Melo Date: Fri Apr 20 22:47:35 2007 -0700 [SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- diff --git a/include/linux/ip.h b/include/linux/ip.h index 4b55cf1d..6c1ccd39 100644 --- a/include/linux/ip.h +++ b/include/linux/ip.h @@ -101,6 +101,15 @@ struct iphdr { /*The options start here. */ }; +#ifdef __KERNEL__ +#include + +static inline struct iphdr *ip_hdr(const struct sk_buff *skb) +{ + return skb->nh.iph; +} +#endif + struct ip_auth_hdr { __u8 nexthdr; __u8 hdrlen; /* This one is measured in 32 bit units! */