Lines Matching refs:ip
238 struct iphdr *ip; in slhc_compress() local
250 ip = (struct iphdr *) icp; in slhc_compress()
253 if (ip->protocol != IPPROTO_TCP || (ntohs(ip->frag_off) & 0x3fff)) { in slhc_compress()
255 if(ip->protocol != IPPROTO_TCP) in slhc_compress()
263 th = (struct tcphdr *)(((unsigned char *)ip) + ip->ihl*4); in slhc_compress()
264 hlen = ip->ihl*4 + th->doff*4; in slhc_compress()
291 if( ip->saddr == cs->cs_ip.saddr in slhc_compress()
292 && ip->daddr == cs->cs_ip.daddr in slhc_compress()
347 if(ip->version != cs->cs_ip.version || ip->ihl != cs->cs_ip.ihl in slhc_compress()
348 || ip->tos != cs->cs_ip.tos in slhc_compress()
349 || (ip->frag_off & htons(0x4000)) != (cs->cs_ip.frag_off & htons(0x4000)) in slhc_compress()
350 || ip->ttl != cs->cs_ip.ttl in slhc_compress()
352 || (ip->ihl > 5 && memcmp(ip+1,cs->cs_ipopt,((ip->ihl)-5)*4) != 0) in slhc_compress()
399 if(ip->tot_len != cs->cs_ip.tot_len && in slhc_compress()
425 deltaS = ntohs(ip->id) - ntohs(cs->cs_ip.id); in slhc_compress()
436 memcpy(&cs->cs_ip,ip,20); in slhc_compress()
470 memcpy(&cs->cs_ip,ip,20); in slhc_compress()
472 if (ip->ihl > 5) in slhc_compress()
473 memcpy(cs->cs_ipopt, ip+1, ((ip->ihl) - 5) * 4); in slhc_compress()
492 register struct iphdr *ip; in slhc_uncompress() local
525 ip = &cs->cs_ip; in slhc_uncompress()
537 hdrlen = ip->ihl * 4 + thp->doff * 4; in slhc_uncompress()
543 i = ntohs(ip->tot_len) - hdrlen; in slhc_uncompress()
551 ntohs(ip->tot_len) - hdrlen); in slhc_uncompress()
587 ip->id = htons (ntohs (ip->id) + x); in slhc_uncompress()
589 ip->id = htons (ntohs (ip->id) + 1); in slhc_uncompress()
601 ip->tot_len = htons(len); in slhc_uncompress()
602 ip->check = 0; in slhc_uncompress()
607 memcpy(cp, ip, 20); in slhc_uncompress()
610 if (ip->ihl > 5) { in slhc_uncompress()
611 memcpy(cp, cs->cs_ipopt, (ip->ihl - 5) * 4); in slhc_uncompress()
612 cp += (ip->ihl - 5) * 4; in slhc_uncompress()
615 put_unaligned(ip_fast_csum(icp, ip->ihl), in slhc_uncompress()