Lines Matching refs:ip6

110 #include <netinet/ip6.h>
133 .nh_name = "ip6",
218 TUNABLE_INT_FETCH("net.inet6.ip6.auto_linklocal",
220 TUNABLE_INT_FETCH("net.inet6.ip6.accept_rtadv", &V_ip6_accept_rtadv);
221 TUNABLE_INT_FETCH("net.inet6.ip6.no_radr", &V_ip6_no_radr);
409 struct ip6_hdr *ip6;
421 ip6 = mtod(m, struct ip6_hdr *);
428 if (ip6->ip6_plen == 0 && *plen == 0) {
439 (caddr_t)&ip6->ip6_plen - (caddr_t)ip6);
444 hbh = (struct ip6_hbh *)(ip6 + 1);
544 struct ip6_hdr *ip6;
576 ip6 = mtod(m, struct ip6_hdr *);
636 ip6 = mtod(m, struct ip6_hdr *);
637 if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) {
643 IP6STAT_INC(ip6s_nxthist[ip6->ip6_nxt]);
644 IP_PROBE(receive, NULL, NULL, ip6, rcvif, NULL, ip6);
649 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src) ||
650 IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst)) {
658 if (IN6_IS_ADDR_MC_INTFACELOCAL(&ip6->ip6_dst) &&
670 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) &&
671 IPV6_ADDR_MC_SCOPE(&ip6->ip6_dst) == 0) {
700 if (IN6_IS_ADDR_V4MAPPED(&ip6->ip6_src) ||
701 IN6_IS_ADDR_V4MAPPED(&ip6->ip6_dst)) {
714 if (IN6_IS_ADDR_V4COMPAT(&ip6->ip6_src) ||
715 IN6_IS_ADDR_V4COMPAT(&ip6->ip6_dst)) {
729 * ip6 pointer.
740 ip6 = mtod(m, struct ip6_hdr *);
764 odst = ip6->ip6_dst;
770 ip6 = mtod(m, struct ip6_hdr *);
771 srcrt = !IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst);
794 if (in6_clearscope(&ip6->ip6_src) || in6_clearscope(&ip6->ip6_dst)) {
798 if (in6_setscope(&ip6->ip6_src, rcvif, NULL) ||
799 in6_setscope(&ip6->ip6_dst, rcvif, NULL)) {
812 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
822 ia = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */);
830 ip6_sprintf(ip6bufs, &ip6->ip6_src),
831 ip6_sprintf(ip6bufd, &ip6->ip6_dst)));
858 plen = (u_int32_t)ntohs(ip6->ip6_plen);
859 if (ip6->ip6_nxt == IPPROTO_HOPOPTS) {
863 nxt = ip6->ip6_nxt;
895 IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
907 if (ip6_mforward && ip6_mforward(ip6, rcvif, m)) {
916 ip6 = mtod(m, struct ip6_hdr *);
927 if (IN6_IS_ADDR_V4MAPPED(&ip6->ip6_src) ||
928 IN6_IS_ADDR_V4MAPPED(&ip6->ip6_dst)) {
1035 struct ip6_hdr *ip6;
1090 ip6 = mtod(m, struct ip6_hdr *);
1091 if (ip6->ip6_plen) {
1167 struct ip6_hdr *ip6;
1181 ip6 = mtod(m, struct ip6_hdr *);
1182 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) ||
1214 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
1268 if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) {
1282 bcopy(&ip6->ip6_dst, &pi6.ipi6_addr, sizeof(struct in6_addr));
1298 if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) {
1309 hlim = ip6->ip6_hlim & 0xff;
1321 if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) {
1334 flowinfo = (u_int32_t)ntohl(ip6->ip6_flow & IPV6_FLOWINFO_MASK);
1345 if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) {
1358 struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
1380 if (ip6->ip6_nxt == IPPROTO_HOPOPTS) {
1388 hbh = (struct ip6_hbh *)(ip6 + 1);
1392 ip6->ip6_nxt);
1425 int nxt = ip6->ip6_nxt, off = sizeof(struct ip6_hdr);
1667 struct ip6_hdr *ip6;
1675 ip6 = mtod(m, struct ip6_hdr *);
1676 nxt = ip6->ip6_nxt;
1703 struct ip6_hdr ip6;
1715 if (m->m_pkthdr.len < off + sizeof(ip6))
1717 m_copydata(m, off, sizeof(ip6), (caddr_t)&ip6);
1719 *nxtp = ip6.ip6_nxt;
1720 off += sizeof(ip6);