Lines Matching refs:ip
60 #include <netinet/ip.h>
272 struct ip *ip;
303 M_CHECK(sizeof(struct ip));
304 ip = mtod(m, struct ip *);
307 if (ip->ip_v != IPVERSION)
311 iphlen = ip->ip_hl << 2;
312 if (iphlen < sizeof(struct ip) || iphlen > pktlen )
316 if (!(ip->ip_p == IPPROTO_TCP))
320 M_CHECK(iphlen - sizeof(struct ip) + sizeof(struct tcphdr));
321 ip = mtod(m, struct ip *);
322 tcp = (struct tcphdr *)((caddr_t )ip + iphlen);
337 ip = mtod(m, struct ip *);
338 tcp = (struct tcphdr *)((caddr_t )ip + iphlen);