• Home
  • Raw
  • Download

Lines Matching refs:cs

232 	struct cstate *cs = lcs->next;  in slhc_compress()  local
297 if( ip->saddr == cs->cs_ip.saddr in slhc_compress()
298 && ip->daddr == cs->cs_ip.daddr in slhc_compress()
299 && th->source == cs->cs_tcp.source in slhc_compress()
300 && th->dest == cs->cs_tcp.dest) in slhc_compress()
304 if ( cs == ocs ) in slhc_compress()
306 lcs = cs; in slhc_compress()
307 cs = cs->next; in slhc_compress()
329 } else if (cs == ocs) { in slhc_compress()
334 lcs->next = cs->next; in slhc_compress()
335 cs->next = ocs->next; in slhc_compress()
336 ocs->next = cs; in slhc_compress()
351 oth = &cs->cs_tcp; in slhc_compress()
353 if(ip->version != cs->cs_ip.version || ip->ihl != cs->cs_ip.ihl in slhc_compress()
354 || ip->tos != cs->cs_ip.tos in slhc_compress()
355 || (ip->frag_off & htons(0x4000)) != (cs->cs_ip.frag_off & htons(0x4000)) in slhc_compress()
356 || ip->ttl != cs->cs_ip.ttl 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()
405 if(ip->tot_len != cs->cs_ip.tot_len && in slhc_compress()
406 ntohs(cs->cs_ip.tot_len) == hlen) in slhc_compress()
417 deltaS == ntohs(cs->cs_ip.tot_len) - hlen){ in slhc_compress()
424 if(deltaS == ntohs(cs->cs_ip.tot_len) - hlen){ in slhc_compress()
431 deltaS = ntohs(ip->id) - ntohs(cs->cs_ip.id); in slhc_compress()
442 memcpy(&cs->cs_ip,ip,20); in slhc_compress()
443 memcpy(&cs->cs_tcp,th,20); in slhc_compress()
451 if(compress_cid == 0 || comp->xmit_current != cs->cs_this){ in slhc_compress()
455 *cp++ = cs->cs_this; in slhc_compress()
456 comp->xmit_current = cs->cs_this; in slhc_compress()
476 memcpy(&cs->cs_ip,ip,20); 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()
481 memcpy(cs->cs_tcpopt, th+1, ((th->doff) - 5) * 4); in slhc_compress()
482 comp->xmit_current = cs->cs_this; in slhc_compress()
486 ocp[9] = cs->cs_this; in slhc_compress()
499 struct cstate *cs; in slhc_uncompress() local
533 cs = &comp->rstate[comp->recv_current]; in slhc_uncompress()
534 thp = &cs->cs_tcp; in slhc_uncompress()
535 ip = &cs->cs_ip; in slhc_uncompress()
621 memcpy(cp, cs->cs_ipopt, (ip->ihl - 5) * 4); in slhc_uncompress()
632 memcpy(cp, cs->cs_tcpopt, ((thp->doff) - 5) * 4); in slhc_uncompress()
646 struct cstate *cs; in slhc_remember() local
677 cs = &comp->rstate[comp->recv_current = index]; in slhc_remember()
679 memcpy(&cs->cs_ip,icp,20); 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()
683 if (cs->cs_tcp.doff > 5) in slhc_remember()
684 memcpy(cs->cs_tcpopt, icp + ihl*4 + sizeof(struct tcphdr), (cs->cs_tcp.doff - 5) * 4); in slhc_remember()
685 cs->cs_hsize = ihl*2 + cs->cs_tcp.doff*2; in slhc_remember()
686 cs->initialized = true; in slhc_remember()