- /*
- * Timeout routine. Age arp_tab entries periodically.
- */
- /* ARGSUSED */
- static void
- arptimer(ignored_arg)
- void *ignored_arg;
- {
- int s = splnet();
- register struct llinfo_arp *la = llinfo_arp.la_next;
- timeout(arptimer, (caddr_t)0, arpt_prune * hz);
- while (la != &llinfo_arp) {
- register struct rtentry *rt = la->la_rt;
- la = la->la_next;
- if (rt->rt_expire && rt->rt_expire <= time.tv_sec)
- arptfree(la->la_prev); /* timer has expired, clear */
- }
- splx(s);
- }
- //该片段来自于http://www.codesnippet.cn/detail/13112012305.html
来源: http://www.codesnippet.cn/detail/13112012305.html