Lines Matching +full:4 +full:th
239 struct tcphdr *th, *oth; in slhc_compress() local
251 if (ip->version != 4 || ip->ihl < 5) in slhc_compress()
263 nlen = ip->ihl * 4; in slhc_compress()
264 if (isize < nlen + sizeof(*th)) in slhc_compress()
267 th = (struct tcphdr *)(icp + nlen); in slhc_compress()
268 if (th->doff < sizeof(struct tcphdr) / 4) in slhc_compress()
270 hlen = nlen + th->doff * 4; in slhc_compress()
276 if(hlen > isize || th->syn || th->fin || th->rst || in slhc_compress()
277 ! (th->ack)){ in slhc_compress()
299 && th->source == cs->cs_tcp.source in slhc_compress()
300 && th->dest == cs->cs_tcp.dest) in slhc_compress()
357 || th->doff != cs->cs_tcp.doff in slhc_compress()
358 || (ip->ihl > 5 && memcmp(ip+1,cs->cs_ipopt,((ip->ihl)-5)*4) != 0) in slhc_compress()
359 || (th->doff > 5 && memcmp(th+1,cs->cs_tcpopt,((th->doff)-5)*4) != 0)){ in slhc_compress()
369 if(th->urg){ in slhc_compress()
370 deltaS = ntohs(th->urg_ptr); in slhc_compress()
373 } else if(th->urg_ptr != oth->urg_ptr){ in slhc_compress()
380 if((deltaS = ntohs(th->window) - ntohs(oth->window)) != 0){ in slhc_compress()
384 if((deltaA = ntohl(th->ack_seq) - ntohl(oth->ack_seq)) != 0L){ in slhc_compress()
390 if((deltaS = ntohl(th->seq) - ntohl(oth->seq)) != 0L){ in slhc_compress()
436 if(th->psh) in slhc_compress()
441 csum = th->check; in slhc_compress()
443 memcpy(&cs->cs_tcp,th,20); in slhc_compress()
448 * So, (cp - new_seq) + 4 bytes of header are needed. in slhc_compress()
477 memcpy(&cs->cs_tcp,th,20); in slhc_compress()
479 memcpy(cs->cs_ipopt, ip+1, ((ip->ihl) - 5) * 4); in slhc_compress()
480 if (th->doff > 5) in slhc_compress()
481 memcpy(cs->cs_tcpopt, th+1, ((th->doff) - 5) * 4); in slhc_compress()
547 hdrlen = ip->ihl * 4 + thp->doff * 4; in slhc_uncompress()
621 memcpy(cp, cs->cs_ipopt, (ip->ihl - 5) * 4); in slhc_uncompress()
622 cp += (ip->ihl - 5) * 4; in slhc_uncompress()
632 memcpy(cp, cs->cs_tcpopt, ((thp->doff) - 5) * 4); in slhc_uncompress()
633 cp += ((thp->doff) - 5) * 4; in slhc_uncompress()
658 if(ihl < 20 / 4){ in slhc_remember()
680 memcpy(&cs->cs_tcp,icp + ihl*4,20); in slhc_remember()
682 memcpy(cs->cs_ipopt, icp + sizeof(struct iphdr), (ihl - 5) * 4); in slhc_remember()
684 memcpy(cs->cs_tcpopt, icp + ihl*4 + sizeof(struct tcphdr), (cs->cs_tcp.doff - 5) * 4); in slhc_remember()