Lines Matching refs:th
186 register struct tcphdr *th;
201 th = (struct tcphdr *)&((int32_t *)ip)[hlen];
202 if ((th->th_flags & (TH_SYN|TH_FIN|TH_RST|TH_ACK)) != TH_ACK)
214 *(int32_t *)th != ((int32_t *)&cs->cs_ip)[cs->cs_ip.ip_hl]) {
235 && *(int32_t *)th ==
250 hlen += th->th_off;
274 * check is unnecessary but costless). The 4th line checks the TCP
275 * header length. The 5th line checks IP options, if any. The 6th
282 hlen += th->th_off;
290 th->th_off != oth->th_off ||
293 (th->th_off > 5 &&
294 BCMP(th + 1, oth + 1, (th->th_off - 5) << 2)))
303 if (th->th_flags & TH_URG) {
304 deltaS = ntohs(th->th_urp);
307 } else if (th->th_urp != oth->th_urp)
314 deltaS = (u_int16_t)(ntohs(th->th_win) - ntohs(oth->th_win));
320 deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack);
328 deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq);
384 if (th->th_flags & TH_PUSH)
390 deltaA = ntohs(th->th_sum);
502 register struct tcphdr *th;
563 th = ALIGNED_CAST(struct tcphdr *)&((u_char *)&cs->cs_ip)[hlen];
564 th->th_sum = htons((*cp << 8) | cp[1]);
567 th->th_flags |= TH_PUSH;
569 th->th_flags &=~ TH_PUSH;
575 th->th_ack = htonl(ntohl(th->th_ack) + i);
576 th->th_seq = htonl(ntohl(th->th_seq) + i);
581 th->th_seq = htonl(ntohl(th->th_seq) + ntohs(cs->cs_ip.ip_len)
587 th->th_flags |= TH_URG;
588 DECODEU(th->th_urp)
590 th->th_flags &=~ TH_URG;
592 DECODES(th->th_win)
594 DECODEL(th->th_ack)
596 DECODEL(th->th_seq)