Lines Matching refs:in6p
137 udp6_output(in6p, m, addr6, control, p)
138 struct in6pcb *in6p;
151 struct ip6_pktopts opt, *stickyopt = in6p->in6p_outputopts;
168 in6p->in6p_outputopts = &opt;
186 if (!IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_faddr)) {
200 if ((in6p->in6p_flags & IN6P_IPV6_V6ONLY)) {
218 if (in6_embedscope(&sin6->sin6_addr, sin6, in6p, NULL) != 0) {
224 laddr = in6_selectsrc(sin6, in6p->in6p_outputopts,
225 in6p->in6p_moptions,
226 &in6p->in6p_route,
227 &in6p->in6p_laddr, &storage, &error);
229 laddr = &in6p->in6p_laddr; /* XXX */
235 if (in6p->in6p_lport == 0 &&
236 (error = in6_pcbsetport(laddr, in6p, p, 0)) != 0)
239 if (IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_faddr)) {
243 if (IN6_IS_ADDR_V4MAPPED(&in6p->in6p_faddr)) {
244 if ((in6p->in6p_flags & IN6P_IPV6_V6ONLY)) {
259 laddr = &in6p->in6p_laddr;
260 faddr = &in6p->in6p_faddr;
261 fport = in6p->in6p_fport;
281 udp6->uh_sport = in6p->in6p_lport; /* lport is always set in the PCB */
292 ip6->ip6_flow = in6p->in6p_flowinfo & IPV6_FLOWINFO_MASK;
299 ip6->ip6_hlim = in6_selecthlim(in6p,
300 in6p->in6p_route.ro_rt ?
301 in6p->in6p_route.ro_rt->rt_ifp : NULL);
314 if (ipsec_bypass == 0 && ipsec_setsocket(m, in6p->in6p_socket) != 0) {
319 m->m_pkthdr.socket_id = get_socket_id(in6p->in6p_socket);
320 error = ip6_output(m, in6p->in6p_outputopts, &in6p->in6p_route,
321 flags, in6p->in6p_moptions, NULL, 0);
334 ip6_clearpktopts(in6p->in6p_outputopts, 0, -1);
335 in6p->in6p_outputopts = stickyopt;