Lines Matching refs:cs
26 * Modified June 1993 by Paul Mackerras, paulus@cs.anu.edu.au,
163 register struct cstate *cs = comp->last_cs->cs_next;
204 if (ip->ip_src.s_addr != cs->cs_ip.ip_src.s_addr ||
205 ip->ip_dst.s_addr != cs->cs_ip.ip_dst.s_addr ||
206 *(int *)th != ((int *)&cs->cs_ip)[getip_hl(&cs->cs_ip)]) {
224 lcs = cs; cs = cs->cs_next;
228 if (ip->ip_src.s_addr == cs->cs_ip.ip_src.s_addr &&
229 ip->ip_dst.s_addr == cs->cs_ip.ip_dst.s_addr &&
231 &cs->cs_ip)[getip_hl(&cs->cs_ip)]) {
236 } while (cs != lastcs);
256 if (cs == lastcs) {
259 lcs->cs_next = cs->cs_next;
260 cs->cs_next = lastcs->cs_next;
261 lastcs->cs_next = cs;
276 oth = (struct tcphdr *)&((int *)&cs->cs_ip)[hlen];
281 if (((ushort_t *)ip)[0] != ((ushort_t *)&cs->cs_ip)[0] ||
282 ((ushort_t *)ip)[3] != ((ushort_t *)&cs->cs_ip)[3] ||
283 ((ushort_t *)ip)[4] != ((ushort_t *)&cs->cs_ip)[4] ||
286 BCMP(ip + 1, &cs->cs_ip + 1, (deltaS - 5) << 2)) ||
355 if (ip->ip_len != cs->cs_ip.ip_len &&
356 ntohs(cs->cs_ip.ip_len) == thlen) {
375 deltaS == ntohs(cs->cs_ip.ip_len) - thlen) {
388 if (deltaS == ntohs(cs->cs_ip.ip_len) - thlen) {
400 deltaS = ntohs(ip->ip_id) - ntohs(cs->cs_ip.ip_id);
417 BCOPY(ip, &cs->cs_ip, thlen);
432 if (compress_cid == 0 || comp->last_xmit != cs->cs_id) {
433 comp->last_xmit = cs->cs_id;
440 *cp++ = cs->cs_id;
459 * Update connection state cs & send uncompressed packet (that is,
465 BCOPY(ip, &cs->cs_ip, thlen);
467 ip->ip_p = cs->cs_id;
468 comp->last_xmit = cs->cs_id;
495 register struct cstate *cs;
510 cs = &comp->rstate[comp->last_recv = getip_p(buf)];
514 BCOPY(buf, &cs->cs_ip, hlen);
516 cs->cs_hlen = hlen & 0xff;
541 register struct cstate *cs;
574 cs = &comp->rstate[comp->last_recv];
575 hlen = getip_hl(&cs->cs_ip) << 2;
577 th = (struct tcphdr *)((uint32_t *)&cs->cs_ip+hlen/sizeof (uint32_t));
596 i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen;
610 tmp = ntohl(th->th_seq) + ntohs(cs->cs_ip.ip_len) - cs->cs_hlen;
640 DECODES(cs->cs_ip.ip_id);
642 cs->cs_ip.ip_id = ntohs(cs->cs_ip.ip_id) + 1;
643 cs->cs_ip.ip_id = htons(cs->cs_ip.ip_id);
661 total_len += cs->cs_hlen - vjlen;
662 cs->cs_ip.ip_len = htons(total_len);
667 bp = (ushort_t *)&cs->cs_ip;
668 cs->cs_ip.ip_sum = 0;
676 cs->cs_ip.ip_sum = ~ changes;
678 *hdrp = (uchar_t *)&cs->cs_ip;
679 *hlenp = cs->cs_hlen;