Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/in6_rmx.c
Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* Initialize our routing tree. | * Initialize our routing tree. | ||||
*/ | */ | ||||
int | int | ||||
in6_inithead(void **head, int off, u_int fibnum) | in6_inithead(void **head, int off, u_int fibnum) | ||||
{ | { | ||||
struct epoch_tracker et; | |||||
struct rib_head *rh; | struct rib_head *rh; | ||||
rh = rt_table_init(offsetof(struct sockaddr_in6, sin6_addr) << 3, | rh = rt_table_init(offsetof(struct sockaddr_in6, sin6_addr) << 3, | ||||
AF_INET6, fibnum); | AF_INET6, fibnum); | ||||
if (rh == NULL) | if (rh == NULL) | ||||
return (0); | return (0); | ||||
rh->rnh_preadd = rib6_preadd; | rh->rnh_preadd = rib6_preadd; | ||||
#ifdef RADIX_MPATH | #ifdef RADIX_MPATH | ||||
rt_mpath_init_rnh(rh); | rt_mpath_init_rnh(rh); | ||||
#endif | #endif | ||||
*head = (void *)rh; | *head = (void *)rh; | ||||
NET_EPOCH_ENTER(et); | |||||
if (rib_subscribe(fibnum, AF_INET6, nd6_subscription_cb, NULL, | |||||
RIB_NOTIFY_IMMEDIATE, M_NOWAIT) == NULL) | |||||
log(LOG_ERR, "in6_inithead(): unable to subscribe to fib %u\n", | |||||
fibnum); | |||||
NET_EPOCH_EXIT(et); | |||||
return (1); | return (1); | ||||
} | } | ||||
#ifdef VIMAGE | #ifdef VIMAGE | ||||
int | int | ||||
in6_detachhead(void **head, int off) | in6_detachhead(void **head, int off) | ||||
{ | { | ||||
Show All 18 Lines |