Home | History | Annotate | Download | only in netipsec

Lines Matching refs:ip6

61 #include <netinet/ip6.h>
250 const struct ip6_hdr *ip6;
252 if (m->m_len < sizeof(*ip6)) {
253 m = m_pullup(m, sizeof(*ip6));
260 ip6 = mtod(m, const struct ip6_hdr *);
261 tos = (ntohl(ip6->ip6_flow) >> 20) & 0xff;
461 ipsecif6_encap_func(struct mbuf *m, struct ip6_hdr *ip6, struct ipsec_variant *var)
482 if (!IN6_ARE_ADDR_EQUAL(&src->sin6_addr, &ip6->ip6_dst) ||
483 !IN6_ARE_ADDR_EQUAL(&dst->sin6_addr, &ip6->ip6_src))
521 struct ip6_hdr *ip6;
582 ip6 = mtod(m, struct ip6_hdr *);
583 ip6->ip6_flow = 0;
584 ip6->ip6_vfc &= ~IPV6_VERSION_MASK;
585 ip6->ip6_vfc |= IPV6_VERSION;
586 #if 0 /* ip6->ip6_plen will be filled by ip6_output */
587 ip6->ip6_plen = htons((u_short)m->m_pkthdr.len - sizeof(*ip6));
589 ip6->ip6_nxt = proto;
590 ip6->ip6_hlim = ip6_ipsec_hlim;
591 ip6->ip6_src = sin6_src->sin6_addr;
594 ip6->ip6_dst = sin6_dst->sin6_addr;
613 ip6->ip6_flow &= ~ntohl(0xff00000);
614 ip6->ip6_flow |= htonl((u_int32_t)otos << 20);
767 struct ip6_hdr *ip6;
770 if (M_UNWRITABLE(m, sizeof(*ip6))) {
771 m = m_pullup(m, sizeof(*ip6));
775 ip6 = mtod(m, struct ip6_hdr *);
776 itos = (ntohl(ip6->ip6_flow) >> 20) & 0xff;
783 ip6->ip6_flow &= ~htonl(0xff << 20);
784 ip6->ip6_flow |= htonl((u_int32_t)itos << 20);
821 struct ip6_hdr *ip6;
847 ip6 = mtod(m, struct ip6_hdr *);
850 if (rcvif == NULL || !ipsecif6_filter6(ip6, var, rcvif)) {
861 otos = ip6->ip6_flow;
922 ipsecif6_filter6(const struct ip6_hdr *ip6, struct ipsec_variant *var,
930 return in6_tunnel_validate(ip6, &src->sin6_addr, &dst->sin6_addr);
1011 struct ip6_hdr *ip6;
1030 ip6 = ip6cp->ip6c_ip6;
1032 ip6 = NULL;
1035 if (!ip6)
1043 else if (IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &dst6->sin6_addr))