Home | History | Annotate | Download | only in netinet6

Lines Matching refs: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) {
294 nd6log(LOG_INFO, "duplicate IP6 address %s\n",
394 * - ICMP6 header source IP6 address
395 * - ND6 header target IP6 address
408 struct ip6_hdr *ip6;
424 maxlen = sizeof(*ip6) + sizeof(*nd_ns);
450 m->m_pkthdr.len = m->m_len = sizeof(*ip6) + icmp6len;
454 ip6 = mtod(m, struct ip6_hdr *);
455 ip6->ip6_flow = 0;
456 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
457 ip6->ip6_vfc |= IPV6_VERSION;
458 /* ip6->ip6_plen will be set later */
459 ip6->ip6_nxt = IPPROTO_ICMPV6;
460 ip6->ip6_hlim = 255;
462 ip6->ip6_dst = *daddr6;
464 ip6->ip6_dst.s6_addr16[0] = IPV6_ADDR_INT16_MLL;
465 ip6->ip6_dst.s6_addr16[1] = 0;
466 ip6->ip6_dst.s6_addr32[1] = 0;
467 ip6->ip6_dst.s6_addr32[2] = IPV6_ADDR_INT32_ONE;
468 ip6->ip6_dst.s6_addr32[3] = taddr6->s6_addr32[3];
469 ip6->ip6_dst.s6_addr8[12] = 0xff;
470 if (in6_setscope(&ip6->ip6_dst, ifp, NULL) != 0)
500 sockaddr_in6_init(&dst_sa, &ip6->ip6_dst, 0, 0, 0);
525 ip6->ip6_src = *src;
526 nd_ns = (struct nd_neighbor_solicit *)(ip6 + 1);
577 ip6->ip6_plen = htons((u_int16_t)icmp6len);
580 in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), icmp6len);
611 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
613 struct in6_addr saddr6 = ip6->ip6_src;
614 struct in6_addr daddr6 = ip6->ip6_dst;
635 if (ip6->ip6_hlim != 255) {
638 ip6->ip6_hlim, IN6_PRINT(ip6buf, &ip6->ip6_src),
639 IN6_PRINT(ip6buf2, &ip6->ip6_dst), if_name(ifp));
725 "nd6_na_input: duplicate IP6 address %s\n",
904 struct ip6_hdr *ip6;
923 maxlen = sizeof(*ip6) + sizeof(*nd_na);
953 ip6 = mtod(m, struct ip6_hdr *);
954 ip6->ip6_flow = 0;
955 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
956 ip6->ip6_vfc |= IPV6_VERSION;
957 ip6->ip6_nxt = IPPROTO_ICMPV6;
958 ip6->ip6_hlim = 255;
971 ip6->ip6_dst = daddr6;
981 &ip6->ip6_src);
989 nd_na = (struct nd_neighbor_advert *)(ip6 + 1);
1033 ip6->ip6_plen = htons((u_int16_t)icmp6len);