Lines Matching defs:ip6

93 #include <netinet/ip6.h>
166 struct ip6_hdr *ip6;
188 ip6 = mtod(m, struct ip6_hdr *);
189 finaldst = ip6->ip6_dst;
258 ip6 = mtod(m, struct ip6_hdr *);
262 plen = m->m_pkthdr.len - sizeof(*ip6);
275 ip6 = mtod(m, struct ip6_hdr *);
278 ip6->ip6_plen = 0;
280 ip6->ip6_plen = htons(plen);
293 u_char *nexthdrp = &ip6->ip6_nxt;
310 *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt;
311 ip6->ip6_nxt = IPPROTO_DSTOPTS;
354 ip6->ip6_dst = addr[0];
367 IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src)) {
376 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src)) {
409 if ((ip6->ip6_flow & htonl(0xfc << 20)) == 0)
411 if ((ip6->ip6_flow & htonl(0x03 << 20)) == 0)
414 ip6->ip6_flow |=
420 ip6->ip6_hlim = opt->ip6po_hlim & 0xff;
421 else if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
423 ip6->ip6_hlim = im6o->im6o_hlim;
425 ip6->ip6_hlim = ip6_defmcasthlim;
445 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
460 rt = in6_selectroute(&ip6->ip6_dst, opt, ro,
483 route6_cache(ro, &ip6->ip6_dst, NULL, m->m_pkthdr.ph_rtableid);
487 !IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst))
490 if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
509 in6_hasmulti(&ip6->ip6_dst, ifp)) {
536 if (ip6_mforward(ip6, ifp, m, flags) != 0) {
551 if (ip6->ip6_hlim == 0 || (ifp->if_flags & IFF_LOOPBACK) ||
552 IN6_IS_ADDR_MC_INTFACELOCAL(&ip6->ip6_dst)) {
562 if (IN6_IS_SCOPE_EMBED(&ip6->ip6_src)) {
564 src_scope = ip6->ip6_src.s6_addr16[1];
565 ip6->ip6_src.s6_addr16[1] = 0;
567 if (IN6_IS_SCOPE_EMBED(&ip6->ip6_dst)) {
569 dst_scope = ip6->ip6_dst.s6_addr16[1];
570 ip6->ip6_dst.s6_addr16[1] = 0;
594 else if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) && (opt == NULL ||
629 ip6 = mtod(m, struct ip6_hdr *);
637 finaldst = ip6->ip6_dst;
662 if (IN6_IS_SCOPE_EMBED(&ip6->ip6_src))
663 ip6->ip6_src.s6_addr16[1] = src_scope;
664 if (IN6_IS_SCOPE_EMBED(&ip6->ip6_dst))
665 ip6->ip6_dst.s6_addr16[1] = dst_scope;
719 } else if (ip6->ip6_plen == 0) {
754 nextproto = ip6->ip6_nxt;
755 ip6->ip6_nxt = IPPROTO_FRAGMENT;
787 struct ip6_hdr *ip6;
794 ip6 = mtod(m0, struct ip6_hdr *);
823 *mhip6 = *ip6;
2534 struct ip6_hdr *ip6;
2556 if (copym->m_len < sizeof(*ip6)) {
2562 ip6 = mtod(copym, struct ip6_hdr *);
2563 if (IN6_IS_SCOPE_EMBED(&ip6->ip6_src))
2564 ip6->ip6_src.s6_addr16[1] = 0;
2565 if (IN6_IS_SCOPE_EMBED(&ip6->ip6_dst))
2566 ip6->ip6_dst.s6_addr16[1] = 0;
2578 struct ip6_hdr *ip6;
2580 ip6 = mtod(m, struct ip6_hdr *);
2581 if (m->m_len > sizeof(*ip6)) {
2588 m_align(mh, sizeof(*ip6));
2589 m->m_len -= sizeof(*ip6);
2590 m->m_data += sizeof(*ip6);
2593 m->m_len = sizeof(*ip6);
2594 bcopy((caddr_t)ip6, mtod(m, caddr_t), sizeof(*ip6));
2689 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
2700 csum = in6_cksum_phdr(&ip6->ip6_src, &ip6->ip6_dst,
2703 csum = in6_cksum_phdr(&ip6->ip6_src, &ip6->ip6_dst,
2720 ip6->ip6_nxt != IPPROTO_TCP ||
2728 ip6->ip6_nxt != IPPROTO_UDP ||
2833 struct ip6_hdr *ip6;
2859 ip6 = mtod(m, struct ip6_hdr *);
2865 len = sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen);
2868 dst = ip6->ip6_dst;