Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet6/in6_rmx.c
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | |||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
* | * | ||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include "opt_mpath.h" | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#include <sys/socketvar.h> | #include <sys/socketvar.h> | ||||
#include <sys/mbuf.h> | #include <sys/mbuf.h> | ||||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | in6_inithead(uint32_t fibnum) | ||||
struct rib_subscription *rs; | struct rib_subscription *rs; | ||||
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 (NULL); | return (NULL); | ||||
rh->rnh_preadd = rib6_preadd; | rh->rnh_preadd = rib6_preadd; | ||||
#ifdef RADIX_MPATH | |||||
rt_mpath_init_rnh(rh); | |||||
#endif | |||||
rs = rib_subscribe_internal(rh, nd6_subscription_cb, NULL, | rs = rib_subscribe_internal(rh, nd6_subscription_cb, NULL, | ||||
RIB_NOTIFY_IMMEDIATE, true); | RIB_NOTIFY_IMMEDIATE, true); | ||||
KASSERT(rs != NULL, ("Unable to subscribe to fib %u\n", fibnum)); | KASSERT(rs != NULL, ("Unable to subscribe to fib %u\n", fibnum)); | ||||
return (rh); | return (rh); | ||||
} | } | ||||
#ifdef VIMAGE | #ifdef VIMAGE | ||||
void | void | ||||
in6_detachhead(struct rib_head *rh) | in6_detachhead(struct rib_head *rh) | ||||
{ | { | ||||
rt_table_destroy(rh); | rt_table_destroy(rh); | ||||
} | } | ||||
#endif | #endif |