Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/raw_ip6.c
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
* @(#)raw_ip.c 8.2 (Berkeley) 1/4/94 | * @(#)raw_ip.c 8.2 (Berkeley) 1/4/94 | ||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include "opt_ipsec.h" | #include "opt_ipsec.h" | ||||
#include "opt_inet6.h" | #include "opt_inet6.h" | ||||
#include "opt_route.h" | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/errno.h> | #include <sys/errno.h> | ||||
#include <sys/jail.h> | #include <sys/jail.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/mbuf.h> | #include <sys/mbuf.h> | ||||
Show All 21 Lines | |||||
#include <netinet/ip6.h> | #include <netinet/ip6.h> | ||||
#include <netinet/ip_var.h> | #include <netinet/ip_var.h> | ||||
#include <netinet6/ip6protosw.h> | #include <netinet6/ip6protosw.h> | ||||
#include <netinet6/ip6_mroute.h> | #include <netinet6/ip6_mroute.h> | ||||
#include <netinet6/in6_pcb.h> | #include <netinet6/in6_pcb.h> | ||||
#include <netinet6/ip6_var.h> | #include <netinet6/ip6_var.h> | ||||
#include <netinet6/nd6.h> | #include <netinet6/nd6.h> | ||||
#include <netinet6/raw_ip6.h> | #include <netinet6/raw_ip6.h> | ||||
#include <netinet6/in6_fib.h> | |||||
#include <netinet6/scope6_var.h> | #include <netinet6/scope6_var.h> | ||||
#include <netinet6/send.h> | #include <netinet6/send.h> | ||||
#include <netipsec/ipsec_support.h> | #include <netipsec/ipsec_support.h> | ||||
#include <machine/stdarg.h> | #include <machine/stdarg.h> | ||||
#define satosin6(sa) ((struct sockaddr_in6 *)(sa)) | #define satosin6(sa) ((struct sockaddr_in6 *)(sa)) | ||||
▲ Show 20 Lines • Show All 343 Lines • ▼ Show 20 Lines | rip6_output(struct mbuf *m, struct socket *so, ...) | ||||
M_PREPEND(m, sizeof(*ip6), M_NOWAIT); | M_PREPEND(m, sizeof(*ip6), M_NOWAIT); | ||||
if (m == NULL) { | if (m == NULL) { | ||||
error = ENOBUFS; | error = ENOBUFS; | ||||
goto bad; | goto bad; | ||||
} | } | ||||
ip6 = mtod(m, struct ip6_hdr *); | ip6 = mtod(m, struct ip6_hdr *); | ||||
#ifdef ROUTE_MPATH | |||||
if (V_fib_hash_outbound) { | |||||
uint32_t hash_type, hash_val; | |||||
hash_val = fib6_calc_software_hash(&inp->in6p_laddr, | |||||
&dstsock->sin6_addr, 0, 0, so->so_proto->pr_protocol, | |||||
&hash_type); | |||||
inp->inp_flowid = hash_val; | |||||
inp->inp_flowtype = hash_type; | |||||
} | |||||
#endif | |||||
/* | /* | ||||
* Source address selection. | * Source address selection. | ||||
*/ | */ | ||||
error = in6_selectsrc_socket(dstsock, optp, inp, so->so_cred, | error = in6_selectsrc_socket(dstsock, optp, inp, so->so_cred, | ||||
scope_ambiguous, &in6a, &hlim); | scope_ambiguous, &in6a, &hlim); | ||||
if (error) | if (error) | ||||
goto bad; | goto bad; | ||||
▲ Show 20 Lines • Show All 442 Lines • Show Last 20 Lines |