Lines Matching refs:ip
106 #include <netinet/ip.h>
317 struct ip ip;
337 m_copydata((struct mbuf *)(uintptr_t)m, 0, sizeof(ip), (caddr_t)&ip);
339 if (ip.ip_v != 4)
350 if (bcmp(GET_V4(&addr6), &ip.ip_dst, sizeof(ip.ip_dst)) != 0)
363 b = ip.ip_src;
420 struct ip *ip;
492 M_PREPEND(m, sizeof(struct ip), M_NOWAIT);
497 ip = mtod(m, struct ip *);
499 bzero(ip, sizeof(*ip));
501 bcopy(GET_V4(&addr6), &ip->ip_src, sizeof(ip->ip_src));
502 bcopy(&in4, &ip->ip_dst, sizeof(ip->ip_dst));
503 ip->ip_p = IPPROTO_IPV6;
504 ip->ip_ttl = ip_stf_ttl;
505 ip->ip_len = htons(m->m_pkthdr.len);
507 ip_ecn_ingress(ECN_ALLOWED, &ip->ip_tos, &tos);
509 ip_ecn_ingress(ECN_NOCARE, &ip->ip_tos, &tos);
616 struct ip *ip;
631 ip = mtod(m, struct ip *);
650 if (stf_checkaddr4(sc, &ip->ip_dst, NULL) < 0 ||
651 stf_checkaddr4(sc, &ip->ip_src, m->m_pkthdr.rcvif) < 0) {
656 otos = ip->ip_tos;