Lines Matching refs:ip
95 #include <netinet/ip.h>
880 n = (ETHER_HDR_LEN + sizeof(struct ip)) / 2;
951 struct ip *ip;
970 m = m_pullup(*m0, i + sizeof(struct ip));
975 ip = (struct ip *)(mtod(m, caddr_t) + i);
976 i += (ip->ip_hl << 2);
1222 struct ip *ip;
1229 if (pktlen < sizeof(struct ether_header) + sizeof(struct ip))
1234 ip = (struct ip *)(eh + 1);
1235 if (ip->ip_v != IPVERSION)
1238 hlen = ip->ip_hl << 2;
1240 if (hlen < sizeof(struct ip))
1242 if (ntohs(ip->ip_len) < hlen)
1244 if (ntohs(ip->ip_len) != pktlen)
1246 if (ip->ip_off & htons(IP_MF | IP_OFFMASK))
1249 switch (ip->ip_p) {
1257 uh = (struct udphdr *)((caddr_t)ip + hlen);
1267 len = hlen - sizeof(struct ip);
1269 opts = (u_int16_t *)(ip + 1);