Lines Matching refs:th

157 	struct tcphdr *th;  in sl_compress_tcp()  local
172 th = (struct tcphdr *)&((int32_t *)ip)[hlen]; in sl_compress_tcp()
173 if ((tcp_get_flags(th) & (TH_SYN|TH_FIN|TH_RST|TH_ACK)) != TH_ACK) in sl_compress_tcp()
185 *(int32_t *)th != ((int32_t *)&cs->cs_ip)[cs->cs_ip.ip_hl]) { in sl_compress_tcp()
206 && *(int32_t *)th == in sl_compress_tcp()
221 hlen += th->th_off; in sl_compress_tcp()
253 hlen += th->th_off; in sl_compress_tcp()
261 th->th_off != oth->th_off || in sl_compress_tcp()
264 (th->th_off > 5 && in sl_compress_tcp()
265 BCMP(th + 1, oth + 1, (th->th_off - 5) << 2))) in sl_compress_tcp()
274 if (tcp_get_flags(th) & TH_URG) { in sl_compress_tcp()
275 deltaS = ntohs(th->th_urp); in sl_compress_tcp()
278 } else if (th->th_urp != oth->th_urp) in sl_compress_tcp()
285 deltaS = (u_int16_t)(ntohs(th->th_win) - ntohs(oth->th_win)); in sl_compress_tcp()
291 deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack); in sl_compress_tcp()
299 deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq); in sl_compress_tcp()
354 if (tcp_get_flags(th) & TH_PUSH) in sl_compress_tcp()
360 deltaA = ntohs(th->th_sum); in sl_compress_tcp()
455 struct tcphdr *th; in sl_uncompress_tcp_core() local
515 th = (struct tcphdr *)&((u_char *)&cs->cs_ip)[hlen]; in sl_uncompress_tcp_core()
516 th->th_sum = htons((*cp << 8) | cp[1]); in sl_uncompress_tcp_core()
519 tcp_set_flags(th, tcp_get_flags(th) | TH_PUSH); in sl_uncompress_tcp_core()
521 tcp_set_flags(th, tcp_get_flags(th) & ~TH_PUSH); in sl_uncompress_tcp_core()
527 th->th_ack = htonl(ntohl(th->th_ack) + i); in sl_uncompress_tcp_core()
528 th->th_seq = htonl(ntohl(th->th_seq) + i); 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()
539 tcp_set_flags(th, tcp_get_flags(th) | TH_URG); in sl_uncompress_tcp_core()
540 DECODEU(th->th_urp) in sl_uncompress_tcp_core()
542 tcp_set_flags(th, tcp_get_flags(th) & ~TH_URG); in sl_uncompress_tcp_core()
544 DECODES(th->th_win) in sl_uncompress_tcp_core()
546 DECODEL(th->th_ack) in sl_uncompress_tcp_core()
548 DECODEL(th->th_seq) in sl_uncompress_tcp_core()