⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 999-backport_ip_hdr_and_friends.patch

📁 Linux Home Server 是专门为家庭和SOHO/SMB 设计的高性价比的ISCSI 存储服务器, 具有如下的特色: 强大的iscsi 存储服务器软件; 混合iscsi 和NAS 服务;
💻 PATCH
字号:
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 theIndex: 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;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -