Lines Matching refs:ip6

73 #include <netinet/ip6.h>
122 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
124 struct in6_addr saddr6 = ip6->ip6_src;
125 struct in6_addr daddr6 = ip6->ip6_dst;
147 nd_ns = (struct nd_neighbor_solicit *)((caddr_t)ip6 + off);
155 ip6 = mtod(m, struct ip6_hdr *); /* adjust pointer for safety */
160 if (ip6->ip6_hlim != 255) {
163 ip6->ip6_hlim, ip6_sprintf(ip6bufs, &ip6->ip6_src),
164 ip6_sprintf(ip6bufd, &ip6->ip6_dst), if_name(ifp)));
178 "(wrong ip6 dst)\n"));
220 if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && lladdr) {
406 struct ip6_hdr *ip6;
417 maxlen = sizeof(*ip6) + sizeof(*nd_ns);
439 m->m_pkthdr.len = m->m_len = sizeof(*ip6) + icmp6len;
443 ip6 = mtod(m, struct ip6_hdr *);
444 ip6->ip6_flow = 0;
445 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
446 ip6->ip6_vfc |= IPV6_VERSION;
447 /* ip6->ip6_plen will be set later */
448 ip6->ip6_nxt = IPPROTO_ICMPV6;
449 ip6->ip6_hlim = 255;
451 ip6->ip6_dst = *daddr6;
453 ip6->ip6_dst.s6_addr16[0] = IPV6_ADDR_INT16_MLL;
454 ip6->ip6_dst.s6_addr16[1] = 0;
455 ip6->ip6_dst.s6_addr32[1] = 0;
456 ip6->ip6_dst.s6_addr32[2] = IPV6_ADDR_INT32_ONE;
457 ip6->ip6_dst.s6_addr32[3] = taddr6->s6_addr32[3];
458 ip6->ip6_dst.s6_addr8[12] = 0xff;
459 if (in6_setscope(&ip6->ip6_dst, ifp, NULL) != 0)
483 ip6->ip6_src = *saddr6;
490 in6_splitscope(&ip6->ip6_dst, &dst6, &scopeid);
501 ip6->ip6_src = src6;
511 bzero(&ip6->ip6_src, sizeof(ip6->ip6_src));
513 nd_ns = (struct nd_neighbor_solicit *)(ip6 + 1);
550 * net.inet6.ip6.dad_enhanced=0 disables this.
566 ip6->ip6_plen = htons((u_short)icmp6len);
569 in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), icmp6len);
615 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
617 struct in6_addr daddr6 = ip6->ip6_dst;
640 if (ip6->ip6_hlim != 255) {
643 ip6->ip6_hlim, ip6_sprintf(ip6bufs, &ip6->ip6_src),
644 ip6_sprintf(ip6bufd, &ip6->ip6_dst), if_name(ifp)));
650 nd_na = (struct nd_neighbor_advert *)((caddr_t)ip6 + off);
885 rt6_flush(&ip6->ip6_src, ifp);
936 struct ip6_hdr *ip6;
948 maxlen = sizeof(*ip6) + sizeof(*nd_na);
974 ip6 = mtod(m, struct ip6_hdr *);
975 ip6->ip6_flow = 0;
976 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
977 ip6->ip6_vfc |= IPV6_VERSION;
978 ip6->ip6_nxt = IPPROTO_ICMPV6;
979 ip6->ip6_hlim = 255;
992 ip6->ip6_dst = daddr6;
1007 ip6->ip6_src = src6;
1008 nd_na = (struct nd_neighbor_advert *)(ip6 + 1);
1055 ip6->ip6_plen = htons((u_short)icmp6len);