Lines Matching refs:ip6

127 #include <netinet/ip6.h>
281 struct ip6_hdr *ip6, *mhip6;
342 ip6 = mtod(m, struct ip6_hdr *);
380 finaldst = ip6->ip6_dst;
408 ip6 = mtod(m, struct ip6_hdr *);
537 ip6 = mtod(m, struct ip6_hdr *);
541 plen = m->m_pkthdr.len - sizeof(*ip6);
554 ip6 = mtod(m, struct ip6_hdr *);
557 ip6->ip6_plen = 0;
559 ip6->ip6_plen = htons(plen);
572 u_char *nexthdrp = &ip6->ip6_nxt;
588 *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt;
589 ip6->ip6_nxt = IPPROTO_DSTOPTS;
622 if (im6o != NULL && IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
632 if (IN6_IS_SCOPE_LINKLOCAL(&ip6->ip6_dst) &&
633 (ip6->ip6_dst.s6_addr16[1] == 0) && (ro != NULL)) {
635 ip6->ip6_dst.s6_addr16[1] = htons(ro->ro_dst.sin6_scope_id);
663 ip6 = mtod(m, struct ip6_hdr *);
666 ip6->ip6_dst.s6_addr16[1] = 0;
758 ip6->ip6_dst = sa.sin6_addr;
772 if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) &&
778 if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src)) {
808 if ((ip6->ip6_flow & htonl(0xfc << 20)) == 0)
810 if ((ip6->ip6_flow & htonl(0x03 << 20)) == 0)
813 ip6->ip6_flow |= htonl((opt->ip6po_tclass & mask) << 20);
818 ip6->ip6_hlim = opt->ip6po_hlim & 0xff;
819 else if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
822 ip6->ip6_hlim = im6o->im6o_multicast_hlim;
825 ip6->ip6_hlim = ip6_defmcasthlim;
839 !IN6_ARE_ADDR_EQUAL(&dst->sin6_addr, &ip6->ip6_dst) ||
848 dst->sin6_addr = ip6->ip6_dst;
872 struct ip6_hdr *, ip6, struct ifnet *, trace_ifp,
873 struct ip *, NULL, struct ip6_hdr *, ip6);
924 ip6 = mtod(m, struct ip6_hdr *);
930 src_sa.sin6_addr = ip6->ip6_src;
935 dst_sa.sin6_addr = ip6->ip6_dst;
997 src0 = ip6->ip6_src;
1003 src_sa.sin6_addr = ip6->ip6_src;
1007 dst0 = ip6->ip6_dst;
1014 dst_sa.sin6_addr = ip6->ip6_dst;
1030 if (rt && !IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
1043 if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) {
1062 IN6_LOOKUP_MULTI(&ip6->ip6_dst, ifp, in6m);
1101 if (ip6_mforward(ip6, ifp, m) != 0) {
1120 if (ip6->ip6_hlim == 0 || (ifp->if_flags & IFF_LOOPBACK) ||
1121 IN6_IS_ADDR_MC_INTFACELOCAL(&ip6->ip6_dst)) {
1160 else if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) &&
1171 in6_clearscope(&ip6->ip6_src);
1172 in6_clearscope(&ip6->ip6_dst);
1182 if (ip6_fw_chk_ptr(&ip6, ifp, &port, &m)) {
1266 ip6 = mtod(m, struct ip6_hdr *);
1337 ip6 = mtod(m, struct ip6_hdr *);
1367 } else if (ip6->ip6_plen == 0) {
1410 nextproto = ip6->ip6_nxt;
1411 ip6->ip6_nxt = IPPROTO_FRAGMENT;
1438 *mhip6 = *ip6;
3518 struct ip6_hdr *ip6;
3537 if (copym->m_len < sizeof(*ip6)) {
3543 ip6 = mtod(copym, struct ip6_hdr *);
3548 in6_clearscope(&ip6->ip6_src);
3549 in6_clearscope(&ip6->ip6_dst);
3583 struct ip6_hdr *ip6;
3585 ip6 = mtod(m, struct ip6_hdr *);
3586 if (m->m_len > sizeof(*ip6)) {
3593 MH_ALIGN(mh, sizeof(*ip6));
3595 m->m_len -= sizeof(*ip6);
3596 m->m_data += sizeof(*ip6);
3599 m->m_len = sizeof(*ip6);
3600 bcopy((caddr_t)ip6, mtod(m, caddr_t), sizeof(*ip6));