Lines Matching defs:ip6

68 #include <netinet/ip6.h>
104 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
106 struct in6_addr saddr6 = ip6->ip6_src;
107 struct in6_addr daddr6 = ip6->ip6_dst;
133 ip6 = mtod(m, struct ip6_hdr *); /* adjust pointer for safety */
138 if (ip6->ip6_hlim != 255) {
140 ip6->ip6_hlim, IN6_PRINT(ip6buf, &ip6->ip6_src),
141 IN6_PRINT(ip6buf2, &ip6->ip6_dst), if_name(ifp));
154 nd6log(LOG_INFO, "bad DAD packet (wrong ip6 dst)\n");
190 if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && lladdr) {
409 struct ip6_hdr *ip6;
425 maxlen = sizeof(*ip6) + sizeof(*nd_ns);
451 m->m_pkthdr.len = m->m_len = sizeof(*ip6) + icmp6len;
455 ip6 = mtod(m, struct ip6_hdr *);
456 ip6->ip6_flow = 0;
457 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
458 ip6->ip6_vfc |= IPV6_VERSION;
459 /* ip6->ip6_plen will be set later */
460 ip6->ip6_nxt = IPPROTO_ICMPV6;
461 ip6->ip6_hlim = 255;
463 ip6->ip6_dst = *daddr6;
465 ip6->ip6_dst.s6_addr16[0] = IPV6_ADDR_INT16_MLL;
466 ip6->ip6_dst.s6_addr16[1] = 0;
467 ip6->ip6_dst.s6_addr32[1] = 0;
468 ip6->ip6_dst.s6_addr32[2] = IPV6_ADDR_INT32_ONE;
469 ip6->ip6_dst.s6_addr32[3] = taddr6->s6_addr32[3];
470 ip6->ip6_dst.s6_addr8[12] = 0xff;
471 if (in6_setscope(&ip6->ip6_dst, ifp, NULL) != 0)
501 sockaddr_in6_init(&dst_sa, &ip6->ip6_dst, 0, 0, 0);
526 ip6->ip6_src = *src;
527 nd_ns = (struct nd_neighbor_solicit *)(ip6 + 1);
578 ip6->ip6_plen = htons((u_int16_t)icmp6len);
581 in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), icmp6len);
612 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
614 struct in6_addr saddr6 = ip6->ip6_src;
615 struct in6_addr daddr6 = ip6->ip6_dst;
636 if (ip6->ip6_hlim != 255) {
639 ip6->ip6_hlim, IN6_PRINT(ip6buf, &ip6->ip6_src),
640 IN6_PRINT(ip6buf2, &ip6->ip6_dst), if_name(ifp));
905 struct ip6_hdr *ip6;
924 maxlen = sizeof(*ip6) + sizeof(*nd_na);
954 ip6 = mtod(m, struct ip6_hdr *);
955 ip6->ip6_flow = 0;
956 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
957 ip6->ip6_vfc |= IPV6_VERSION;
958 ip6->ip6_nxt = IPPROTO_ICMPV6;
959 ip6->ip6_hlim = 255;
972 ip6->ip6_dst = daddr6;
982 &ip6->ip6_src);
990 nd_na = (struct nd_neighbor_advert *)(ip6 + 1);
1034 ip6->ip6_plen = htons((u_int16_t)icmp6len);