Lines Matching defs:ip6
100 #include <netinet/ip6.h>
238 struct ip6_hdr *ip6;
250 ip6 = mtod(m, struct ip6_hdr *);
252 if (in6_setscope(&ip6->ip6_src, ifp, NULL) != 0)
254 if (in6_setscope(&ip6->ip6_dst, ifp, NULL) != 0)
451 struct ip6_hdr *ip6, *nip6;
481 ip6 = mtod(m, struct ip6_hdr *);
487 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
490 inm = in6m_lookup(ifp, &ip6->ip6_dst);
499 icmp6 = (struct icmp6_hdr *)((caddr_t)ip6 + off);
505 ip6_sprintf(ip6bufs, &ip6->ip6_src)));
515 ip6len = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen);
561 if (icmp6_ratelimit(&ip6->ip6_src, ICMP6_ECHO_REPLY, 0))
586 bcopy(ip6, nip6, sizeof(struct ip6_hdr));
639 if ((ip6->ip6_hlim != 1) || (m->m_flags & M_RTALERT_MLD) == 0)
724 bcopy(ip6, nip6, sizeof(struct ip6_hdr));
877 icmp6->icmp6_type, ip6_sprintf(ip6bufs, &ip6->ip6_src),
878 ip6_sprintf(ip6bufd, &ip6->ip6_dst),
1212 struct ip6_hdr *ip6;
1217 ip6 = mtod(m, struct ip6_hdr *);
1234 !IN6_IS_ADDR_LOOPBACK(&ip6->ip6_src) &&
1235 !IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_src))
1246 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
1247 if (!IN6_IS_ADDR_MC_LINKLOCAL(&ip6->ip6_dst))
1251 ia6 = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */, false);
1319 if (IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &in6_subj))
1360 /* ip6 possibly invalid but not used after. */
1908 struct ip6_hdr *ip6 = v;
1915 !IN6_ARE_ADDR_EQUAL(&inp->in6p_laddr, &ip6->ip6_dst))
1918 !IN6_ARE_ADDR_EQUAL(&inp->in6p_faddr, &ip6->ip6_src))
1930 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
1932 INPLOOKUP_RLOCKPCB, icmp6_rip6_match, ip6);
1940 icmp6 = (struct icmp6_hdr *)((caddr_t)ip6 + off);
1949 fromsa.sin6_addr = ip6->ip6_src;
2018 * Reflect the ip6 packet back to the source.
2025 struct ip6_hdr *ip6;
2035 "sanity fail: off=%lx, sizeof(ip6)=%lx in %s:%d\n",
2071 ip6 = mtod(m, struct ip6_hdr *);
2072 ip6->ip6_nxt = IPPROTO_ICMPV6;
2073 icmp6 = (struct icmp6_hdr *)(ip6 + 1);
2086 if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
2087 ia = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */, false);
2111 in6_splitscope(&ip6->ip6_src, &dst6, &scopeid);
2120 ip6_sprintf(ip6buf, &ip6->ip6_dst), error));
2129 ip6->ip6_dst = ip6->ip6_src;
2130 ip6->ip6_src = *srcp;
2131 ip6->ip6_flow = 0;
2132 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
2133 ip6->ip6_vfc |= IPV6_VERSION;
2134 ip6->ip6_nxt = IPPROTO_ICMPV6;
2135 ip6->ip6_hlim = hlim;
2176 struct ip6_hdr *ip6;
2197 ip6 = mtod(m, struct ip6_hdr *);
2198 icmp6len = ntohs(ip6->ip6_plen);
2206 ip6 = mtod(m, struct ip6_hdr *);
2207 nd_rd = (struct nd_redirect *)((caddr_t)ip6 + off);
2219 src6 = ip6->ip6_src;
2227 if (__predict_false(ip6->ip6_hlim != 255)) {
2232 ip6_sprintf(ip6buf, &src6), ip6->ip6_hlim));
2236 /* ip6->ip6_src must be equal to gw for icmp6->icmp6_reddst */
2382 struct ip6_hdr *ip6; /* m as struct ip6_hdr */
2441 /* get ip6 linklocal address for ifp(my outgoing interface). */
2452 /* get ip6 linklocal address for the router. */
2462 /* ip6 */
2463 ip6 = mtod(m, struct ip6_hdr *);
2464 ip6->ip6_flow = 0;
2465 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
2466 ip6->ip6_vfc |= IPV6_VERSION;
2467 /* ip6->ip6_plen will be set later */
2468 ip6->ip6_nxt = IPPROTO_ICMPV6;
2469 ip6->ip6_hlim = 255;
2470 /* ip6->ip6_src must be linklocal addr for my outgoing if. */
2471 bcopy(ifp_ll6, &ip6->ip6_src, sizeof(struct in6_addr));
2472 bcopy(&sip6->ip6_src, &ip6->ip6_dst, sizeof(struct in6_addr));
2475 nd_rd = (struct nd_redirect *)(ip6 + 1);
2516 if (len + (p - (u_char *)ip6) > maxlen)
2532 m->m_pkthdr.len = m->m_len = p - (u_char *)ip6;
2539 if (p - (u_char *)ip6 > maxlen)
2551 len = maxlen - (p - (u_char *)ip6);
2570 * original ip6 header)
2609 m->m_pkthdr.len = m->m_len = p - (u_char *)ip6;
2630 ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr));
2634 sizeof(*ip6), ntohs(ip6->ip6_plen));