Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/in6_rmx.c
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | |||||
#include <netinet/icmp6.h> | #include <netinet/icmp6.h> | ||||
#include <netinet6/nd6.h> | #include <netinet6/nd6.h> | ||||
#include <netinet/tcp.h> | #include <netinet/tcp.h> | ||||
#include <netinet/tcp_seq.h> | #include <netinet/tcp_seq.h> | ||||
#include <netinet/tcp_timer.h> | #include <netinet/tcp_timer.h> | ||||
#include <netinet/tcp_var.h> | #include <netinet/tcp_var.h> | ||||
extern int in6_inithead(void **head, int off); | extern int in6_inithead(void **head, int off, u_int fibnum); | ||||
#ifdef VIMAGE | #ifdef VIMAGE | ||||
extern int in6_detachhead(void **head, int off); | extern int in6_detachhead(void **head, int off); | ||||
#endif | #endif | ||||
/* | /* | ||||
* Do what we need to do when inserting a route. | * Do what we need to do when inserting a route. | ||||
*/ | */ | ||||
static struct radix_node * | static struct radix_node * | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | in6_addroute(void *v_arg, void *n_arg, struct radix_head *head, | ||||
return (rn_addroute(v_arg, n_arg, head, treenodes)); | return (rn_addroute(v_arg, n_arg, head, treenodes)); | ||||
} | } | ||||
/* | /* | ||||
* Initialize our routing tree. | * Initialize our routing tree. | ||||
*/ | */ | ||||
int | int | ||||
in6_inithead(void **head, int off) | in6_inithead(void **head, int off, u_int fibnum) | ||||
{ | { | ||||
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, | ||||
sizeof(struct sockaddr_in6), AF_INET6, fibnum); | |||||
if (rh == NULL) | if (rh == NULL) | ||||
return (0); | return (0); | ||||
rh->rnh_addaddr = in6_addroute; | rh->rnh_addaddr = in6_addroute; | ||||
*head = (void *)rh; | *head = (void *)rh; | ||||
return (1); | return (1); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |