Lines Matching refs:ip6

88 #include <netinet/ip6.h>
256 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
258 struct in6_addr saddr6 = ip6->ip6_src;
259 struct in6_addr daddr6 = ip6->ip6_dst;
281 nd_ns = (struct nd_neighbor_solicit *)((caddr_t)ip6 + off);
289 ip6 = mtod(m, struct ip6_hdr *); /* adjust pointer for safety */
294 if (ip6->ip6_hlim != IPV6_MAXHLIM) {
297 ip6->ip6_hlim, ip6_sprintf(&ip6->ip6_src),
298 ip6_sprintf(&ip6->ip6_dst), if_name(ifp)));
312 "(wrong ip6 dst)\n"));
354 if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && lladdr) {
557 struct ip6_hdr *ip6;
581 maxlen = sizeof(*ip6) + sizeof(*nd_ns);
618 m->m_pkthdr.len = m->m_len = sizeof(*ip6) + icmp6len;
622 ip6 = mtod(m, struct ip6_hdr *);
623 ip6->ip6_flow = 0;
624 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
625 ip6->ip6_vfc |= IPV6_VERSION;
626 /* ip6->ip6_plen will be set later */
627 ip6->ip6_nxt = IPPROTO_ICMPV6;
628 ip6->ip6_hlim = IPV6_MAXHLIM;
630 ip6->ip6_dst = *daddr6;
632 ip6->ip6_dst.s6_addr16[0] = IPV6_ADDR_INT16_MLL;
633 ip6->ip6_dst.s6_addr16[1] = 0;
634 ip6->ip6_dst.s6_addr32[1] = 0;
635 ip6->ip6_dst.s6_addr32[2] = IPV6_ADDR_INT32_ONE;
636 ip6->ip6_dst.s6_addr32[3] = taddr6->s6_addr32[3];
637 ip6->ip6_dst.s6_addr8[12] = 0xff;
638 if (in6_setscope(&ip6->ip6_dst, ifp, NULL) != 0)
657 struct ip6_hdr *hip6; /* hold ip6 */
698 dst_sa.sin6_addr = ip6->ip6_dst;
733 ip6->ip6_src = *src;
734 nd_ns = (struct nd_neighbor_solicit *)(ip6 + 1);
768 ip6->ip6_plen = htons((u_short)icmp6len);
771 = in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), icmp6len);
844 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
846 struct in6_addr saddr6 = ip6->ip6_src;
847 struct in6_addr daddr6 = ip6->ip6_dst;
870 if (ip6->ip6_hlim != IPV6_MAXHLIM) {
873 ip6->ip6_hlim, ip6_sprintf(&ip6->ip6_src),
874 ip6_sprintf(&ip6->ip6_dst), if_name(ifp)));
880 nd_na = (struct nd_neighbor_advert *)((caddr_t)ip6 + off);
1193 rt6_flush(&ip6->ip6_src, rt_ifp);
1271 struct ip6_hdr *ip6;
1292 maxlen = sizeof(*ip6) + sizeof(*nd_na);
1333 ip6 = mtod(m, struct ip6_hdr *);
1334 ip6->ip6_flow = 0;
1335 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
1336 ip6->ip6_vfc |= IPV6_VERSION;
1337 ip6->ip6_nxt = IPPROTO_ICMPV6;
1338 ip6->ip6_hlim = IPV6_MAXHLIM;
1351 ip6->ip6_dst = daddr6;
1370 ip6->ip6_src = *src;
1383 nd_na = (struct nd_neighbor_advert *)(ip6 + 1);
1427 ip6->ip6_plen = htons((u_short)icmp6len);