• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/bsd/netinet6/

Lines Matching refs:ip6

53 #include <netinet/ip6.h>
101 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
103 struct in6_addr saddr6 = ip6->ip6_src;
104 struct in6_addr daddr6 = ip6->ip6_dst;
117 nd_ns = (struct nd_neighbor_solicit *)((caddr_t)ip6 + off);
125 ip6 = mtod(m, struct ip6_hdr *); /* adjust pointer for safety */
128 if (ip6->ip6_hlim != 255) {
131 ip6->ip6_hlim, ip6_sprintf(&ip6->ip6_src),
132 ip6_sprintf(&ip6->ip6_dst), if_name(ifp)));
146 "(wrong ip6 dst)\n"));
173 if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && lladdr) {
347 struct ip6_hdr *ip6;
360 maxlen = sizeof(*ip6) + sizeof(*nd_ns);
390 m->m_pkthdr.len = m->m_len = sizeof(*ip6) + icmp6len;
394 ip6 = mtod(m, struct ip6_hdr *);
395 ip6->ip6_flow = 0;
396 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
397 ip6->ip6_vfc |= IPV6_VERSION;
398 /* ip6->ip6_plen will be set later */
399 ip6->ip6_nxt = IPPROTO_ICMPV6;
400 ip6->ip6_hlim = 255;
402 ip6->ip6_dst = *daddr6;
404 ip6->ip6_dst.s6_addr16[0] = IPV6_ADDR_INT16_MLL;
405 ip6->ip6_dst.s6_addr16[1] = htons(ifp->if_index);
406 ip6->ip6_dst.s6_addr32[1] = 0;
407 ip6->ip6_dst.s6_addr32[2] = IPV6_ADDR_INT32_ONE;
408 ip6->ip6_dst.s6_addr32[3] = taddr6->s6_addr32[3];
409 ip6->ip6_dst.s6_addr8[12] = 0xff;
419 ia = in6_ifawithifp(ifp, &ip6->ip6_dst);
424 ip6->ip6_src = ia->ia_addr.sin6_addr;
441 struct ip6_hdr *hip6; /* hold ip6 */
454 bcopy(saddr6, &ip6->ip6_src, sizeof(*saddr6));
456 ia = in6_ifawithifp(ifp, &ip6->ip6_dst);
464 ip6->ip6_src = ia->ia_addr.sin6_addr;
472 bzero(&ip6->ip6_src, sizeof(ip6->ip6_src));
474 nd_ns = (struct nd_neighbor_solicit *)(ip6 + 1);
510 ip6->ip6_plen = htons((u_short)icmp6len);
513 = in6_cksum(m, IPPROTO_ICMPV6, sizeof(*ip6), icmp6len);
545 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
548 struct in6_addr saddr6 = ip6->ip6_src;
550 struct in6_addr daddr6 = ip6->ip6_dst;
565 if (ip6->ip6_hlim != 255) {
568 ip6->ip6_hlim, ip6_sprintf(&ip6->ip6_src),
569 ip6_sprintf(&ip6->ip6_dst), if_name(ifp)));
575 nd_na = (struct nd_neighbor_advert *)((caddr_t)ip6 + off);
804 rt6_flush(&ip6->ip6_src, rt->rt_ifp);
850 struct ip6_hdr *ip6;
860 maxlen = sizeof(*ip6) + sizeof(*nd_na);
894 ip6 = mtod(m, struct ip6_hdr *);
895 ip6->ip6_flow = 0;
896 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
897 ip6->ip6_vfc |= IPV6_VERSION;
898 ip6->ip6_nxt = IPPROTO_ICMPV6;
899 ip6->ip6_hlim = 255;
902 ip6->ip6_dst.s6_addr16[0] = IPV6_ADDR_INT16_MLL;
903 ip6->ip6_dst.s6_addr16[1] = htons(ifp->if_index);
904 ip6->ip6_dst.s6_addr32[1] = 0;
905 ip6->ip6_dst.s6_addr32[2] = 0;
906 ip6->ip6_dst.s6_addr32[3] = IPV6_ADDR_INT32_ONE;
909 ip6->ip6_dst = *daddr6;
914 ia = in6_ifawithifp(ifp, &ip6->ip6_dst);
919 ip6->ip6_src = ia->ia_addr.sin6_addr;
920 nd_na = (struct nd_neighbor_advert *)(ip6 + 1);
965 ip6->ip6_plen = htons((u_short)icmp6len);