Lines Matching defs:ip6
88 #include <netinet/ip6.h>
393 struct ip6_hdr *ip6, *nip6;
405 ip6 = mtod(m, struct ip6_hdr *);
425 inet_ntop(AF_INET6, &ip6->ip6_src, src, sizeof(src))));
459 carp_lsdrop(ifp, m, AF_INET6, ip6->ip6_src.s6_addr32,
460 ip6->ip6_dst.s6_addr32, 1)) {
583 bcopy(ip6, nip6, sizeof(struct ip6_hdr));
729 inet_ntop(AF_INET6, &ip6->ip6_src, src, sizeof(src)),
730 inet_ntop(AF_INET6, &ip6->ip6_dst, dst, sizeof(dst)),
1045 * Reflect the ip6 packet back to the source.
1053 struct ip6_hdr *ip6;
1065 "sanity fail: off=%lx, sizeof(ip6)=%lx in %s:%d\n",
1106 ip6 = mtod(m, struct ip6_hdr *);
1107 ip6->ip6_nxt = IPPROTO_ICMPV6;
1108 icmp6 = (struct icmp6_hdr *)(ip6 + 1);
1110 t = ip6->ip6_dst;
1115 ip6->ip6_dst = ip6->ip6_src;
1126 sa6_src.sin6_addr = ip6->ip6_dst;
1178 ip6->ip6_src = *src;
1181 ip6->ip6_flow = 0;
1182 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
1183 ip6->ip6_vfc |= IPV6_VERSION;
1184 ip6->ip6_nxt = IPPROTO_ICMPV6;
1185 ip6->ip6_hlim = ip6_defhlim;
1228 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
1230 int icmp6len = ntohs(ip6->ip6_plen);
1237 struct in6_addr src6 = ip6->ip6_src;
1275 if (ip6->ip6_hlim != 255) {
1280 ip6->ip6_hlim));
1291 /* ip6->ip6_src must be equal to gw for icmp6->icmp6_reddst */
1440 struct ip6_hdr *ip6; /* m as struct ip6_hdr */
1507 /* get ip6 linklocal address for ifp(my outgoing interface). */
1515 /* get ip6 linklocal address for the router. */
1525 /* ip6 */
1526 ip6 = mtod(m, struct ip6_hdr *);
1527 ip6->ip6_flow = 0;
1528 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
1529 ip6->ip6_vfc |= IPV6_VERSION;
1530 /* ip6->ip6_plen will be set later */
1531 ip6->ip6_nxt = IPPROTO_ICMPV6;
1532 ip6->ip6_hlim = 255;
1533 /* ip6->ip6_src must be linklocal addr for my outgoing if. */
1534 bcopy(ifp_ll6, &ip6->ip6_src, sizeof(struct in6_addr));
1535 bcopy(&sip6->ip6_src, &ip6->ip6_dst, sizeof(struct in6_addr));
1538 nd_rd = (struct nd_redirect *)(ip6 + 1);
1575 if (len + (p - (u_char *)ip6) > maxlen)
1594 m->m_pkthdr.len = m->m_len = p - (u_char *)ip6;
1597 if (p - (u_char *)ip6 > maxlen)
1609 len = maxlen - (p - (u_char *)ip6);
1619 * original ip6 header)
1647 m->m_pkthdr.len = m->m_len = p - (u_char *)ip6;
1664 if (IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_src))
1665 ip6->ip6_src.s6_addr16[1] = 0;
1666 if (IN6_IS_ADDR_LINKLOCAL(&ip6->ip6_dst))
1667 ip6->ip6_dst.s6_addr16[1] = 0;
1674 ip6->ip6_plen = htons(m->m_pkthdr.len - sizeof(struct ip6_hdr));