Lines Matching refs:cs
232 register struct cstate *cs = lcs->next; in slhc_compress() local
291 if( ip->saddr == cs->cs_ip.saddr in slhc_compress()
292 && ip->daddr == cs->cs_ip.daddr in slhc_compress()
293 && th->source == cs->cs_tcp.source in slhc_compress()
294 && th->dest == cs->cs_tcp.dest) in slhc_compress()
298 if ( cs == ocs ) in slhc_compress()
300 lcs = cs; in slhc_compress()
301 cs = cs->next; in slhc_compress()
323 } else if (cs == ocs) { in slhc_compress()
328 lcs->next = cs->next; in slhc_compress()
329 cs->next = ocs->next; in slhc_compress()
330 ocs->next = cs; in slhc_compress()
345 oth = &cs->cs_tcp; 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()
351 || th->doff != cs->cs_tcp.doff in slhc_compress()
352 || (ip->ihl > 5 && memcmp(ip+1,cs->cs_ipopt,((ip->ihl)-5)*4) != 0) in slhc_compress()
353 || (th->doff > 5 && memcmp(th+1,cs->cs_tcpopt,((th->doff)-5)*4) != 0)){ in slhc_compress()
399 if(ip->tot_len != cs->cs_ip.tot_len && in slhc_compress()
400 ntohs(cs->cs_ip.tot_len) == hlen) in slhc_compress()
411 deltaS == ntohs(cs->cs_ip.tot_len) - hlen){ in slhc_compress()
418 if(deltaS == ntohs(cs->cs_ip.tot_len) - hlen){ 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()
437 memcpy(&cs->cs_tcp,th,20); in slhc_compress()
445 if(compress_cid == 0 || comp->xmit_current != cs->cs_this){ in slhc_compress()
449 *cp++ = cs->cs_this; in slhc_compress()
450 comp->xmit_current = cs->cs_this; in slhc_compress()
470 memcpy(&cs->cs_ip,ip,20); in slhc_compress()
471 memcpy(&cs->cs_tcp,th,20); in slhc_compress()
473 memcpy(cs->cs_ipopt, ip+1, ((ip->ihl) - 5) * 4); in slhc_compress()
475 memcpy(cs->cs_tcpopt, th+1, ((th->doff) - 5) * 4); in slhc_compress()
476 comp->xmit_current = cs->cs_this; in slhc_compress()
480 ocp[9] = cs->cs_this; in slhc_compress()
493 register struct cstate *cs; in slhc_uncompress() local
523 cs = &comp->rstate[comp->recv_current]; in slhc_uncompress()
524 thp = &cs->cs_tcp; in slhc_uncompress()
525 ip = &cs->cs_ip; in slhc_uncompress()
611 memcpy(cp, cs->cs_ipopt, (ip->ihl - 5) * 4); in slhc_uncompress()
622 memcpy(cp, cs->cs_tcpopt, ((thp->doff) - 5) * 4); in slhc_uncompress()
636 register struct cstate *cs; in slhc_remember() local
667 cs = &comp->rstate[comp->recv_current = index]; in slhc_remember()
669 memcpy(&cs->cs_ip,icp,20); in slhc_remember()
670 memcpy(&cs->cs_tcp,icp + ihl*4,20); in slhc_remember()
672 memcpy(cs->cs_ipopt, icp + sizeof(struct iphdr), (ihl - 5) * 4); in slhc_remember()
673 if (cs->cs_tcp.doff > 5) in slhc_remember()
674 memcpy(cs->cs_tcpopt, icp + ihl*4 + sizeof(struct tcphdr), (cs->cs_tcp.doff - 5) * 4); in slhc_remember()
675 cs->cs_hsize = ihl*2 + cs->cs_tcp.doff*2; in slhc_remember()