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

📄 route.c

📁 一个基于linux的TCP/IP协议栈的实现
💻 C
字号:
/* route.c * linqianghe@163.com * 2006-10-13 */#include "route.h"#include "af_inet.h"static void myipv4_link_failure(struct sk_buff *skb){	struct rtable *rt;	//icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0);	rt = (struct rtable *) skb->dst;	if( rt )		dst_set_expires( &rt->u.dst, 0 );}struct dst_ops myipv4_dst_ops = {	.family =		MY_AF_INET,	.protocol =		__constant_htons(ETH_P_IP),	//.gc =			rt_garbage_collect,	//.check =		ipv4_dst_check,	//.destroy =		ipv4_dst_destroy,	//.ifdown =		ipv4_dst_ifdown,	//.negative_advice =	ipv4_negative_advice,	.link_failure =		myipv4_link_failure,	//.update_pmtu =		ip_rt_update_pmtu,	.entry_size =		sizeof(struct rtable),};EXPORT_SYMBOL_GPL( myipv4_dst_ops );

⌨️ 快捷键说明

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