Lines Matching refs:ip6
410 struct ip6_hdr *ip6; in ip6_input_hbh() local
422 ip6 = mtod(m, struct ip6_hdr *); in ip6_input_hbh()
429 if (ip6->ip6_plen == 0 && *plen == 0) { in ip6_input_hbh()
440 (caddr_t)&ip6->ip6_plen - (caddr_t)ip6); in ip6_input_hbh()
444 hbh = (struct ip6_hbh *)(ip6 + 1); in ip6_input_hbh()
536 struct ip6_hdr *ip6; in ip6_input() local
568 ip6 = mtod(m, struct ip6_hdr *); in ip6_input()
624 ip6 = mtod(m, struct ip6_hdr *); in ip6_input()
625 if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { in ip6_input()
631 IP6STAT_INC(ip6s_nxthist[ip6->ip6_nxt]); in ip6_input()
632 IP_PROBE(receive, NULL, NULL, ip6, rcvif, NULL, ip6); in ip6_input()
637 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src) || in ip6_input()
638 IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst)) { in ip6_input()
646 if (IN6_IS_ADDR_MC_INTFACELOCAL(&ip6->ip6_dst) && in ip6_input()
658 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) && in ip6_input()
659 IPV6_ADDR_MC_SCOPE(&ip6->ip6_dst) == 0) { in ip6_input()
687 if (IN6_IS_ADDR_V4MAPPED(&ip6->ip6_src) || in ip6_input()
688 IN6_IS_ADDR_V4MAPPED(&ip6->ip6_dst)) { in ip6_input()
701 if (IN6_IS_ADDR_V4COMPAT(&ip6->ip6_src) || in ip6_input()
702 IN6_IS_ADDR_V4COMPAT(&ip6->ip6_dst)) { in ip6_input()
727 ip6 = mtod(m, struct ip6_hdr *); in ip6_input()
751 odst = ip6->ip6_dst; in ip6_input()
755 ip6 = mtod(m, struct ip6_hdr *); in ip6_input()
756 srcrt = !IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst); in ip6_input()
779 if (in6_clearscope(&ip6->ip6_src) || in6_clearscope(&ip6->ip6_dst)) { in ip6_input()
783 if (in6_setscope(&ip6->ip6_src, rcvif, NULL) || in ip6_input()
784 in6_setscope(&ip6->ip6_dst, rcvif, NULL)) { in ip6_input()
797 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { in ip6_input()
807 ia = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */); in ip6_input()
815 ip6_sprintf(ip6bufs, &ip6->ip6_src), in ip6_input()
816 ip6_sprintf(ip6bufd, &ip6->ip6_dst))); in ip6_input()
843 plen = (u_int32_t)ntohs(ip6->ip6_plen); in ip6_input()
844 if (ip6->ip6_nxt == IPPROTO_HOPOPTS) { in ip6_input()
848 nxt = ip6->ip6_nxt; in ip6_input()
880 IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { in ip6_input()
892 if (ip6_mforward && ip6_mforward(ip6, rcvif, m)) { in ip6_input()
1002 struct ip6_hdr *ip6; in ip6_process_hopopts() local
1057 ip6 = mtod(m, struct ip6_hdr *); in ip6_process_hopopts()
1058 if (ip6->ip6_plen) { in ip6_process_hopopts()
1134 struct ip6_hdr *ip6; in ip6_unknown_opt() local
1148 ip6 = mtod(m, struct ip6_hdr *); in ip6_unknown_opt()
1149 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) || in ip6_unknown_opt()
1180 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); in ip6_savecontrol_v4() local
1288 if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { in ip6_savecontrol_v4()
1302 bcopy(&ip6->ip6_dst, &pi6.ipi6_addr, sizeof(struct in6_addr)); in ip6_savecontrol_v4()
1318 if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { in ip6_savecontrol_v4()
1329 hlim = ip6->ip6_hlim & 0xff; in ip6_savecontrol_v4()
1341 if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { in ip6_savecontrol_v4()
1354 flowinfo = (u_int32_t)ntohl(ip6->ip6_flow & IPV6_FLOWINFO_MASK); in ip6_savecontrol_v4()
1365 if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) { in ip6_savecontrol_v4()
1378 struct ip6_hdr *ip6; in ip6_savecontrol() local
1385 ip6 = mtod(m, struct ip6_hdr *); in ip6_savecontrol()
1401 if (ip6->ip6_nxt == IPPROTO_HOPOPTS) { in ip6_savecontrol()
1405 hbh = (struct ip6_hbh *)(ip6 + 1); in ip6_savecontrol()
1424 int nxt = ip6->ip6_nxt, off = sizeof(struct ip6_hdr); in ip6_savecontrol()
1594 struct ip6_hdr *ip6; in ip6_get_prevhdr() local
1602 ip6 = mtod(m, struct ip6_hdr *); in ip6_get_prevhdr()
1603 nxt = ip6->ip6_nxt; in ip6_get_prevhdr()
1630 struct ip6_hdr ip6; in ip6_nexthdr() local
1642 if (m->m_pkthdr.len < off + sizeof(ip6)) in ip6_nexthdr()
1644 m_copydata(m, off, sizeof(ip6), (caddr_t)&ip6); in ip6_nexthdr()
1646 *nxtp = ip6.ip6_nxt; in ip6_nexthdr()
1647 off += sizeof(ip6); in ip6_nexthdr()