netpoll_pass_skb_to_rx_hook.patch

来自「Linux-2.6.18内核调试工具补丁程序KGDB。」· PATCH 代码 · 共 36 行

PATCH
36
字号
This is from Jason Wessel <jason.wessel@windriver.com> and will allowkgdboe for example to determine the MAC of the GDB host.  This has beenqueued up by the Netpoll maintainer. include/linux/netpoll.h |    2 +- net/core/netpoll.c      |    3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)Index: linux-2.6.15-rc4/include/linux/netpoll.h===================================================================--- linux-2.6.15-rc4.orig/include/linux/netpoll.h+++ linux-2.6.15-rc4/include/linux/netpoll.h@@ -17,7 +17,7 @@ struct netpoll; struct netpoll { 	struct net_device *dev; 	char dev_name[16], *name;-	void (*rx_hook)(struct netpoll *, int, char *, int);+	void (*rx_hook)(struct netpoll *, int, char *, int, struct sk_buff *); 	void (*drop)(struct sk_buff *skb); 	u32 local_ip, remote_ip; 	u16 local_port, remote_port;Index: linux-2.6.15-rc4/net/core/netpoll.c===================================================================--- linux-2.6.15-rc4.orig/net/core/netpoll.c+++ linux-2.6.15-rc4/net/core/netpoll.c@@ -504,7 +504,8 @@ int __netpoll_rx(struct sk_buff *skb)  	np->rx_hook(np, ntohs(uh->source), 		    (char *)(uh+1),-		    ulen - sizeof(struct udphdr));+		    ulen - sizeof(struct udphdr),+		    skb);  	kfree_skb(skb); 	return 1;

⌨️ 快捷键说明

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