Lines Matching refs:ip
131 #include <netinet/ip.h>
395 struct ip ip;
414 mbuf_copydata((struct mbuf *)(size_t)m, 0, sizeof(ip), &ip);
416 if (ip.ip_v != 4)
429 if (bcmp(GET_V4(&ia6->ia_addr.sin6_addr), &ip.ip_dst,
430 sizeof(ip.ip_dst)) != 0) {
444 b = ip.ip_src;
523 struct ip *ip;
580 M_PREPEND(m, sizeof(struct ip), M_DONTWAIT);
581 if (m && mbuf_len(m) < sizeof(struct ip))
582 m = m_pullup(m, sizeof(struct ip));
588 ip = mtod(m, struct ip *);
590 bzero(ip, sizeof(*ip));
594 &ip->ip_src, sizeof(ip->ip_src));
596 bcopy(in4, &ip->ip_dst, sizeof(ip->ip_dst));
597 ip->ip_p = IPPROTO_IPV6;
598 ip->ip_ttl = ip_stf_ttl;
599 ip->ip_len = m->m_pkthdr.len; /*host order*/
601 ip_ecn_ingress(ECN_ALLOWED, &ip->ip_tos, &tos);
603 ip_ecn_ingress(ECN_NOCARE, &ip->ip_tos, &tos);
608 bcmp(&dst4->sin_addr, &ip->ip_dst, sizeof(ip->ip_dst)) != 0) {
612 bcopy(&ip->ip_dst, &dst4->sin_addr, sizeof(dst4->sin_addr));
746 struct ip *ip;
753 ip = mtod(m, struct ip *);
754 proto = ip->ip_p;
761 ip = mtod(m, struct ip *);
780 if (stf_checkaddr4(sc, &ip->ip_dst, NULL) < 0 ||
781 stf_checkaddr4(sc, &ip->ip_src, m->m_pkthdr.rcvif) < 0) {
786 otos = ip->ip_tos;