Lines Matching defs:ip
44 * Use ip_fast_csum from ip.h
71 #include <net/ip.h>
238 struct iphdr *ip;
250 ip = (struct iphdr *) icp;
251 if (ip->version != 4 || ip->ihl < 5)
255 if (ip->protocol != IPPROTO_TCP || (ntohs(ip->frag_off) & 0x3fff)) {
257 if(ip->protocol != IPPROTO_TCP)
263 nlen = ip->ihl * 4;
297 if( ip->saddr == cs->cs_ip.saddr
298 && ip->daddr == cs->cs_ip.daddr
353 if(ip->version != cs->cs_ip.version || ip->ihl != cs->cs_ip.ihl
354 || ip->tos != cs->cs_ip.tos
355 || (ip->frag_off & htons(0x4000)) != (cs->cs_ip.frag_off & htons(0x4000))
356 || ip->ttl != cs->cs_ip.ttl
358 || (ip->ihl > 5 && memcmp(ip+1,cs->cs_ipopt,((ip->ihl)-5)*4) != 0)
405 if(ip->tot_len != cs->cs_ip.tot_len &&
431 deltaS = ntohs(ip->id) - ntohs(cs->cs_ip.id);
442 memcpy(&cs->cs_ip,ip,20);
472 * a regular ip/tcp packet but with the 'conversation id' we hope
476 memcpy(&cs->cs_ip,ip,20);
478 if (ip->ihl > 5)
479 memcpy(cs->cs_ipopt, ip+1, ((ip->ihl) - 5) * 4);
498 struct iphdr *ip;
535 ip = &cs->cs_ip;
547 hdrlen = ip->ihl * 4 + thp->doff * 4;
553 i = ntohs(ip->tot_len) - hdrlen;
561 ntohs(ip->tot_len) - hdrlen);
597 ip->id = htons (ntohs (ip->id) + x);
599 ip->id = htons (ntohs (ip->id) + 1);
611 ip->tot_len = htons(len);
612 ip->check = 0;
617 memcpy(cp, ip, 20);
620 if (ip->ihl > 5) {
621 memcpy(cp, cs->cs_ipopt, (ip->ihl - 5) * 4);
622 cp += (ip->ihl - 5) * 4;
625 put_unaligned(ip_fast_csum(icp, ip->ihl),