diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-09-21 11:25:17 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-09-21 11:25:17 +0000 |
commit | e0c1b38c1c38b468f37ac5061837b5e359cbf371 (patch) | |
tree | 372b1ac6b288786e28708d100e5c5dac898cf37f /target/linux/generic-2.6/patches/999-backport_ip_hdr_and_friends.patch | |
parent | 7f44d09489bcbe4292a8bf245dd6d6a1370f238c (diff) |
rename generic-2.6/patches to generic-2.6/patches-2.6.21
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12636 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic-2.6/patches/999-backport_ip_hdr_and_friends.patch')
-rw-r--r-- | target/linux/generic-2.6/patches/999-backport_ip_hdr_and_friends.patch | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/target/linux/generic-2.6/patches/999-backport_ip_hdr_and_friends.patch b/target/linux/generic-2.6/patches/999-backport_ip_hdr_and_friends.patch deleted file mode 100644 index bb8f4f334..000000000 --- a/target/linux/generic-2.6/patches/999-backport_ip_hdr_and_friends.patch +++ /dev/null @@ -1,58 +0,0 @@ -Index: linux-2.6.21.7/include/linux/ip.h -=================================================================== ---- linux-2.6.21.7.orig/include/linux/ip.h -+++ linux-2.6.21.7/include/linux/ip.h -@@ -104,6 +104,16 @@ struct iphdr { - /*The options start here. */ - }; - -+#ifdef __KERNEL__ -+#include <linux/skbuff.h> -+ -+static inline struct iphdr *ip_hdr(const struct sk_buff *skb) -+{ -+ return (struct iphdr *)skb_network_header(skb); -+} -+ -+#endif -+ - struct ip_auth_hdr { - __u8 nexthdr; - __u8 hdrlen; /* This one is measured in 32 bit units! */ -Index: linux-2.6.21.7/include/linux/skbuff.h -=================================================================== ---- linux-2.6.21.7.orig/include/linux/skbuff.h -+++ linux-2.6.21.7/include/linux/skbuff.h -@@ -966,6 +966,16 @@ static inline void skb_reserve(struct sk - skb->tail += len; - } - -+static inline unsigned char *skb_network_header(const struct sk_buff *skb) -+{ -+ return skb->nh.raw; -+} -+ -+static inline unsigned char *skb_tail_pointer(const struct sk_buff *skb) -+{ -+ return skb->tail; -+} -+ - /* - * CPUs often take a performance hit when accessing unaligned memory - * locations. The actual performance hit varies, it can be small if the -Index: linux-2.6.21.7/include/net/ip.h -=================================================================== ---- linux-2.6.21.7.orig/include/net/ip.h -+++ linux-2.6.21.7/include/net/ip.h -@@ -43,6 +43,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; |