コード例 #1
0
ファイル: in6_rmx.c プロジェクト: AhmadTux/DragonFlyBSD
/*
 * Initialize our routing tree.
 */
int
in6_inithead(void **head, int off)
{
	struct radix_node_head *rnh;

	if (!rn_inithead(head, rn_cpumaskhead(mycpuid), off))
		return 0;

	if (head != (void **)&rt_tables[mycpuid][AF_INET6]) /* BOGUS! */
		return 1;	/* only do this for the real routing table */

	rnh = *head;
	rnh->rnh_addaddr = in6_addroute;
	rnh->rnh_matchaddr = in6_matchroute;
	rnh->rnh_close = in6_clsroute;
	callout_init(&in6_mtutimo_ch[mycpuid]);
	callout_init(&in6_rtqtimo_ch[mycpuid]);
	in6_rtqtimo(rnh);	/* kick off timeout first time */
	in6_mtutimo(rnh);	/* kick off timeout first time */
	return 1;
}
コード例 #2
0
ファイル: ipx_proto.c プロジェクト: mihaicarabas/dragonfly
static int
ipx_inithead(void **head, int off)
{
	return rn_inithead(head, rn_cpumaskhead(mycpuid), off);
}