ip6 198 altq/altq_cdnr.c struct ip6_hdr *ip6 = (struct ip6_hdr *)ip; ip6 201 altq/altq_cdnr.c flowlabel = ntohl(ip6->ip6_flow); ip6 204 altq/altq_cdnr.c ip6->ip6_flow = htonl(flowlabel); ip6 470 altq/altq_red.c struct ip6_hdr *ip6 = hdr; ip6 473 altq/altq_red.c flowlabel = ntohl(ip6->ip6_flow); ip6 486 altq/altq_red.c ip6->ip6_flow = htonl(flowlabel); ip6 640 altq/altq_subr.c struct ip6_hdr *ip6 = (struct ip6_hdr *)pktattr->pattr_hdr; ip6 643 altq/altq_subr.c flowlabel = ntohl(ip6->ip6_flow); ip6 703 altq/altq_subr.c struct ip6_hdr *ip6 = (struct ip6_hdr *)pktattr->pattr_hdr; ip6 706 altq/altq_subr.c flowlabel = ntohl(ip6->ip6_flow); ip6 710 altq/altq_subr.c ip6->ip6_flow = htonl(flowlabel); ip6 2229 net/if_bridge.c struct ip6_hdr *ip6; ip6 2272 net/if_bridge.c ip6 = mtod(m, struct ip6_hdr *); ip6 2275 net/if_bridge.c proto = ip6->ip6_nxt; ip6 2530 net/if_bridge.c struct ip6_hdr *ip6; ip6 2540 net/if_bridge.c ip6 = mtod(m, struct ip6_hdr *); ip6 2542 net/if_bridge.c if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { ip6 952 net/if_trunk.c struct ip6_hdr *ip6, ip6buf; ip6 985 net/if_trunk.c if ((ip6 = (struct ip6_hdr *) ip6 986 net/if_trunk.c trunk_lb_gethdr(m, off, sizeof(*ip6), &ip6buf)) == NULL) ip6 988 net/if_trunk.c p = hash32_buf(&ip6->ip6_src, sizeof(struct in6_addr), p); ip6 989 net/if_trunk.c p = hash32_buf(&ip6->ip6_dst, sizeof(struct in6_addr), p); ip6 5142 net/pf.c struct ip6_hdr *ip6; ip6 5172 net/pf.c ip6 = mtod(m0, struct ip6_hdr *); ip6 5179 net/pf.c dst->sin6_addr = ip6->ip6_dst; ip6 5194 net/pf.c pf_map_addr(AF_INET6, r, (struct pf_addr *)&ip6->ip6_src, ip6 5219 net/pf.c ip6 = mtod(m0, struct ip6_hdr *); ip6 92 net/pf_osfp.c struct ip6_hdr *ip6; ip6 101 net/pf_osfp.c ip6 = (struct ip6_hdr *)NULL; ip6 104 net/pf_osfp.c ip6 = mtod(m, struct ip6_hdr *); ip6 109 net/pf_osfp.c return (pf_osfp_fingerprint_hdr(ip, ip6, (struct tcphdr *)hdr)); ip6 114 net/pf_osfp.c pf_osfp_fingerprint_hdr(const struct ip *ip, const struct ip6_hdr *ip6, const struct tcphdr *tcp) ip6 156 net/pf_osfp.c else if (ip6) { ip6 162 net/pf_osfp.c fp.fp_psize = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen); ip6 163 net/pf_osfp.c fp.fp_ttl = ip6->ip6_hlim; ip6 167 net/pf_osfp.c strlcpy(srcname, ip6_sprintf((struct in6_addr *)&ip6->ip6_src), ip6 173 net/pf_osfp.c sin6.sin6_addr = ip6->ip6_src; ip6 208 netinet/ip_ah.c struct ip6_hdr ip6; ip6 350 netinet/ip_ah.c m_copydata(m, 0, sizeof(ip6), (caddr_t) &ip6); ip6 353 netinet/ip_ah.c if (ip6.ip6_plen == 0) { ip6 361 netinet/ip_ah.c ip6.ip6_flow = 0; ip6 362 netinet/ip_ah.c ip6.ip6_hlim = 0; ip6 363 netinet/ip_ah.c ip6.ip6_vfc &= ~IPV6_VERSION_MASK; ip6 364 netinet/ip_ah.c ip6.ip6_vfc |= IPV6_VERSION; ip6 367 netinet/ip_ah.c if (IN6_IS_SCOPE_EMBED(&ip6.ip6_src)) ip6 368 netinet/ip_ah.c ip6.ip6_src.s6_addr16[1] = 0; ip6 369 netinet/ip_ah.c if (IN6_IS_SCOPE_EMBED(&ip6.ip6_dst)) ip6 370 netinet/ip_ah.c ip6.ip6_dst.s6_addr16[1] = 0; ip6 373 netinet/ip_ah.c m_copyback(m, 0, sizeof(struct ip6_hdr), &ip6); ip6 404 netinet/ip_ah.c nxt = ip6.ip6_nxt & 0xff; /* Next header type. */ ip6 497 netinet/ip_ah.c m_copydata(m, 0, sizeof(ip6), ip6 498 netinet/ip_ah.c (caddr_t)&ip6); ip6 499 netinet/ip_ah.c addr[0] = ip6.ip6_dst; ip6 500 netinet/ip_ah.c ip6.ip6_dst = finaldst; ip6 501 netinet/ip_ah.c m_copyback(m, 0, sizeof(ip6), &ip6); ip6 581 netinet/ip_carp.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 602 netinet/ip_carp.c if (ip6->ip6_hlim != CARP_DFLTTL) { ip6 604 netinet/ip_carp.c CARP_LOG(sc, ("received ttl %d != %d on %s", ip6->ip6_hlim, ip6 680 netinet/ip_carp.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 683 netinet/ip_carp.c in6_src = ip6->ip6_src; ip6 1116 netinet/ip_carp.c struct ip6_hdr *ip6; ip6 1125 netinet/ip_carp.c len = sizeof(*ip6) + sizeof(ch); ip6 1131 netinet/ip_carp.c ip6 = mtod(m, struct ip6_hdr *); ip6 1132 netinet/ip_carp.c bzero(ip6, sizeof(*ip6)); ip6 1133 netinet/ip_carp.c ip6->ip6_vfc |= IPV6_VERSION; ip6 1134 netinet/ip_carp.c ip6->ip6_hlim = CARP_DFLTTL; ip6 1135 netinet/ip_carp.c ip6->ip6_nxt = IPPROTO_CARP; ip6 1142 netinet/ip_carp.c bzero(&ip6->ip6_src, sizeof(struct in6_addr)); ip6 1145 netinet/ip_carp.c &ip6->ip6_src, sizeof(struct in6_addr)); ip6 1148 netinet/ip_carp.c ip6->ip6_dst.s6_addr8[0] = 0xff; ip6 1149 netinet/ip_carp.c ip6->ip6_dst.s6_addr8[1] = 0x02; ip6 1150 netinet/ip_carp.c ip6->ip6_dst.s6_addr8[15] = 0x12; ip6 1152 netinet/ip_carp.c ch_ptr = (void *)ip6 + sizeof(*ip6); ip6 1157 netinet/ip_carp.c m->m_data += sizeof(*ip6); ip6 1158 netinet/ip_carp.c ch_ptr->carp_cksum = carp_cksum(m, len - sizeof(*ip6)); ip6 1159 netinet/ip_carp.c m->m_data -= sizeof(*ip6); ip6 281 netinet/ip_ether.c struct ip6_hdr *ip6; ip6 388 netinet/ip_ether.c ip6 = mtod(m, struct ip6_hdr *); ip6 390 netinet/ip_ether.c ip6->ip6_flow = 0; ip6 391 netinet/ip_ether.c ip6->ip6_nxt = IPPROTO_ETHERIP; ip6 392 netinet/ip_ether.c ip6->ip6_vfc &= ~IPV6_VERSION_MASK; ip6 393 netinet/ip_ether.c ip6->ip6_vfc |= IPV6_VERSION; ip6 394 netinet/ip_ether.c ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(*ip6)); ip6 395 netinet/ip_ether.c ip6->ip6_hlim = ip_defttl; ip6 396 netinet/ip_ether.c ip6->ip6_dst = tdb->tdb_dst.sin6.sin6_addr; ip6 397 netinet/ip_ether.c ip6->ip6_src = tdb->tdb_src.sin6.sin6_addr; ip6 562 netinet/ip_ipcomp.c struct ip6_hdr *ip6; ip6 647 netinet/ip_ipcomp.c ip6 = mtod(m, struct ip6_hdr *); ip6 648 netinet/ip_ipcomp.c ipcomp->ipcomp_nh = ip6->ip6_nxt; ip6 649 netinet/ip_ipcomp.c ip6->ip6_nxt = IPPROTO_IPCOMP; ip6 147 netinet/ip_ipip.c struct ip6_hdr *ip6 = NULL; ip6 265 netinet/ip_ipip.c ip6 = (struct ip6_hdr *) ipo; ip6 266 netinet/ip_ipip.c nxt = ip6->ip6_nxt; ip6 267 netinet/ip_ipip.c itos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; ip6 272 netinet/ip_ipip.c ip6->ip6_flow &= ~htonl(0xff << 20); ip6 273 netinet/ip_ipip.c ip6->ip6_flow |= htonl((u_int32_t) itos << 20); ip6 304 netinet/ip_ipip.c if (ip6) { ip6 311 netinet/ip_ipip.c if (IN6_ARE_ADDR_EQUAL(&sin6->sin6_addr, &ip6->ip6_src)) { ip6 388 netinet/ip_ipip.c struct ip6_hdr *ip6, *ip6o; ip6 500 netinet/ip_ipip.c ip6 = mtod(m, struct ip6_hdr *); ip6 501 netinet/ip_ipip.c if (IN6_IS_SCOPE_EMBED(&ip6->ip6_src)) ip6 502 netinet/ip_ipip.c ip6->ip6_src.s6_addr16[1] = 0; ip6 503 netinet/ip_ipip.c if (IN6_IS_SCOPE_EMBED(&ip6->ip6_dst)) ip6 504 netinet/ip_ipip.c ip6->ip6_dst.s6_addr16[1] = 0; ip6 292 netinet/ipsec_input.c struct ip6_hdr *ip6, ip6n; ip6 429 netinet/ipsec_input.c ip6 = mtod(m, struct ip6_hdr *); ip6 430 netinet/ipsec_input.c ip6->ip6_plen = htons(m->m_pkthdr.len - ip6 91 netinet/ipsec_output.c struct ip6_hdr *ip6; ip6 198 netinet/ipsec_output.c ip6 = mtod(m, struct ip6_hdr *); ip6 215 netinet/ipsec_output.c &ip6->ip6_dst))) || ip6 241 netinet/ipsec_output.c if (m->m_pkthdr.len - sizeof(*ip6) > ip6 247 netinet/ipsec_output.c ip6 = mtod(m, struct ip6_hdr *); ip6 248 netinet/ipsec_output.c ip6->ip6_plen = htons(m->m_pkthdr.len ip6 249 netinet/ipsec_output.c - sizeof(*ip6)); ip6 308 netinet/ipsec_output.c ip6 = mtod(m, struct ip6_hdr *); ip6 311 netinet/ipsec_output.c nxt = ip6->ip6_nxt; ip6 398 netinet/ipsec_output.c struct ip6_hdr *ip6; ip6 444 netinet/ipsec_output.c if (m->m_pkthdr.len < sizeof(*ip6)) { ip6 448 netinet/ipsec_output.c if (m->m_pkthdr.len - sizeof(*ip6) > IPV6_MAXPACKET) { ip6 453 netinet/ipsec_output.c ip6 = mtod(m, struct ip6_hdr *); ip6 454 netinet/ipsec_output.c ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(*ip6)); ip6 456 netinet/ipsec_output.c ip6->ip6_nxt = IPPROTO_UDP; ip6 349 netinet/tcp_input.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 352 netinet/tcp_input.c (caddr_t)&ip6->ip6_dst - (caddr_t)ip6); ip6 388 netinet/tcp_input.c struct ip6_hdr *ip6 = NULL; ip6 472 netinet/tcp_input.c ip6 = NULL; ip6 504 netinet/tcp_input.c ip6 = mtod(m, struct ip6_hdr *); ip6 506 netinet/tcp_input.c iptos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; ip6 510 netinet/tcp_input.c if (IN6_IS_ADDR_V4MAPPED(&ip6->ip6_src) || ip6 511 netinet/tcp_input.c IN6_IS_ADDR_V4MAPPED(&ip6->ip6_dst)) { ip6 524 netinet/tcp_input.c if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src)) { ip6 530 netinet/tcp_input.c if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { ip6 599 netinet/tcp_input.c inp = in6_pcbhashlookup(&tcbtable, &ip6->ip6_src, th->th_sport, ip6 600 netinet/tcp_input.c &ip6->ip6_dst, th->th_dport); ip6 617 netinet/tcp_input.c &ip6->ip6_dst, th->th_dport, inpl_flags); ip6 678 netinet/tcp_input.c src.sin6.sin6_addr = ip6->ip6_src; ip6 683 netinet/tcp_input.c dst.sin6.sin6_addr = ip6->ip6_dst; ip6 696 netinet/tcp_input.c bcopy(ip6, &tcp_saveti6.ti6_i, sizeof(*ip6)); ip6 806 netinet/tcp_input.c if (ip6 && !ip6_use_deprecated) { ip6 810 netinet/tcp_input.c &ip6->ip6_dst)) && ip6 827 netinet/tcp_input.c if (IN6_ARE_ADDR_EQUAL(&ip6->ip6_src, ip6 828 netinet/tcp_input.c &ip6->ip6_dst)) { ip6 4142 netinet/tcp_input.c struct ip6_hdr *ip6 = NULL; ip6 4215 netinet/tcp_input.c ip6 = mtod(m, struct ip6_hdr *); ip6 4216 netinet/tcp_input.c ip6->ip6_dst = sc->sc_src.sin6.sin6_addr; ip6 4217 netinet/tcp_input.c ip6->ip6_src = sc->sc_dst.sin6.sin6_addr; ip6 4218 netinet/tcp_input.c ip6->ip6_nxt = IPPROTO_TCP; ip6 4220 netinet/tcp_input.c th = (struct tcphdr *)(ip6 + 1); ip6 4337 netinet/tcp_input.c ip6->ip6_plen = htons(tlen - hlen); ip6 4361 netinet/tcp_input.c ip6->ip6_vfc &= ~IPV6_VERSION_MASK; ip6 4362 netinet/tcp_input.c ip6->ip6_vfc |= IPV6_VERSION; ip6 4363 netinet/tcp_input.c ip6->ip6_plen = htons(tlen - hlen); ip6 4380 netinet/tcp_input.c ip6->ip6_hlim = in6_selecthlim(NULL, ip6 1094 netinet/tcp_output.c struct ip6_hdr *ip6; ip6 1096 netinet/tcp_output.c ip6 = mtod(m, struct ip6_hdr *); ip6 1097 netinet/tcp_output.c ip6->ip6_plen = m->m_pkthdr.len - ip6 1100 netinet/tcp_output.c ip6->ip6_nxt = IPPROTO_TCP; ip6 1101 netinet/tcp_output.c ip6->ip6_hlim = in6_selecthlim(tp->t_inpcb, NULL); ip6 1104 netinet/tcp_output.c ip6->ip6_flow |= htonl(IPTOS_ECN_ECT0 << 20); ip6 270 netinet/tcp_subr.c struct ip6_hdr *ip6; ip6 272 netinet/tcp_subr.c ip6 = mtod(m, struct ip6_hdr *); ip6 274 netinet/tcp_subr.c ip6->ip6_src = inp->inp_laddr6; ip6 275 netinet/tcp_subr.c ip6->ip6_dst = inp->inp_faddr6; ip6 276 netinet/tcp_subr.c ip6->ip6_flow = htonl(0x60000000) | ip6 279 netinet/tcp_subr.c ip6->ip6_nxt = IPPROTO_TCP; ip6 280 netinet/tcp_subr.c ip6->ip6_plen = htons(sizeof(struct tcphdr)); /*XXX*/ ip6 281 netinet/tcp_subr.c ip6->ip6_hlim = in6_selecthlim(inp, NULL); /*XXX*/ ip6 701 netinet/tcp_subr.c struct ip6_hdr *ip6; ip6 741 netinet/tcp_subr.c ip6 = ip6cp->ip6c_ip6; ip6 746 netinet/tcp_subr.c ip6 = NULL; ip6 750 netinet/tcp_subr.c if (ip6) { ip6 1150 netinet/tcp_subr.c struct ip6_hdr *ip6; ip6 1152 netinet/tcp_subr.c ip6 = mtod(m, struct ip6_hdr *); ip6 1154 netinet/tcp_subr.c ip6pseudo.ip6ph_src = ip6->ip6_src; ip6 1155 netinet/tcp_subr.c ip6pseudo.ip6ph_dst = ip6->ip6_dst; ip6 180 netinet/udp_usrreq.c struct ip6_hdr *ip6; ip6 199 netinet/udp_usrreq.c ip6 = NULL; ip6 206 netinet/udp_usrreq.c ip6 = mtod(m, struct ip6_hdr *); ip6 242 netinet/udp_usrreq.c else if (ip6) { ip6 269 netinet/udp_usrreq.c if (ip6) { ip6 271 netinet/udp_usrreq.c if (IN6_IS_ADDR_V4MAPPED(&ip6->ip6_src) || ip6 272 netinet/udp_usrreq.c IN6_IS_ADDR_V4MAPPED(&ip6->ip6_dst)) { ip6 369 netinet/udp_usrreq.c srcsa.sin6.sin6_flowinfo = htonl(0x0fffffff) & ip6->ip6_flow; ip6 372 netinet/udp_usrreq.c (void)in6_recoverscope(&srcsa.sin6, &ip6->ip6_src, ip6 380 netinet/udp_usrreq.c (void)in6_recoverscope(&dstsa.sin6, &ip6->ip6_dst, ip6 387 netinet/udp_usrreq.c if ((ip6 && IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) || ip6 421 netinet/udp_usrreq.c if (ip6 && !(inp->inp_flags & INP_IPV6)) ip6 423 netinet/udp_usrreq.c if (!ip6 && (inp->inp_flags & INP_IPV6)) ip6 429 netinet/udp_usrreq.c if (ip6) { ip6 432 netinet/udp_usrreq.c &ip6->ip6_dst)) ip6 441 netinet/udp_usrreq.c if (ip6) { ip6 444 netinet/udp_usrreq.c &ip6->ip6_src) || ip6 461 netinet/udp_usrreq.c if (ip6 && (last->inp_flags & ip6 508 netinet/udp_usrreq.c if (ip6 && (last->inp_flags & IN6P_CONTROLOPTS)) ip6 527 netinet/udp_usrreq.c if (ip6) ip6 528 netinet/udp_usrreq.c inp = in6_pcbhashlookup(&udbtable, &ip6->ip6_src, uh->uh_sport, ip6 529 netinet/udp_usrreq.c &ip6->ip6_dst, uh->uh_dport); ip6 540 netinet/udp_usrreq.c if (ip6) { ip6 542 netinet/udp_usrreq.c &ip6->ip6_dst, uh->uh_dport, inpl_reverse); ip6 554 netinet/udp_usrreq.c if (ip6) { ip6 626 netinet/udp_usrreq.c if (ip6 && (inp->inp_flags & IN6P_CONTROLOPTS)) ip6 669 netinet/udp_usrreq.c struct ip6_hdr *ip6; ip6 701 netinet/udp_usrreq.c ip6 = ip6cp->ip6c_ip6; ip6 706 netinet/udp_usrreq.c ip6 = NULL; ip6 743 netinet/udp_usrreq.c if (ip6) { ip6 760 netinet/udp_usrreq.c sa6_src.sin6_addr = ip6->ip6_src; ip6 762 netinet/udp_usrreq.c &ip6->ip6_src); ip6 179 netinet6/frag6.c struct ip6_hdr *ip6; ip6 193 netinet6/frag6.c ip6 = mtod(m, struct ip6_hdr *); ip6 204 netinet6/frag6.c || !IN6_ARE_ADDR_EQUAL(&dst->sin6_addr, &ip6->ip6_dst))) { ip6 212 netinet6/frag6.c dst->sin6_addr = ip6->ip6_dst; ip6 215 netinet6/frag6.c rtalloc_mpath((struct route *)&ro, &ip6->ip6_src.s6_addr32[0], 0); ip6 226 netinet6/frag6.c if (ip6->ip6_plen == 0) { ip6 239 netinet6/frag6.c (((ntohs(ip6->ip6_plen) - offset) & 0x7) != 0)) { ip6 266 netinet6/frag6.c IN6_ARE_ADDR_EQUAL(&ip6->ip6_src, &q6->ip6q_src) && ip6 267 netinet6/frag6.c IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &q6->ip6q_dst)) ip6 304 netinet6/frag6.c q6->ip6q_src = ip6->ip6_src; ip6 305 netinet6/frag6.c q6->ip6q_dst = ip6->ip6_dst; ip6 327 netinet6/frag6.c frgpartlen = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) - offset; ip6 386 netinet6/frag6.c ip6af->ip6af_head = ip6->ip6_flow; ip6 387 netinet6/frag6.c ip6af->ip6af_len = ip6->ip6_plen; ip6 388 netinet6/frag6.c ip6af->ip6af_nxt = ip6->ip6_nxt; ip6 389 netinet6/frag6.c ip6af->ip6af_hlim = ip6->ip6_hlim; ip6 406 netinet6/frag6.c ecn = (ntohl(ip6->ip6_flow) >> 20) & IPTOS_ECN_MASK; ip6 551 netinet6/frag6.c ip6 = mtod(m, struct ip6_hdr *); ip6 552 netinet6/frag6.c ip6->ip6_plen = htons((u_short)next + offset - sizeof(struct ip6_hdr)); ip6 553 netinet6/frag6.c ip6->ip6_src = q6->ip6q_src; ip6 554 netinet6/frag6.c ip6->ip6_dst = q6->ip6q_dst; ip6 564 netinet6/frag6.c ovbcopy((caddr_t)ip6, (caddr_t)ip6 + sizeof(struct ip6_frag), ip6 646 netinet6/frag6.c struct ip6_hdr *ip6; ip6 649 netinet6/frag6.c ip6 = mtod(m, struct ip6_hdr *); ip6 652 netinet6/frag6.c ip6->ip6_src = q6->ip6q_src; ip6 653 netinet6/frag6.c ip6->ip6_dst = q6->ip6q_dst; ip6 425 netinet6/icmp6.c struct ip6_hdr *ip6, *nip6; ip6 438 netinet6/icmp6.c ip6 = mtod(m, struct ip6_hdr *); ip6 458 netinet6/icmp6.c icmp6->icmp6_type, sum, ip6_sprintf(&ip6->ip6_src))); ip6 486 netinet6/icmp6.c carp_lsdrop(m, AF_INET6, ip6->ip6_src.s6_addr32, ip6 487 netinet6/icmp6.c ip6->ip6_dst.s6_addr32)) ip6 618 netinet6/icmp6.c bcopy(ip6, nip6, sizeof(struct ip6_hdr)); ip6 741 netinet6/icmp6.c bcopy(ip6, nip6, sizeof(struct ip6_hdr)); ip6 859 netinet6/icmp6.c icmp6->icmp6_type, ip6_sprintf(&ip6->ip6_src), ip6 860 netinet6/icmp6.c ip6_sprintf(&ip6->ip6_dst), ip6 1195 netinet6/icmp6.c struct ip6_hdr *ip6; ip6 1199 netinet6/icmp6.c ip6 = mtod(m, struct ip6_hdr *); ip6 1217 netinet6/icmp6.c bcopy(&ip6->ip6_dst, &sin6.sin6_addr, sizeof(sin6.sin6_addr)); ip6 1286 netinet6/icmp6.c if (IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &sin6.sin6_addr)) ip6 1892 netinet6/icmp6.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 1909 netinet6/icmp6.c (void)in6_recoverscope(&rip6src, &ip6->ip6_src, m->m_pkthdr.rcvif); ip6 1917 netinet6/icmp6.c !IN6_ARE_ADDR_EQUAL(&in6p->in6p_laddr, &ip6->ip6_dst)) ip6 1920 netinet6/icmp6.c !IN6_ARE_ADDR_EQUAL(&in6p->in6p_faddr, &ip6->ip6_src)) ip6 1985 netinet6/icmp6.c struct ip6_hdr *ip6; ip6 2033 netinet6/icmp6.c ip6 = mtod(m, struct ip6_hdr *); ip6 2034 netinet6/icmp6.c ip6->ip6_nxt = IPPROTO_ICMPV6; ip6 2035 netinet6/icmp6.c icmp6 = (struct icmp6_hdr *)(ip6 + 1); ip6 2039 netinet6/icmp6.c t = ip6->ip6_dst; ip6 2044 netinet6/icmp6.c ip6->ip6_dst = ip6->ip6_src; ip6 2055 netinet6/icmp6.c sa6_src.sin6_addr = ip6->ip6_dst; ip6 2056 netinet6/icmp6.c in6_recoverscope(&sa6_src, &ip6->ip6_dst, m->m_pkthdr.rcvif); ip6 2057 netinet6/icmp6.c in6_embedscope(&ip6->ip6_dst, &sa6_src, NULL, NULL); ip6 2109 netinet6/icmp6.c ip6->ip6_src = *src; ip6 2111 netinet6/icmp6.c ip6->ip6_flow = 0; ip6 2112 netinet6/icmp6.c ip6->ip6_vfc &= ~IPV6_VERSION_MASK; ip6 2113 netinet6/icmp6.c ip6->ip6_vfc |= IPV6_VERSION; ip6 2114 netinet6/icmp6.c ip6->ip6_nxt = IPPROTO_ICMPV6; ip6 2117 netinet6/icmp6.c ip6->ip6_hlim = ND_IFINFO(m->m_pkthdr.rcvif)->chlim; ip6 2119 netinet6/icmp6.c ip6->ip6_hlim = ip6_defhlim; ip6 2176 netinet6/icmp6.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 2178 netinet6/icmp6.c int icmp6len = ntohs(ip6->ip6_plen); ip6 2186 netinet6/icmp6.c struct in6_addr src6 = ip6->ip6_src; ip6 2220 netinet6/icmp6.c if (ip6->ip6_hlim != 255) { ip6 2224 netinet6/icmp6.c ip6_sprintf(&src6), ip6->ip6_hlim)); ip6 2398 netinet6/icmp6.c struct ip6_hdr *ip6; /* m as struct ip6_hdr */ ip6 2480 netinet6/icmp6.c ip6 = mtod(m, struct ip6_hdr *); ip6 2481 netinet6/icmp6.c ip6->ip6_flow = 0; ip6 2482 netinet6/icmp6.c ip6->ip6_vfc &= ~IPV6_VERSION_MASK; ip6 2483 netinet6/icmp6.c ip6->ip6_vfc |= IPV6_VERSION; ip6 2485 netinet6/icmp6.c ip6->ip6_nxt = IPPROTO_ICMPV6; ip6 2486 netinet6/icmp6.c ip6->ip6_hlim = 255; ip6 2488 netinet6/icmp6.c bcopy(ifp_ll6, &ip6->ip6_src, sizeof(struct in6_addr)); ip6 2489 netinet6/icmp6.c bcopy(&sip6->ip6_src, &ip6->ip6_dst, sizeof(struct in6_addr)); ip6 2492 netinet6/icmp6.c nd_rd = (struct nd_redirect *)(ip6 + 1); ip6 2532 netinet6/icmp6.c if (len + (p - (u_char *)ip6) > maxlen) ip6 2549 netinet6/icmp6.c m->m_pkthdr.len = m->m_len = p - (u_char *)ip6; ip6 2552 netinet6/icmp6.c if (p - (u_char *)ip6 > maxlen) ip6 2564 netinet6/icmp6.c len = maxlen - (p - (u_char *)ip6); ip6 2602 netinet6/icmp6.c m->m_pkthdr.len = m->m_len = p - (u_char *)ip6; ip6 2621 netinet6/icmp6.c if (IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_src)) ip6 2622 netinet6/icmp6.c ip6->ip6_src.s6_addr16[1] = 0; ip6 2623 netinet6/icmp6.c if (IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_dst)) ip6 2624 netinet6/icmp6.c ip6->ip6_dst.s6_addr16[1] = 0; ip6 2631 netinet6/icmp6.c ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr)); ip6 2635 netinet6/icmp6.c = in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), ntohs(ip6->ip6_plen)); ip6 97 netinet6/in6_cksum.c struct ip6_hdr *ip6; ip6 126 netinet6/in6_cksum.c ip6 = mtod(m, struct ip6_hdr *); ip6 127 netinet6/in6_cksum.c w = (u_int16_t *)&ip6->ip6_src; ip6 133 netinet6/in6_cksum.c if (!IN6_IS_SCOPE_EMBED(&ip6->ip6_src)) ip6 139 netinet6/in6_cksum.c if (!IN6_IS_SCOPE_EMBED(&ip6->ip6_dst)) ip6 181 netinet6/in6_gif.c struct ip6_hdr *ip6; ip6 187 netinet6/in6_gif.c ip6 = mtod(m, struct ip6_hdr *); ip6 200 netinet6/in6_gif.c if (IN6_ARE_ADDR_EQUAL(&satoin6(sc->gif_psrc), &ip6->ip6_dst) && ip6 201 netinet6/in6_gif.c IN6_ARE_ADDR_EQUAL(&satoin6(sc->gif_pdst), &ip6->ip6_src)) { ip6 92 netinet6/ip6_forward.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 116 netinet6/ip6_forward.c IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) || ip6 117 netinet6/ip6_forward.c IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src)) { ip6 125 netinet6/ip6_forward.c ip6_sprintf(&ip6->ip6_src), ip6 126 netinet6/ip6_forward.c ip6_sprintf(&ip6->ip6_dst), ip6 127 netinet6/ip6_forward.c ip6->ip6_nxt, ip6 134 netinet6/ip6_forward.c if (ip6->ip6_hlim <= IPV6_HLIMDEC) { ip6 140 netinet6/ip6_forward.c ip6->ip6_hlim -= IPV6_HLIMDEC; ip6 251 netinet6/ip6_forward.c &ip6->ip6_src.s6_addr32[0], rtableid); ip6 266 netinet6/ip6_forward.c !IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &dst->sin6_addr)) { ip6 274 netinet6/ip6_forward.c dst->sin6_addr = ip6->ip6_dst; ip6 277 netinet6/ip6_forward.c &ip6->ip6_src.s6_addr32[0], 0); ip6 299 netinet6/ip6_forward.c if (in6_addr2scopeid(m->m_pkthdr.rcvif, &ip6->ip6_src) != ip6 300 netinet6/ip6_forward.c in6_addr2scopeid(rt->rt_ifp, &ip6->ip6_src)) { ip6 310 netinet6/ip6_forward.c ip6_sprintf(&ip6->ip6_src), ip6 311 netinet6/ip6_forward.c ip6_sprintf(&ip6->ip6_dst), ip6 312 netinet6/ip6_forward.c ip6->ip6_nxt, ip6 428 netinet6/ip6_forward.c ip6_sprintf(&ip6->ip6_src), ip6 429 netinet6/ip6_forward.c ip6_sprintf(&ip6->ip6_dst), ip6 430 netinet6/ip6_forward.c ip6->ip6_nxt, m->m_pkthdr.rcvif->if_xname, ip6 439 netinet6/ip6_forward.c if (IN6_IS_SCOPE_EMBED(&ip6->ip6_src)) ip6 440 netinet6/ip6_forward.c ip6->ip6_src.s6_addr16[1] = 0; ip6 441 netinet6/ip6_forward.c if (IN6_IS_SCOPE_EMBED(&ip6->ip6_dst)) ip6 442 netinet6/ip6_forward.c ip6->ip6_dst.s6_addr16[1] = 0; ip6 452 netinet6/ip6_forward.c ip6 = mtod(m, struct ip6_hdr *); ip6 201 netinet6/ip6_input.c struct ip6_hdr *ip6; ip6 247 netinet6/ip6_input.c ip6 = mtod(m, struct ip6_hdr *); ip6 249 netinet6/ip6_input.c if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { ip6 258 netinet6/ip6_input.c ip6->ip6_nxt != IPPROTO_ICMPV6 && ip6 259 netinet6/ip6_input.c carp_lsdrop(m, AF_INET6, ip6->ip6_src.s6_addr32, ip6 260 netinet6/ip6_input.c ip6->ip6_dst.s6_addr32)) ip6 263 netinet6/ip6_input.c ip6stat.ip6s_nxthist[ip6->ip6_nxt]++; ip6 268 netinet6/ip6_input.c if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src) || ip6 269 netinet6/ip6_input.c IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst)) { ip6 278 netinet6/ip6_input.c if (IN6_IS_ADDR_MC_INTFACELOCAL(&ip6->ip6_dst) && ip6 303 netinet6/ip6_input.c if (IN6_IS_ADDR_V4MAPPED(&ip6->ip6_src) || ip6 304 netinet6/ip6_input.c IN6_IS_ADDR_V4MAPPED(&ip6->ip6_dst)) { ip6 317 netinet6/ip6_input.c if (IN6_IS_ADDR_V4COMPAT(&ip6->ip6_src) || ip6 318 netinet6/ip6_input.c IN6_IS_ADDR_V4COMPAT(&ip6->ip6_dst)) { ip6 338 netinet6/ip6_input.c odst = ip6->ip6_dst; ip6 344 netinet6/ip6_input.c ip6 = mtod(m, struct ip6_hdr *); ip6 345 netinet6/ip6_input.c srcrt = !IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst); ip6 348 netinet6/ip6_input.c if (IN6_IS_ADDR_LOOPBACK(&ip6->ip6_src) || ip6 349 netinet6/ip6_input.c IN6_IS_ADDR_LOOPBACK(&ip6->ip6_dst)) { ip6 363 netinet6/ip6_input.c if (IN6_IS_SCOPE_EMBED(&ip6->ip6_src) && ip6 364 netinet6/ip6_input.c ip6->ip6_src.s6_addr16[1]) { ip6 368 netinet6/ip6_input.c if (IN6_IS_SCOPE_EMBED(&ip6->ip6_dst) && ip6 369 netinet6/ip6_input.c ip6->ip6_dst.s6_addr16[1]) { ip6 375 netinet6/ip6_input.c if (IN6_IS_SCOPE_EMBED(&ip6->ip6_src)) ip6 376 netinet6/ip6_input.c ip6->ip6_src.s6_addr16[1] = htons(m->m_pkthdr.rcvif->if_index); ip6 377 netinet6/ip6_input.c if (IN6_IS_SCOPE_EMBED(&ip6->ip6_dst)) ip6 378 netinet6/ip6_input.c ip6->ip6_dst.s6_addr16[1] = htons(m->m_pkthdr.rcvif->if_index); ip6 390 netinet6/ip6_input.c IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_dst)) { ip6 391 netinet6/ip6_input.c if (!in6ifa_ifpwithaddr(m->m_pkthdr.rcvif, &ip6->ip6_dst)) { ip6 406 netinet6/ip6_input.c if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { ip6 414 netinet6/ip6_input.c IN6_LOOKUP_MULTI(ip6->ip6_dst, m->m_pkthdr.rcvif, in6m); ip6 424 netinet6/ip6_input.c if (!IN6_IS_ADDR_MC_LINKLOCAL(&ip6->ip6_dst)) ip6 442 netinet6/ip6_input.c IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, ip6 457 netinet6/ip6_input.c ip6_forward_rt.ro_dst.sin6_addr = ip6->ip6_dst; ip6 461 netinet6/ip6_input.c &ip6->ip6_src.s6_addr32[0], rtableid); ip6 484 netinet6/ip6_input.c IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, ip6 505 netinet6/ip6_input.c ip6_sprintf(&ip6->ip6_src), ip6 506 netinet6/ip6_input.c ip6_sprintf(&ip6->ip6_dst))); ip6 540 netinet6/ip6_input.c if (IN6_ARE_ADDR_EQUAL(IFA_IN6(ifa), &ip6->ip6_dst)) { ip6 552 netinet6/ip6_input.c ip6->ip6_nxt == IPPROTO_ICMPV6 && ip6 553 netinet6/ip6_input.c carp_lsdrop(m, AF_INET6, ip6->ip6_src.s6_addr32, ip6 554 netinet6/ip6_input.c ip6->ip6_dst.s6_addr32)) ip6 573 netinet6/ip6_input.c plen = (u_int32_t)ntohs(ip6->ip6_plen); ip6 574 netinet6/ip6_input.c if (ip6->ip6_nxt == IPPROTO_HOPOPTS) { ip6 585 netinet6/ip6_input.c ip6 = mtod(m, struct ip6_hdr *); ip6 592 netinet6/ip6_input.c if (ip6->ip6_plen == 0 && plen == 0) { ip6 603 netinet6/ip6_input.c (caddr_t)&ip6->ip6_plen - (caddr_t)ip6); ip6 621 netinet6/ip6_input.c nxt = ip6->ip6_nxt; ip6 645 netinet6/ip6_input.c if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { ip6 656 netinet6/ip6_input.c ip6_mforward(ip6, m->m_pkthdr.rcvif, m)) { ip6 671 netinet6/ip6_input.c ip6 = mtod(m, struct ip6_hdr *); ip6 682 netinet6/ip6_input.c if (IN6_IS_ADDR_V4MAPPED(&ip6->ip6_src) || ip6 683 netinet6/ip6_input.c IN6_IS_ADDR_V4MAPPED(&ip6->ip6_dst)) { ip6 724 netinet6/ip6_input.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 727 netinet6/ip6_input.c u_int8_t proto = ip6->ip6_nxt; ip6 730 netinet6/ip6_input.c off = ((caddr_t)ip6 - m->m_data) + sizeof(struct ip6_hdr); ip6 731 netinet6/ip6_input.c lim = min(m->m_pkthdr.len, ntohs(ip6->ip6_plen) + sizeof(*ip6)); ip6 846 netinet6/ip6_input.c struct ip6_hdr *ip6; ip6 901 netinet6/ip6_input.c ip6 = mtod(m, struct ip6_hdr *); ip6 902 netinet6/ip6_input.c if (ip6->ip6_plen) { ip6 981 netinet6/ip6_input.c struct ip6_hdr *ip6; ip6 995 netinet6/ip6_input.c ip6 = mtod(m, struct ip6_hdr *); ip6 996 netinet6/ip6_input.c if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) || ip6 1028 netinet6/ip6_input.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 1045 netinet6/ip6_input.c bcopy(&ip6->ip6_dst, &pi6.ipi6_addr, sizeof(struct in6_addr)); ip6 1058 netinet6/ip6_input.c int hlim = ip6->ip6_hlim & 0xff; ip6 1069 netinet6/ip6_input.c flowinfo = (u_int32_t)ntohl(ip6->ip6_flow & IPV6_FLOWINFO_MASK); ip6 1094 netinet6/ip6_input.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 1095 netinet6/ip6_input.c if (ip6->ip6_nxt == IPPROTO_HOPOPTS) { ip6 1101 netinet6/ip6_input.c ip6->ip6_nxt); ip6 1132 netinet6/ip6_input.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 1133 netinet6/ip6_input.c int nxt = ip6->ip6_nxt, off = sizeof(struct ip6_hdr); ip6 1300 netinet6/ip6_input.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 1303 netinet6/ip6_input.c return (&ip6->ip6_nxt); ip6 1308 netinet6/ip6_input.c nxt = ip6->ip6_nxt; ip6 1343 netinet6/ip6_input.c struct ip6_hdr ip6; ip6 1355 netinet6/ip6_input.c if (m->m_pkthdr.len < off + sizeof(ip6)) ip6 1357 netinet6/ip6_input.c m_copydata(m, off, sizeof(ip6), (caddr_t)&ip6); ip6 1359 netinet6/ip6_input.c *nxtp = ip6.ip6_nxt; ip6 1360 netinet6/ip6_input.c off += sizeof(ip6); ip6 1003 netinet6/ip6_mroute.c ip6_mforward(ip6, ifp, m) ip6 1004 netinet6/ip6_mroute.c struct ip6_hdr *ip6; ip6 1018 netinet6/ip6_mroute.c ip6_sprintf(&ip6->ip6_src), ip6_sprintf(&ip6->ip6_dst), ip6 1026 netinet6/ip6_mroute.c if (ip6->ip6_hlim <= 1 || IN6_IS_ADDR_MC_INTFACELOCAL(&ip6->ip6_dst) || ip6 1027 netinet6/ip6_mroute.c IN6_IS_ADDR_MC_LINKLOCAL(&ip6->ip6_dst)) ip6 1029 netinet6/ip6_mroute.c ip6->ip6_hlim--; ip6 1038 netinet6/ip6_mroute.c if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src)) { ip6 1045 netinet6/ip6_mroute.c ip6_sprintf(&ip6->ip6_src), ip6 1046 netinet6/ip6_mroute.c ip6_sprintf(&ip6->ip6_dst), ip6 1047 netinet6/ip6_mroute.c ip6->ip6_nxt, ip6 1057 netinet6/ip6_mroute.c MF6CFIND(ip6->ip6_src, ip6->ip6_dst, rt); ip6 1084 netinet6/ip6_mroute.c ip6_sprintf(&ip6->ip6_src), ip6 1085 netinet6/ip6_mroute.c ip6_sprintf(&ip6->ip6_dst)); ip6 1113 netinet6/ip6_mroute.c hash = MF6CHASH(ip6->ip6_src, ip6->ip6_dst); ip6 1115 netinet6/ip6_mroute.c if (IN6_ARE_ADDR_EQUAL(&ip6->ip6_src, ip6 1117 netinet6/ip6_mroute.c IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, ip6 1158 netinet6/ip6_mroute.c sin6.sin6_addr = ip6->ip6_src; ip6 1224 netinet6/ip6_mroute.c rt->mf6c_origin.sin6_addr = ip6->ip6_src; ip6 1227 netinet6/ip6_mroute.c rt->mf6c_mcastgrp.sin6_addr = ip6->ip6_dst; ip6 1337 netinet6/ip6_mroute.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 1348 netinet6/ip6_mroute.c #define MC6_SEND(ip6, mifp, m) do { \ ip6 1350 netinet6/ip6_mroute.c register_send((ip6), (mifp), (m)); \ ip6 1352 netinet6/ip6_mroute.c phyint_send((ip6), (mifp), (m)); \ ip6 1489 netinet6/ip6_mroute.c (in6_addr2scopeid(ifp, &ip6->ip6_dst) != ip6 1491 netinet6/ip6_mroute.c &ip6->ip6_dst) || ip6 1492 netinet6/ip6_mroute.c in6_addr2scopeid(ifp, &ip6->ip6_src) != ip6 1494 netinet6/ip6_mroute.c &ip6->ip6_src))) { ip6 1501 netinet6/ip6_mroute.c MC6_SEND(ip6, mifp, m); ip6 1507 netinet6/ip6_mroute.c phyint_send(ip6, mifp, m) ip6 1508 netinet6/ip6_mroute.c struct ip6_hdr *ip6; ip6 1549 netinet6/ip6_mroute.c im6o.im6o_multicast_hlim = ip6->ip6_hlim; ip6 1568 netinet6/ip6_mroute.c IN6_LOOKUP_MULTI(ip6->ip6_dst, ifp, in6m); ip6 1572 netinet6/ip6_mroute.c dst6->sin6_addr = ip6->ip6_dst; ip6 1583 netinet6/ip6_mroute.c dst6->sin6_addr = ip6->ip6_dst; ip6 1605 netinet6/ip6_mroute.c ip6_sprintf(&ip6->ip6_src), ip6 1606 netinet6/ip6_mroute.c ip6_sprintf(&ip6->ip6_dst), ip6 1617 netinet6/ip6_mroute.c register_send(ip6, mif, m) ip6 1618 netinet6/ip6_mroute.c struct ip6_hdr *ip6; ip6 1630 netinet6/ip6_mroute.c ip6_sprintf(&ip6->ip6_src), ip6_sprintf(&ip6->ip6_dst)); ip6 1660 netinet6/ip6_mroute.c sin6.sin6_addr = ip6->ip6_src; ip6 1696 netinet6/ip6_mroute.c struct ip6_hdr *ip6; ip6 1704 netinet6/ip6_mroute.c ip6 = mtod(m, struct ip6_hdr *); ip6 1820 netinet6/ip6_mroute.c pimlen, ip6_sprintf(&ip6->ip6_src)); ip6 156 netinet6/ip6_output.c struct ip6_hdr *ip6, *mhip6; ip6 187 netinet6/ip6_output.c ip6 = mtod(m, struct ip6_hdr *); ip6 188 netinet6/ip6_output.c finaldst = ip6->ip6_dst; ip6 228 netinet6/ip6_output.c ip6 = mtod(m, struct ip6_hdr *); ip6 325 netinet6/ip6_output.c ip6 = mtod(m, struct ip6_hdr *); ip6 329 netinet6/ip6_output.c plen = m->m_pkthdr.len - sizeof(*ip6); ip6 342 netinet6/ip6_output.c ip6 = mtod(m, struct ip6_hdr *); ip6 345 netinet6/ip6_output.c ip6->ip6_plen = 0; ip6 347 netinet6/ip6_output.c ip6->ip6_plen = htons(plen); ip6 360 netinet6/ip6_output.c u_char *nexthdrp = &ip6->ip6_nxt; ip6 376 netinet6/ip6_output.c *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt; ip6 377 netinet6/ip6_output.c ip6->ip6_nxt = IPPROTO_DSTOPTS; ip6 420 netinet6/ip6_output.c ip6->ip6_dst = addr[0]; ip6 433 netinet6/ip6_output.c IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src)) { ip6 442 netinet6/ip6_output.c if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src)) { ip6 471 netinet6/ip6_output.c if ((ip6->ip6_flow & htonl(0xfc << 20)) == 0) ip6 473 netinet6/ip6_output.c if ((ip6->ip6_flow & htonl(0x03 << 20)) == 0) ip6 476 netinet6/ip6_output.c ip6->ip6_flow |= htonl((opt->ip6po_tclass & mask) << 20); ip6 481 netinet6/ip6_output.c ip6->ip6_hlim = opt->ip6po_hlim & 0xff; ip6 482 netinet6/ip6_output.c else if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { ip6 484 netinet6/ip6_output.c ip6->ip6_hlim = im6o->im6o_multicast_hlim; ip6 486 netinet6/ip6_output.c ip6->ip6_hlim = ip6_defmcasthlim; ip6 532 netinet6/ip6_output.c dstsock.sin6_addr = ip6->ip6_dst; ip6 579 netinet6/ip6_output.c if (rt && !IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { ip6 591 netinet6/ip6_output.c if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { ip6 612 netinet6/ip6_output.c IN6_LOOKUP_MULTI(ip6->ip6_dst, ifp, in6m); ip6 637 netinet6/ip6_output.c if (ip6_mforward(ip6, ifp, m) != 0) { ip6 652 netinet6/ip6_output.c if (ip6->ip6_hlim == 0 || (ifp->if_flags & IFF_LOOPBACK) || ip6 653 netinet6/ip6_output.c IN6_IS_ADDR_MC_INTFACELOCAL(&ip6->ip6_dst)) { ip6 688 netinet6/ip6_output.c else if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) && ip6 713 netinet6/ip6_output.c if (IN6_IS_SCOPE_EMBED(&ip6->ip6_src)) ip6 714 netinet6/ip6_output.c origifp = ifindex2ifnet[ntohs(ip6->ip6_src.s6_addr16[1])]; ip6 715 netinet6/ip6_output.c else if (IN6_IS_SCOPE_EMBED(&ip6->ip6_dst)) ip6 716 netinet6/ip6_output.c origifp = ifindex2ifnet[ntohs(ip6->ip6_dst.s6_addr16[1])]; ip6 733 netinet6/ip6_output.c if (IN6_IS_SCOPE_EMBED(&ip6->ip6_src)) ip6 734 netinet6/ip6_output.c ip6->ip6_src.s6_addr16[1] = 0; ip6 735 netinet6/ip6_output.c if (IN6_IS_SCOPE_EMBED(&ip6->ip6_dst)) ip6 736 netinet6/ip6_output.c ip6->ip6_dst.s6_addr16[1] = 0; ip6 775 netinet6/ip6_output.c ip6 = mtod(m, struct ip6_hdr *); ip6 848 netinet6/ip6_output.c } else if (ip6->ip6_plen == 0) { ip6 904 netinet6/ip6_output.c nextproto = ip6->ip6_nxt; ip6 905 netinet6/ip6_output.c ip6->ip6_nxt = IPPROTO_FRAGMENT; ip6 929 netinet6/ip6_output.c *mhip6 = *ip6; ip6 3133 netinet6/ip6_output.c struct ip6_hdr *ip6; ip6 3155 netinet6/ip6_output.c if (copym->m_len < sizeof(*ip6)) { ip6 3161 netinet6/ip6_output.c ip6 = mtod(copym, struct ip6_hdr *); ip6 3162 netinet6/ip6_output.c if (IN6_IS_SCOPE_EMBED(&ip6->ip6_src)) ip6 3163 netinet6/ip6_output.c ip6->ip6_src.s6_addr16[1] = 0; ip6 3164 netinet6/ip6_output.c if (IN6_IS_SCOPE_EMBED(&ip6->ip6_dst)) ip6 3165 netinet6/ip6_output.c ip6->ip6_dst.s6_addr16[1] = 0; ip6 3179 netinet6/ip6_output.c struct ip6_hdr *ip6; ip6 3181 netinet6/ip6_output.c ip6 = mtod(m, struct ip6_hdr *); ip6 3182 netinet6/ip6_output.c if (m->m_len > sizeof(*ip6)) { ip6 3189 netinet6/ip6_output.c MH_ALIGN(mh, sizeof(*ip6)); ip6 3190 netinet6/ip6_output.c m->m_len -= sizeof(*ip6); ip6 3191 netinet6/ip6_output.c m->m_data += sizeof(*ip6); ip6 3194 netinet6/ip6_output.c m->m_len = sizeof(*ip6); ip6 3195 netinet6/ip6_output.c bcopy((caddr_t)ip6, mtod(m, caddr_t), sizeof(*ip6)); ip6 178 netinet6/mld6.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 192 netinet6/mld6.c ip6 = mtod(m, struct ip6_hdr *);/* in case mpullup */ ip6 193 netinet6/mld6.c if (!IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_src)) { ip6 197 netinet6/mld6.c ip6_sprintf(&ip6->ip6_src), ip6 373 netinet6/mld6.c struct ip6_hdr *ip6; ip6 412 netinet6/mld6.c ip6 = mtod(mh, struct ip6_hdr *); ip6 413 netinet6/mld6.c ip6->ip6_flow = 0; ip6 414 netinet6/mld6.c ip6->ip6_vfc &= ~IPV6_VERSION_MASK; ip6 415 netinet6/mld6.c ip6->ip6_vfc |= IPV6_VERSION; ip6 417 netinet6/mld6.c ip6->ip6_nxt = IPPROTO_ICMPV6; ip6 419 netinet6/mld6.c ip6->ip6_src = ia ? ia->ia_addr.sin6_addr : in6addr_any; ip6 420 netinet6/mld6.c ip6->ip6_dst = dst ? *dst : in6m->in6m_addr; ip6 93 netinet6/nd6_nbr.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 95 netinet6/nd6_nbr.c struct in6_addr saddr6 = ip6->ip6_src; ip6 96 netinet6/nd6_nbr.c struct in6_addr daddr6 = ip6->ip6_dst; ip6 113 netinet6/nd6_nbr.c ip6 = mtod(m, struct ip6_hdr *); /* adjust pointer for safety */ ip6 116 netinet6/nd6_nbr.c if (ip6->ip6_hlim != 255) { ip6 119 netinet6/nd6_nbr.c ip6->ip6_hlim, ip6_sprintf(&ip6->ip6_src), ip6 120 netinet6/nd6_nbr.c ip6_sprintf(&ip6->ip6_dst), ifp->if_xname)); ip6 161 netinet6/nd6_nbr.c if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && lladdr) { ip6 340 netinet6/nd6_nbr.c struct ip6_hdr *ip6; ip6 355 netinet6/nd6_nbr.c maxlen = sizeof(*ip6) + sizeof(*nd_ns); ip6 386 netinet6/nd6_nbr.c m->m_pkthdr.len = m->m_len = sizeof(*ip6) + icmp6len; ip6 390 netinet6/nd6_nbr.c ip6 = mtod(m, struct ip6_hdr *); ip6 391 netinet6/nd6_nbr.c ip6->ip6_flow = 0; ip6 392 netinet6/nd6_nbr.c ip6->ip6_vfc &= ~IPV6_VERSION_MASK; ip6 393 netinet6/nd6_nbr.c ip6->ip6_vfc |= IPV6_VERSION; ip6 395 netinet6/nd6_nbr.c ip6->ip6_nxt = IPPROTO_ICMPV6; ip6 396 netinet6/nd6_nbr.c ip6->ip6_hlim = 255; ip6 412 netinet6/nd6_nbr.c ip6->ip6_dst = dst_sa.sin6_addr; ip6 469 netinet6/nd6_nbr.c ip6->ip6_src = src_sa.sin6_addr; ip6 470 netinet6/nd6_nbr.c nd_ns = (struct nd_neighbor_solicit *)(ip6 + 1); ip6 506 netinet6/nd6_nbr.c ip6->ip6_plen = htons((u_short)icmp6len); ip6 509 netinet6/nd6_nbr.c in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), icmp6len); ip6 545 netinet6/nd6_nbr.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 548 netinet6/nd6_nbr.c struct in6_addr saddr6 = ip6->ip6_src; ip6 550 netinet6/nd6_nbr.c struct in6_addr daddr6 = ip6->ip6_dst; ip6 564 netinet6/nd6_nbr.c if (ip6->ip6_hlim != 255) { ip6 567 netinet6/nd6_nbr.c ip6->ip6_hlim, ip6_sprintf(&ip6->ip6_src), ip6 568 netinet6/nd6_nbr.c ip6_sprintf(&ip6->ip6_dst), ifp->if_xname)); ip6 795 netinet6/nd6_nbr.c rt6_flush(&ip6->ip6_src, rt->rt_ifp); ip6 840 netinet6/nd6_nbr.c struct ip6_hdr *ip6; ip6 853 netinet6/nd6_nbr.c maxlen = sizeof(*ip6) + sizeof(*nd_na); ip6 888 netinet6/nd6_nbr.c ip6 = mtod(m, struct ip6_hdr *); ip6 889 netinet6/nd6_nbr.c ip6->ip6_flow = 0; ip6 890 netinet6/nd6_nbr.c ip6->ip6_vfc &= ~IPV6_VERSION_MASK; ip6 891 netinet6/nd6_nbr.c ip6->ip6_vfc |= IPV6_VERSION; ip6 892 netinet6/nd6_nbr.c ip6->ip6_nxt = IPPROTO_ICMPV6; ip6 893 netinet6/nd6_nbr.c ip6->ip6_hlim = 255; ip6 909 netinet6/nd6_nbr.c ip6->ip6_dst = dst_sa.sin6_addr; ip6 923 netinet6/nd6_nbr.c ip6->ip6_src = src_sa.sin6_addr; ip6 924 netinet6/nd6_nbr.c nd_na = (struct nd_neighbor_advert *)(ip6 + 1); ip6 969 netinet6/nd6_nbr.c ip6->ip6_plen = htons((u_short)icmp6len); ip6 96 netinet6/nd6_rtr.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 98 netinet6/nd6_rtr.c struct in6_addr saddr6 = ip6->ip6_src; ip6 100 netinet6/nd6_rtr.c struct in6_addr daddr6 = ip6->ip6_dst; ip6 117 netinet6/nd6_rtr.c if (ip6->ip6_hlim != 255) { ip6 120 netinet6/nd6_rtr.c ip6->ip6_hlim, ip6_sprintf(&ip6->ip6_src), ip6 121 netinet6/nd6_rtr.c ip6_sprintf(&ip6->ip6_dst), ifp->if_xname)); ip6 185 netinet6/nd6_rtr.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 187 netinet6/nd6_rtr.c struct in6_addr saddr6 = ip6->ip6_src; ip6 189 netinet6/nd6_rtr.c struct in6_addr daddr6 = ip6->ip6_dst; ip6 207 netinet6/nd6_rtr.c if (ip6->ip6_hlim != 255) { ip6 210 netinet6/nd6_rtr.c ip6->ip6_hlim, ip6_sprintf(&ip6->ip6_src), ip6 211 netinet6/nd6_rtr.c ip6_sprintf(&ip6->ip6_dst), ifp->if_xname)); ip6 351 netinet6/nd6_rtr.c mtu, ip6_sprintf(&ip6->ip6_src))); ip6 368 netinet6/nd6_rtr.c mtu, ip6_sprintf(&ip6->ip6_src), maxmtu)); ip6 149 netinet6/raw_ip6.c struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); ip6 168 netinet6/raw_ip6.c if (IN6_IS_ADDR_V4MAPPED(&ip6->ip6_src) || ip6 169 netinet6/raw_ip6.c IN6_IS_ADDR_V4MAPPED(&ip6->ip6_dst)) { ip6 179 netinet6/raw_ip6.c (void)in6_recoverscope(&rip6src, &ip6->ip6_src, m->m_pkthdr.rcvif); ip6 188 netinet6/raw_ip6.c !IN6_ARE_ADDR_EQUAL(&in6p->in6p_laddr, &ip6->ip6_dst)) ip6 191 netinet6/raw_ip6.c !IN6_ARE_ADDR_EQUAL(&in6p->in6p_faddr, &ip6->ip6_src)) ip6 259 netinet6/raw_ip6.c struct ip6_hdr *ip6; ip6 287 netinet6/raw_ip6.c ip6 = ip6cp->ip6c_ip6; ip6 294 netinet6/raw_ip6.c ip6 = NULL; ip6 300 netinet6/raw_ip6.c if (ip6 && cmd == PRC_MSGSIZE) { ip6 367 netinet6/raw_ip6.c struct ip6_hdr *ip6; ip6 415 netinet6/raw_ip6.c M_PREPEND(m, sizeof(*ip6), M_DONTWAIT); ip6 420 netinet6/raw_ip6.c ip6 = mtod(m, struct ip6_hdr *); ip6 425 netinet6/raw_ip6.c ip6->ip6_dst = *dst; ip6 430 netinet6/raw_ip6.c if (in6_embedscope(&ip6->ip6_dst, dstsock, in6p, &oifp) != 0) { ip6 448 netinet6/raw_ip6.c ip6->ip6_src = *in6a; ip6 455 netinet6/raw_ip6.c ip6->ip6_flow = in6p->in6p_flowinfo & IPV6_FLOWINFO_MASK; ip6 456 netinet6/raw_ip6.c ip6->ip6_vfc &= ~IPV6_VERSION_MASK; ip6 457 netinet6/raw_ip6.c ip6->ip6_vfc |= IPV6_VERSION; ip6 459 netinet6/raw_ip6.c ip6->ip6_plen = htons((u_short)plen); ip6 461 netinet6/raw_ip6.c ip6->ip6_nxt = in6p->in6p_ip6.ip6_nxt; ip6 462 netinet6/raw_ip6.c ip6->ip6_hlim = in6_selecthlim(in6p, oifp); ip6 490 netinet6/raw_ip6.c *sump = in6_cksum(m, ip6->ip6_nxt, sizeof(*ip6), plen); ip6 56 netinet6/route6.c struct ip6_hdr *ip6; ip6 61 netinet6/route6.c ip6 = mtod(m, struct ip6_hdr *); ip6 102 netinet6/route6.c if (ip6_rthdr0(m, ip6, (struct ip6_rthdr0 *)rh)) ip6 114 netinet6/route6.c (caddr_t)&rh->ip6r_type - (caddr_t)ip6); ip6 130 netinet6/route6.c ip6_rthdr0(m, ip6, rh0) ip6 132 netinet6/route6.c struct ip6_hdr *ip6; ip6 149 netinet6/route6.c (caddr_t)&rh0->ip6r0_len - (caddr_t)ip6); ip6 156 netinet6/route6.c (caddr_t)&rh0->ip6r0_segleft - (caddr_t)ip6); ip6 176 netinet6/route6.c if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) || ip6 177 netinet6/route6.c IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst) || ip6 178 netinet6/route6.c IN6_IS_ADDR_V4MAPPED(&ip6->ip6_dst) || ip6 179 netinet6/route6.c IN6_IS_ADDR_V4COMPAT(&ip6->ip6_dst)) { ip6 188 netinet6/route6.c *nextaddr = ip6->ip6_dst; ip6 191 netinet6/route6.c ip6->ip6_dst = tmpaddr; ip6 192 netinet6/route6.c if (IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_dst)) ip6 193 netinet6/route6.c ip6->ip6_dst.s6_addr16[1] = htons(m->m_pkthdr.rcvif->if_index); ip6 122 netinet6/udp6_output.c struct ip6_hdr *ip6; ip6 246 netinet6/udp6_output.c ip6 = mtod(m, struct ip6_hdr *); ip6 247 netinet6/udp6_output.c ip6->ip6_flow = in6p->in6p_flowinfo & IPV6_FLOWINFO_MASK; ip6 248 netinet6/udp6_output.c ip6->ip6_vfc &= ~IPV6_VERSION_MASK; ip6 249 netinet6/udp6_output.c ip6->ip6_vfc |= IPV6_VERSION; ip6 251 netinet6/udp6_output.c ip6->ip6_plen = htons((u_short)plen); ip6 253 netinet6/udp6_output.c ip6->ip6_nxt = IPPROTO_UDP; ip6 254 netinet6/udp6_output.c ip6->ip6_hlim = in6_selecthlim(in6p, ip6 257 netinet6/udp6_output.c ip6->ip6_src = *laddr; ip6 258 netinet6/udp6_output.c ip6->ip6_dst = *faddr;