Lines Matching refs:cs

23  * Modified June 1993 by Paul Mackerras, paulus@cs.anu.edu.au,
164 struct cstate *cs = comp->last_cs->cs_next;
221 if (!ip4_addr_cmp(&ip->src, &cs->cs_ip.src)
222 || !ip4_addr_cmp(&ip->dest, &cs->cs_ip.dest)
223 || (*(struct vj_u32_t*)th).v != (((struct vj_u32_t*)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]).v) {
240 lcs = cs; cs = cs->cs_next;
242 if (ip4_addr_cmp(&ip->src, &cs->cs_ip.src)
243 && ip4_addr_cmp(&ip->dest, &cs->cs_ip.dest)
244 && (*(struct vj_u32_t*)th).v == (((struct vj_u32_t*)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]).v) {
247 } while (cs != lastcs);
265 if (cs == lastcs) {
268 lcs->cs_next = cs->cs_next;
269 cs->cs_next = lastcs->cs_next;
270 lastcs->cs_next = cs;
274 oth = (struct tcp_hdr *)&((struct vj_u32_t*)&cs->cs_ip)[ilen];
288 if ((((struct vj_u16_t*)ip)[0]).v != (((struct vj_u16_t*)&cs->cs_ip)[0]).v
289 || (((struct vj_u16_t*)ip)[3]).v != (((struct vj_u16_t*)&cs->cs_ip)[3]).v
290 || (((struct vj_u16_t*)ip)[4]).v != (((struct vj_u16_t*)&cs->cs_ip)[4]).v
292 || (deltaS > 5 && BCMP(ip + 1, &cs->cs_ip + 1, (deltaS - 5) << 2))
348 if (IPH_LEN(ip) != IPH_LEN(&cs->cs_ip) &&
349 lwip_ntohs(IPH_LEN(&cs->cs_ip)) == hlen) {
364 if (deltaS == deltaA && deltaS == lwip_ntohs(IPH_LEN(&cs->cs_ip)) - hlen) {
372 if (deltaS == lwip_ntohs(IPH_LEN(&cs->cs_ip)) - hlen) {
382 deltaS = (u16_t)(lwip_ntohs(IPH_ID(ip)) - lwip_ntohs(IPH_ID(&cs->cs_ip)));
395 MEMCPY(&cs->cs_ip, ip, hlen);
407 if (!comp->compressSlot || comp->last_xmit != cs->cs_id) {
408 comp->last_xmit = cs->cs_id;
416 *cp++ = cs->cs_id;
433 * Update connection state cs & send uncompressed packet (that is,
438 MEMCPY(&cs->cs_ip, ip, hlen);
439 IPH_PROTO_SET(ip, cs->cs_id);
440 comp->last_xmit = cs->cs_id;
462 struct cstate *cs;
477 cs = &comp->rstate[comp->last_recv = IPH_PROTO(ip)];
480 /* copy from/to bigger buffers checked above instead of cs->cs_ip and ip
482 MEMCPY(&cs->cs_hdr, nb->payload, hlen);
483 cs->cs_hlen = (u16_t)hlen;
501 struct cstate *cs;
534 cs = &comp->rstate[comp->last_recv];
535 hlen = IPH_HL(&cs->cs_ip) << 2;
536 th = (struct tcp_hdr *)&((u8_t*)&cs->cs_ip)[hlen];
548 u32_t i = lwip_ntohs(IPH_LEN(&cs->cs_ip)) - cs->cs_hlen;
559 tmp = lwip_ntohl(th->seqno) + lwip_ntohs(IPH_LEN(&cs->cs_ip)) - cs->cs_hlen;
582 DECODES(cs->cs_ip._id);
584 IPH_ID_SET(&cs->cs_ip, lwip_ntohs(IPH_ID(&cs->cs_ip)) + 1);
585 IPH_ID_SET(&cs->cs_ip, lwip_htons(IPH_ID(&cs->cs_ip)));
605 tmp = n0->tot_len - vjlen + cs->cs_hlen;
606 IPH_LEN_SET(&cs->cs_ip, lwip_htons((u16_t)tmp));
608 IPH_LEN_SET(&cs->cs_ip, lwip_htons(n0->tot_len - vjlen + cs->cs_hlen));
612 bp = (struct vj_u16_t*) &cs->cs_ip;
613 IPH_CHKSUM_SET(&cs->cs_ip, 0);
619 IPH_CHKSUM_SET(&cs->cs_ip, (u16_t)(~tmp));
636 np = pbuf_alloc(PBUF_LINK, n0->len + cs->cs_hlen, PBUF_POOL);
638 np = pbuf_alloc(PBUF_RAW, n0->len + cs->cs_hlen, PBUF_POOL);
645 if (pbuf_remove_header(np, cs->cs_hlen)) {
661 if (pbuf_add_header(n0, cs->cs_hlen)) {
664 LWIP_ASSERT("vj_uncompress_tcp: cs->cs_hlen <= PBUF_POOL_BUFSIZE", cs->cs_hlen <= PBUF_POOL_BUFSIZE);
665 np = pbuf_alloc(PBUF_RAW, cs->cs_hlen, PBUF_POOL);
673 LWIP_ASSERT("n0->len >= cs->cs_hlen", n0->len >= cs->cs_hlen);
674 MEMCPY(n0->payload, &cs->cs_ip, cs->cs_hlen);