Lines Matching defs:ip
42 #include <netinet/ip.h>
759 struct ip *ip;
809 if (m->m_pkthdr.len < ipofs + sizeof(struct ip))
813 ip = (struct ip *)mtodo(m, ipofs);
815 if (ip->ip_v != IPVERSION)
817 if (m->m_pkthdr.len < ipofs + ntohs(ip->ip_len))
851 m->m_pkthdr.len = m->m_len = ntohs(ip->ip_len) + ipofs;
853 if ((ip->ip_off & htons(IP_OFFMASK)) == 0 &&
854 ip->ip_p == IPPROTO_TCP) {
855 struct tcphdr *th = (struct tcphdr *)((caddr_t)ip +
856 (ip->ip_hl << 2));
881 uint16_t ip_len = ntohs(ip->ip_len);
884 th->th_sum = in_pseudo(ip->ip_src.s_addr,
885 ip->ip_dst.s_addr, htons(IPPROTO_TCP +
886 ip_len - (ip->ip_hl << 2)));