Lines Matching full:cs

154 	struct cstate *cs = comp->last_cs->cs_next;  in sl_compress_tcp()  local
183 if (ip->ip_src.s_addr != cs->cs_ip.ip_src.s_addr || in sl_compress_tcp()
184 ip->ip_dst.s_addr != cs->cs_ip.ip_dst.s_addr || in sl_compress_tcp()
185 *(int32_t *)th != ((int32_t *)&cs->cs_ip)[cs->cs_ip.ip_hl]) { in sl_compress_tcp()
202 lcs = cs; cs = cs->cs_next; in sl_compress_tcp()
204 if (ip->ip_src.s_addr == cs->cs_ip.ip_src.s_addr in sl_compress_tcp()
205 && ip->ip_dst.s_addr == cs->cs_ip.ip_dst.s_addr in sl_compress_tcp()
207 ((int32_t *)&cs->cs_ip)[cs->cs_ip.ip_hl]) in sl_compress_tcp()
209 } while (cs != lastcs); in sl_compress_tcp()
231 if (cs == lastcs) in sl_compress_tcp()
234 lcs->cs_next = cs->cs_next; in sl_compress_tcp()
235 cs->cs_next = lastcs->cs_next; in sl_compress_tcp()
236 lastcs->cs_next = cs; in sl_compress_tcp()
251 oth = (struct tcphdr *)&((int32_t *)&cs->cs_ip)[hlen]; in sl_compress_tcp()
258 if (((u_int16_t *)ip)[0] != ((u_int16_t *)&cs->cs_ip)[0] || in sl_compress_tcp()
259 ((u_int16_t *)ip)[3] != ((u_int16_t *)&cs->cs_ip)[3] || in sl_compress_tcp()
260 ((u_int16_t *)ip)[4] != ((u_int16_t *)&cs->cs_ip)[4] || in sl_compress_tcp()
263 BCMP(ip + 1, &cs->cs_ip + 1, (deltaS - 5) << 2)) || in sl_compress_tcp()
317 if (ip->ip_len != cs->cs_ip.ip_len && in sl_compress_tcp()
318 ntohs(cs->cs_ip.ip_len) == hlen) in sl_compress_tcp()
333 deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { in sl_compress_tcp()
341 if (deltaS == ntohs(cs->cs_ip.ip_len) - hlen) { in sl_compress_tcp()
349 deltaS = ntohs(ip->ip_id) - ntohs(cs->cs_ip.ip_id); in sl_compress_tcp()
361 BCOPY(ip, &cs->cs_ip, hlen); in sl_compress_tcp()
374 if (compress_cid == 0 || comp->last_xmit != cs->cs_id) { in sl_compress_tcp()
375 comp->last_xmit = cs->cs_id; in sl_compress_tcp()
379 *cp++ = cs->cs_id; in sl_compress_tcp()
394 * Update connection state cs & send uncompressed packet ('uncompressed' in sl_compress_tcp()
399 BCOPY(ip, &cs->cs_ip, hlen); in sl_compress_tcp()
400 ip->ip_p = cs->cs_id; in sl_compress_tcp()
401 comp->last_xmit = cs->cs_id; in sl_compress_tcp()
456 struct cstate *cs; in sl_uncompress_tcp_core() local
466 cs = &comp->rstate[comp->last_recv = ip->ip_p]; in sl_uncompress_tcp_core()
479 BCOPY(ip, &cs->cs_ip, hlen); in sl_uncompress_tcp_core()
480 cs->cs_hlen = hlen; in sl_uncompress_tcp_core()
482 *hdrp = (u_char *) &cs->cs_ip; in sl_uncompress_tcp_core()
513 cs = &comp->rstate[comp->last_recv]; in sl_uncompress_tcp_core()
514 hlen = cs->cs_ip.ip_hl << 2; in sl_uncompress_tcp_core()
515 th = (struct tcphdr *)&((u_char *)&cs->cs_ip)[hlen]; in sl_uncompress_tcp_core()
526 u_int i = ntohs(cs->cs_ip.ip_len) - cs->cs_hlen; in sl_uncompress_tcp_core()
533 th->th_seq = htonl(ntohl(th->th_seq) + ntohs(cs->cs_ip.ip_len) in sl_uncompress_tcp_core()
534 - cs->cs_hlen); in sl_uncompress_tcp_core()
552 DECODES(cs->cs_ip.ip_id) in sl_uncompress_tcp_core()
554 cs->cs_ip.ip_id = htons(ntohs(cs->cs_ip.ip_id) + 1); in sl_uncompress_tcp_core()
568 total_len += cs->cs_hlen - vjlen; in sl_uncompress_tcp_core()
569 cs->cs_ip.ip_len = htons(total_len); in sl_uncompress_tcp_core()
572 bp = (u_int16_t *) &cs->cs_ip; in sl_uncompress_tcp_core()
573 cs->cs_ip.ip_sum = 0; in sl_uncompress_tcp_core()
578 cs->cs_ip.ip_sum = ~ changes; in sl_uncompress_tcp_core()
580 *hdrp = (u_char *) &cs->cs_ip; in sl_uncompress_tcp_core()
581 *hlenp = cs->cs_hlen; in sl_uncompress_tcp_core()