Home | History | Annotate | Download | only in src

Lines Matching defs:th

166   register struct tcphdr *th;
183 th = (struct tcphdr *) & ((int *) ip)[hlen];
184 if ((th->th_flags & (TH_SYN | TH_FIN | TH_RST | TH_ACK)) != TH_ACK) {
185 log_Printf(LogDEBUG, "??? 2 th_flags = %x\n", th->th_flags);
200 *(int *) th != ((int *) &cs->cs_ip)[cs->cs_ip.ip_hl]) {
221 && *(int *) th == ((int *) &cs->cs_ip)[cs->cs_ip.ip_hl])
234 #define THOFFSET(th) (th->th_off)
235 hlen += th->th_off;
260 * but costless). The 4th line checks the TCP header length. The 5th line
261 * checks IP options, if any. The 6th line checks TCP options, if any. If
267 hlen += th->th_off;
275 THOFFSET(th) != THOFFSET(oth) ||
278 (THOFFSET(th) > 5 &&
279 memcmp(th + 1, oth + 1, (THOFFSET(th) - 5) << 2))) {
288 if (th->th_flags & TH_URG) {
289 deltaS = ntohs(th->th_urp);
292 } else if (th->th_urp != oth->th_urp) {
301 deltaS = (u_short) (ntohs(th->th_win) - ntohs(oth->th_win));
306 deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack);
314 deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq);
371 if (th->th_flags & TH_PUSH)
378 deltaA = ntohs(th->th_sum);
435 register struct tcphdr *th;
457 th = (struct tcphdr *) & ((char *) ip)[hlen];
458 hlen += THOFFSET(th) << 2;
502 th = (struct tcphdr *) & ((u_char *) & cs->cs_ip)[hlen];
503 th->th_sum = htons((*cp << 8) | cp[1]);
506 th->th_flags |= TH_PUSH;
508 th->th_flags &= ~TH_PUSH;
515 th->th_ack = htonl(ntohl(th->th_ack) + i);
516 th->th_seq = htonl(ntohl(th->th_seq) + i);
521 th->th_seq = htonl(ntohl(th->th_seq) + ntohs(cs->cs_ip.ip_len)
527 th->th_flags |= TH_URG;
528 DECODEU(th->th_urp)
530 th->th_flags &= ~TH_URG;
532 DECODES(th->th_win)
534 DECODEL(th->th_ack)
538 DECODEL(th->th_seq)
548 cs->cs_ip.ip_id, (u_long)ntohl(th->th_seq));