Lines Matching refs:th
182 register struct tcphdr *th;
197 th = (struct tcphdr *)&((int *)ip)[hlen];
198 if ((th->th_flags & (TH_SYN|TH_FIN|TH_RST|TH_ACK)) != TH_ACK)
210 *(int *)th != ((int *)&cs->cs_ip)[getip_hl(cs->cs_ip)]) {
231 && *(int *)th == ((int *)&cs->cs_ip)[getip_hl(cs->cs_ip)])
245 hlen += getth_off(*th);
269 * check is unnecessary but costless). The 4th line checks the TCP
270 * header length. The 5th line checks IP options, if any. The 6th
277 hlen += getth_off(*th);
285 getth_off(*th) != getth_off(*oth) ||
287 (getth_off(*th) > 5 && BCMP(th + 1, oth + 1, (getth_off(*th) - 5) << 2)))
296 if (th->th_flags & TH_URG) {
297 deltaS = ntohs(th->th_urp);
300 } else if (th->th_urp != oth->th_urp)
307 if ((deltaS = (u_short)(ntohs(th->th_win) - ntohs(oth->th_win))) > 0) {
312 if ((deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack)) > 0) {
319 if ((deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq)) > 0) {
373 if (th->th_flags & TH_PUSH)
379 deltaA = ntohs(th->th_sum);
484 register struct tcphdr *th;
512 th = (struct tcphdr *)&((u_char *)&cs->cs_ip)[hlen];
513 th->th_sum = htons((*cp << 8) | cp[1]);
516 th->th_flags |= TH_PUSH;
518 th->th_flags &=~ TH_PUSH;
525 tmp = ntohl(th->th_ack) + i;
526 th->th_ack = htonl(tmp);
527 tmp = ntohl(th->th_seq) + i;
528 th->th_seq = htonl(tmp);
534 tmp = ntohl(th->th_seq) + ntohs(cs->cs_ip.ip_len) - cs->cs_hlen;
535 th->th_seq = htonl(tmp);
540 th->th_flags |= TH_URG;
541 DECODEU(th->th_urp);
543 th->th_flags &=~ TH_URG;
545 DECODES(th->th_win);
547 DECODEL(th->th_ack);
549 DECODEL(th->th_seq);