Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/ip6_input.c
Show First 20 Lines • Show All 125 Lines • ▼ Show 20 Lines | |||||
#include <netinet/sctp_pcb.h> | #include <netinet/sctp_pcb.h> | ||||
#include <netinet6/sctp6_var.h> | #include <netinet6/sctp6_var.h> | ||||
#endif | #endif | ||||
#include <netipsec/ipsec_support.h> | #include <netipsec/ipsec_support.h> | ||||
#include <netinet6/ip6protosw.h> | #include <netinet6/ip6protosw.h> | ||||
ipproto_input_t *ip6_protox[IPPROTO_MAX] = { | ip6proto_input_t *ip6_protox[IPPROTO_MAX] = { | ||||
[0 ... IPPROTO_MAX - 1] = rip6_input }; | [0 ... IPPROTO_MAX - 1] = rip6_input }; | ||||
ipproto_ctlinput_t *ip6_ctlprotox[IPPROTO_MAX] = { | ip6proto_ctlinput_t *ip6_ctlprotox[IPPROTO_MAX] = { | ||||
[0 ... IPPROTO_MAX - 1] = rip6_ctlinput }; | [0 ... IPPROTO_MAX - 1] = rip6_ctlinput }; | ||||
VNET_DEFINE(struct in6_ifaddrhead, in6_ifaddrhead); | VNET_DEFINE(struct in6_ifaddrhead, in6_ifaddrhead); | ||||
VNET_DEFINE(struct in6_ifaddrlisthead *, in6_ifaddrhashtbl); | VNET_DEFINE(struct in6_ifaddrlisthead *, in6_ifaddrhashtbl); | ||||
VNET_DEFINE(u_long, in6_ifaddrhmask); | VNET_DEFINE(u_long, in6_ifaddrhmask); | ||||
static struct netisr_handler ip6_nh = { | static struct netisr_handler ip6_nh = { | ||||
.nh_name = "ip6", | .nh_name = "ip6", | ||||
▲ Show 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | #endif | ||||
netisr_register(&ip6_nh); | netisr_register(&ip6_nh); | ||||
#ifdef RSS | #ifdef RSS | ||||
netisr_register(&ip6_direct_nh); | netisr_register(&ip6_direct_nh); | ||||
#endif | #endif | ||||
} | } | ||||
SYSINIT(ip6_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, ip6_init, NULL); | SYSINIT(ip6_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, ip6_init, NULL); | ||||
int | int | ||||
ip6proto_register(uint8_t proto, ipproto_input_t input, ipproto_ctlinput_t ctl) | ip6proto_register(uint8_t proto, ip6proto_input_t input, | ||||
ip6proto_ctlinput_t ctl) | |||||
{ | { | ||||
MPASS(proto > 0); | MPASS(proto > 0); | ||||
if (ip6_protox[proto] == rip6_input) { | if (ip6_protox[proto] == rip6_input) { | ||||
ip6_protox[proto] = input; | ip6_protox[proto] = input; | ||||
ip6_ctlprotox[proto] = ctl; | ip6_ctlprotox[proto] = ctl; | ||||
return (0); | return (0); | ||||
▲ Show 20 Lines • Show All 1,404 Lines • Show Last 20 Lines |