Lines Matching refs:th
168 struct tcp_hdr *th; in vj_compress_tcp() local
190 th = (struct tcp_hdr *)&((struct vj_u32_t*)ip)[ilen]; in vj_compress_tcp()
191 if ((TCPH_FLAGS(th) & (TCP_SYN|TCP_FIN|TCP_RST|TCP_ACK)) != TCP_ACK) { in vj_compress_tcp()
196 hlen = ilen + TCPH_HDRLEN(th); in vj_compress_tcp()
223 || (*(struct vj_u32_t*)th).v != (((struct vj_u32_t*)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]).v) { in vj_compress_tcp()
244 && (*(struct vj_u32_t*)th).v == (((struct vj_u32_t*)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]).v) { in vj_compress_tcp()
291 || TCPH_HDRLEN(th) != TCPH_HDRLEN(oth) in vj_compress_tcp()
293 || (TCPH_HDRLEN(th) > 5 && BCMP(th + 1, oth + 1, (TCPH_HDRLEN(th) - 5) << 2))) { in vj_compress_tcp()
303 if (TCPH_FLAGS(th) & TCP_URG) { in vj_compress_tcp()
304 deltaS = lwip_ntohs(th->urgp); in vj_compress_tcp()
307 } else if (th->urgp != oth->urgp) { in vj_compress_tcp()
315 if ((deltaS = (u16_t)(lwip_ntohs(th->wnd) - lwip_ntohs(oth->wnd))) != 0) { in vj_compress_tcp()
320 if ((deltaL = lwip_ntohl(th->ackno) - lwip_ntohl(oth->ackno)) != 0) { in vj_compress_tcp()
329 if ((deltaL = lwip_ntohl(th->seqno) - lwip_ntohl(oth->seqno)) != 0) { in vj_compress_tcp()
387 if (TCPH_FLAGS(th) & TCP_PSH) { in vj_compress_tcp()
394 deltaA = lwip_ntohs(th->chksum); in vj_compress_tcp()
500 struct tcp_hdr *th; in vj_uncompress_tcp() local
536 th = (struct tcp_hdr *)&((u8_t*)&cs->cs_ip)[hlen]; in vj_uncompress_tcp()
537 th->chksum = lwip_htons((*cp << 8) | cp[1]); in vj_uncompress_tcp()
540 TCPH_SET_FLAG(th, TCP_PSH); in vj_uncompress_tcp()
542 TCPH_UNSET_FLAG(th, TCP_PSH); in vj_uncompress_tcp()
550 tmp = lwip_ntohl(th->ackno) + i; in vj_uncompress_tcp()
551 th->ackno = lwip_htonl(tmp); in vj_uncompress_tcp()
552 tmp = lwip_ntohl(th->seqno) + i; in vj_uncompress_tcp()
553 th->seqno = lwip_htonl(tmp); in vj_uncompress_tcp()
559 tmp = lwip_ntohl(th->seqno) + lwip_ntohs(IPH_LEN(&cs->cs_ip)) - cs->cs_hlen; in vj_uncompress_tcp()
560 th->seqno = lwip_htonl(tmp); in vj_uncompress_tcp()
565 TCPH_SET_FLAG(th, TCP_URG); in vj_uncompress_tcp()
566 DECODEU(th->urgp); in vj_uncompress_tcp()
568 TCPH_UNSET_FLAG(th, TCP_URG); in vj_uncompress_tcp()
571 DECODES(th->wnd); in vj_uncompress_tcp()
574 DECODEL(th->ackno); in vj_uncompress_tcp()
577 DECODEL(th->seqno); in vj_uncompress_tcp()