Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/ip6_output.c
Show First 20 Lines • Show All 221 Lines • ▼ Show 20 Lines | |||||
* then result of route lookup is stored in ro->ro_rt. | * then result of route lookup is stored in ro->ro_rt. | ||||
* | * | ||||
* type of "mtu": rt_mtu is u_long, ifnet.ifr_mtu is int, and | * type of "mtu": rt_mtu is u_long, ifnet.ifr_mtu is int, and | ||||
* nd_ifinfo.linkmtu is u_int32_t. so we use u_long to hold largest one, | * nd_ifinfo.linkmtu is u_int32_t. so we use u_long to hold largest one, | ||||
* which is rt_mtu. | * which is rt_mtu. | ||||
* | * | ||||
* ifpp - XXX: just for statistics | * ifpp - XXX: just for statistics | ||||
*/ | */ | ||||
/* | |||||
* XXX TODO: no flowid is assigned for outbound flows? | |||||
*/ | |||||
int | int | ||||
ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, | ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, | ||||
struct route_in6 *ro, int flags, struct ip6_moptions *im6o, | struct route_in6 *ro, int flags, struct ip6_moptions *im6o, | ||||
struct ifnet **ifpp, struct inpcb *inp) | struct ifnet **ifpp, struct inpcb *inp) | ||||
{ | { | ||||
struct ip6_hdr *ip6, *mhip6; | struct ip6_hdr *ip6, *mhip6; | ||||
struct ifnet *ifp, *origifp; | struct ifnet *ifp, *origifp; | ||||
struct mbuf *m = m0; | struct mbuf *m = m0; | ||||
Show All 17 Lines | ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, | ||||
struct m_tag *fwd_tag = NULL; | struct m_tag *fwd_tag = NULL; | ||||
ip6 = mtod(m, struct ip6_hdr *); | ip6 = mtod(m, struct ip6_hdr *); | ||||
if (ip6 == NULL) { | if (ip6 == NULL) { | ||||
printf ("ip6 is NULL"); | printf ("ip6 is NULL"); | ||||
goto bad; | goto bad; | ||||
} | } | ||||
if (inp != NULL) | if (inp != NULL) { | ||||
M_SETFIB(m, inp->inp_inc.inc_fibnum); | M_SETFIB(m, inp->inp_inc.inc_fibnum); | ||||
if (((flags & IP_NODEFAULTFLOWID) == 0) && | |||||
(inp->inp_flags & (INP_HW_FLOWID|INP_SW_FLOWID))) { | |||||
m->m_pkthdr.flowid = inp->inp_flowid; | |||||
m->m_flags |= M_FLOWID; | |||||
} | |||||
} | |||||
finaldst = ip6->ip6_dst; | finaldst = ip6->ip6_dst; | ||||
bzero(&exthdrs, sizeof(exthdrs)); | bzero(&exthdrs, sizeof(exthdrs)); | ||||
if (opt) { | if (opt) { | ||||
/* Hop-by-Hop options header */ | /* Hop-by-Hop options header */ | ||||
MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh); | MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh); | ||||
/* Destination options header(1st part) */ | /* Destination options header(1st part) */ | ||||
if (opt->ip6po_rthdr) { | if (opt->ip6po_rthdr) { | ||||
▲ Show 20 Lines • Show All 2,691 Lines • Show Last 20 Lines |