th 91 compat/linux/linux_cdrom.c struct ioc_toc_header th; th 100 compat/linux/linux_cdrom.c struct linux_cdrom_tochdr th; th 126 compat/linux/linux_cdrom.c (caddr_t)&tmpb.th, p); th 129 compat/linux/linux_cdrom.c tmpl.th.cdth_trk0 = tmpb.th.starting_track; th 130 compat/linux/linux_cdrom.c tmpl.th.cdth_trk1 = tmpb.th.ending_track; th 131 compat/linux/linux_cdrom.c error = copyout(&tmpl, SCARG(uap, data), sizeof tmpl.th); th 413 dev/ic/acxreg.h struct tim_head th; th 418 dev/ic/acxreg.h #define tim_eid data.u_data.th.eid th 419 dev/ic/acxreg.h #define tim_len data.u_data.th.len th 420 dev/ic/acxreg.h #define tim_dtim_count data.u_data.th.dtim_count th 421 dev/ic/acxreg.h #define tim_dtim_period data.u_data.th.dtim_period th 422 dev/ic/acxreg.h #define tim_bitmap_ctrl data.u_data.th.bitmap_ctrl th 447 dev/ic/acxvar.h struct acx_rx_radiotap_hdr th; th 450 dev/ic/acxvar.h #define sc_rxtap sc_rxtapu.th th 454 dev/ic/acxvar.h struct acx_tx_radiotap_hdr th; th 457 dev/ic/acxvar.h #define sc_txtap sc_txtapu.th th 244 dev/ic/athvar.h struct ath_rx_radiotap_header th; th 247 dev/ic/athvar.h #define sc_rxtap sc_rxtapu.th th 251 dev/ic/athvar.h struct ath_tx_radiotap_header th; th 254 dev/ic/athvar.h #define sc_txtap sc_txtapu.th th 114 dev/ic/malo.h struct malo_rx_radiotap_hdr th; th 117 dev/ic/malo.h #define sc_rxtap sc_rxtapu.th th 121 dev/ic/malo.h struct malo_tx_radiotap_hdr th; th 124 dev/ic/malo.h #define sc_txtap sc_txtapu.th th 200 dev/ic/pgtvar.h struct pgt_rx_radiotap_hdr th; th 203 dev/ic/pgtvar.h #define sc_rxtap sc_rxtapu.th th 207 dev/ic/pgtvar.h struct pgt_tx_radiotap_hdr th; th 210 dev/ic/pgtvar.h #define sc_txtap sc_txtapu.th th 152 dev/ic/rt2560var.h struct rt2560_rx_radiotap_header th; th 155 dev/ic/rt2560var.h #define sc_rxtap sc_rxtapu.th th 159 dev/ic/rt2560var.h struct rt2560_tx_radiotap_header th; th 162 dev/ic/rt2560var.h #define sc_txtap sc_txtapu.th th 163 dev/ic/rt2661var.h struct rt2661_rx_radiotap_header th; th 166 dev/ic/rt2661var.h #define sc_rxtap sc_rxtapu.th th 170 dev/ic/rt2661var.h struct rt2661_tx_radiotap_header th; th 173 dev/ic/rt2661var.h #define sc_txtap sc_txtapu.th th 1374 dev/isa/mcd.c mcd_toc_header(sc, th) th 1376 dev/isa/mcd.c struct ioc_toc_header *th; th 1383 dev/isa/mcd.c th->len = msf2hsg(sc->volinfo.vol_msf, 0); th 1384 dev/isa/mcd.c th->starting_track = bcd2bin(sc->volinfo.trk_low); th 1385 dev/isa/mcd.c th->ending_track = bcd2bin(sc->volinfo.trk_high); th 1394 dev/isa/mcd.c struct ioc_toc_header th; th 1398 dev/isa/mcd.c if ((error = mcd_toc_header(sc, &th)) != 0) th 1408 dev/isa/mcd.c for (trk = th.starting_track; trk <= th.ending_track; trk++) th 1410 dev/isa/mcd.c trk = th.ending_track - th.starting_track + 1; th 1432 dev/isa/mcd.c idx = th.ending_track + 1; th 148 dev/pci/if_ipwvar.h struct ipw_rx_radiotap_header th; th 151 dev/pci/if_ipwvar.h #define sc_rxtap sc_rxtapu.th th 155 dev/pci/if_ipwvar.h struct ipw_tx_radiotap_header th; th 158 dev/pci/if_ipwvar.h #define sc_txtap sc_txtapu.th th 132 dev/pci/if_iwivar.h struct iwi_rx_radiotap_header th; th 135 dev/pci/if_iwivar.h #define sc_rxtap sc_rxtapu.th th 139 dev/pci/if_iwivar.h struct iwi_tx_radiotap_header th; th 142 dev/pci/if_iwivar.h #define sc_txtap sc_txtapu.th th 176 dev/pci/if_wpivar.h struct wpi_rx_radiotap_header th; th 179 dev/pci/if_wpivar.h #define sc_rxtap sc_rxtapu.th th 183 dev/pci/if_wpivar.h struct wpi_tx_radiotap_header th; th 186 dev/pci/if_wpivar.h #define sc_txtap sc_txtapu.th th 128 dev/usb/if_ralvar.h struct ural_rx_radiotap_header th; th 131 dev/usb/if_ralvar.h #define sc_rxtap sc_rxtapu.th th 135 dev/usb/if_ralvar.h struct ural_tx_radiotap_header th; th 138 dev/usb/if_ralvar.h #define sc_txtap sc_txtapu.th th 135 dev/usb/if_rumvar.h struct rum_rx_radiotap_header th; th 138 dev/usb/if_rumvar.h #define sc_rxtap sc_rxtapu.th th 142 dev/usb/if_rumvar.h struct rum_tx_radiotap_header th; th 145 dev/usb/if_rumvar.h #define sc_txtap sc_txtapu.th th 150 dev/usb/if_uathvar.h struct uath_rx_radiotap_header th; th 153 dev/usb/if_uathvar.h #define sc_rxtap sc_rxtapu.th th 157 dev/usb/if_uathvar.h struct uath_tx_radiotap_header th; th 160 dev/usb/if_uathvar.h #define sc_txtap sc_txtapu.th th 1214 dev/usb/if_zydreg.h struct zyd_rx_radiotap_header th; th 1217 dev/usb/if_zydreg.h #define sc_rxtap sc_rxtapu.th th 1221 dev/usb/if_zydreg.h struct zyd_tx_radiotap_header th; th 1224 dev/usb/if_zydreg.h #define sc_txtap sc_txtapu.th th 108 kern/kern_tc.c tc_delta(struct timehands *th) th 112 kern/kern_tc.c tc = th->th_counter; th 113 kern/kern_tc.c return ((tc->tc_get_timecount(tc) - th->th_offset_count) & th 126 kern/kern_tc.c struct timehands *th; th 130 kern/kern_tc.c th = timehands; th 131 kern/kern_tc.c gen = th->th_generation; th 132 kern/kern_tc.c *bt = th->th_offset; th 133 kern/kern_tc.c bintime_addx(bt, th->th_scale * tc_delta(th)); th 134 kern/kern_tc.c } while (gen == 0 || gen != th->th_generation); th 184 kern/kern_tc.c struct timehands *th; th 188 kern/kern_tc.c th = timehands; th 189 kern/kern_tc.c gen = th->th_generation; th 190 kern/kern_tc.c bintime2timespec(&th->th_offset, tsp); th 191 kern/kern_tc.c } while (gen == 0 || gen != th->th_generation); th 197 kern/kern_tc.c struct timehands *th; th 201 kern/kern_tc.c th = timehands; th 202 kern/kern_tc.c gen = th->th_generation; th 203 kern/kern_tc.c bintime2timeval(&th->th_offset, tvp); th 204 kern/kern_tc.c } while (gen == 0 || gen != th->th_generation); th 210 kern/kern_tc.c struct timehands *th; th 214 kern/kern_tc.c th = timehands; th 215 kern/kern_tc.c gen = th->th_generation; th 216 kern/kern_tc.c *tsp = th->th_nanotime; th 217 kern/kern_tc.c } while (gen == 0 || gen != th->th_generation); th 223 kern/kern_tc.c struct timehands *th; th 227 kern/kern_tc.c th = timehands; th 228 kern/kern_tc.c gen = th->th_generation; th 229 kern/kern_tc.c *tvp = th->th_microtime; th 230 kern/kern_tc.c } while (gen == 0 || gen != th->th_generation); th 318 kern/kern_tc.c struct timehands *th, *tho; th 332 kern/kern_tc.c th = tho->th_next; th 333 kern/kern_tc.c ogen = th->th_generation; th 334 kern/kern_tc.c th->th_generation = 0; th 335 kern/kern_tc.c bcopy(tho, th, offsetof(struct timehands, th_generation)); th 342 kern/kern_tc.c delta = tc_delta(th); th 343 kern/kern_tc.c if (th->th_counter != timecounter) th 347 kern/kern_tc.c th->th_offset_count += delta; th 348 kern/kern_tc.c th->th_offset_count &= th->th_counter->tc_counter_mask; th 349 kern/kern_tc.c bintime_addx(&th->th_offset, th->th_scale * delta); th 373 kern/kern_tc.c bt = th->th_offset; th 379 kern/kern_tc.c ntp_update_second(&th->th_adjustment, &bt.sec); th 383 kern/kern_tc.c bintime2timeval(&bt, &th->th_microtime); th 384 kern/kern_tc.c bintime2timespec(&bt, &th->th_nanotime); th 387 kern/kern_tc.c if (th->th_counter != timecounter) { th 388 kern/kern_tc.c th->th_counter = timecounter; th 389 kern/kern_tc.c th->th_offset_count = ncount; th 416 kern/kern_tc.c scale += (th->th_adjustment / 1024) * 2199; th 417 kern/kern_tc.c scale /= th->th_counter->tc_frequency; th 418 kern/kern_tc.c th->th_scale = scale * 2; th 426 kern/kern_tc.c th->th_generation = ogen; th 429 kern/kern_tc.c time_second = th->th_microtime.tv_sec; th 430 kern/kern_tc.c time_uptime = th->th_offset.sec; th 431 kern/kern_tc.c timehands = th; th 655 net/if_spppsubr.c struct tcphdr *th = NULL; th 662 net/if_spppsubr.c th = (struct tcphdr *) th 690 net/if_spppsubr.c (th && (INTERACTIVE(ntohs(th->th_sport)) || th 691 net/if_spppsubr.c INTERACTIVE(ntohs(th->th_dport)))))) th 778 net/if_tun.c u_int32_t *th; th 790 net/if_tun.c (tp->tun_flags & TUN_LAYER2 ? ETHER_HDR_LEN : sizeof(*th))) { th 864 net/if_tun.c th = mtod(top, u_int32_t *); th 866 net/if_tun.c top->m_data += sizeof(*th); th 867 net/if_tun.c top->m_len -= sizeof(*th); th 868 net/if_tun.c top->m_pkthdr.len -= sizeof(*th); th 870 net/if_tun.c switch (ntohl(*th)) { th 1505 net/pf.c struct tcphdr *th, struct pf_state_peer *dst) th 1507 net/pf.c int hlen = (th->th_off << 2) - sizeof(*th), thoptlen = hlen; th 1514 net/pf.c !pf_pull_hdr(m, off + sizeof(*th), opts, hlen, NULL, NULL, pd->af)) th 1532 net/pf.c pf_change_a(&sack.start, &th->th_sum, th 1535 net/pf.c pf_change_a(&sack.end, &th->th_sum, th 1552 net/pf.c m_copyback(m, off + sizeof(*th), thoptlen, opts); th 1571 net/pf.c struct tcphdr *th; th 1625 net/pf.c th = (struct tcphdr *)((caddr_t)h + sizeof(struct ip)); th 1638 net/pf.c th = (struct tcphdr *)((caddr_t)h6 + sizeof(struct ip6_hdr)); th 1644 net/pf.c th->th_sport = sport; th 1645 net/pf.c th->th_dport = dport; th 1646 net/pf.c th->th_seq = htonl(seq); th 1647 net/pf.c th->th_ack = htonl(ack); th 1648 net/pf.c th->th_off = tlen >> 2; th 1649 net/pf.c th->th_flags = flags; th 1650 net/pf.c th->th_win = htons(win); th 1653 net/pf.c opt = (char *)(th + 1); th 1664 net/pf.c th->th_sum = in_cksum(m, len); th 1701 net/pf.c th->th_sum = in6_cksum(m, IPPROTO_TCP, th 2852 net/pf.c struct tcphdr *th = pd->hdr.tcp; th 2872 net/pf.c sport = th->th_sport; th 2873 net/pf.c dport = th->th_dport; th 2874 net/pf.c hdrlen = sizeof(*th); th 2925 net/pf.c pf_change_ap(saddr, &th->th_sport, pd->ip_sum, th 2926 net/pf.c &th->th_sum, &pd->naddr, nport, 0, af); th 2927 net/pf.c sport = th->th_sport; th 2983 net/pf.c pf_change_ap(daddr, &th->th_dport, pd->ip_sum, th 2984 net/pf.c &th->th_sum, &pd->naddr, nport, 0, af); th 2985 net/pf.c dport = th->th_dport; th 3066 net/pf.c (r->flagset & th->th_flags) != r->flags) th 3086 net/pf.c pf_osfp_fingerprint(pd, m, off, th), th 3132 net/pf.c pf_change_ap(saddr, &th->th_sport, th 3133 net/pf.c pd->ip_sum, &th->th_sum, th 3135 net/pf.c sport = th->th_sport; th 3167 net/pf.c pf_change_ap(daddr, &th->th_dport, th 3168 net/pf.c pd->ip_sum, &th->th_sum, th 3170 net/pf.c dport = th->th_dport; th 3204 net/pf.c !(th->th_flags & TH_RST)) { th 3205 net/pf.c u_int32_t ack = ntohl(th->th_seq) + pd->p_len; th 3212 net/pf.c if (th->th_flags & TH_SYN) th 3214 net/pf.c if (th->th_flags & TH_FIN) th 3217 net/pf.c pd->src, th->th_dport, th->th_sport, th 3218 net/pf.c ntohl(th->th_ack), ack, TH_RST|TH_ACK, 0, 0, th 3299 net/pf.c len = pd->tot_len - off - (th->th_off << 2); th 3300 net/pf.c s->src.seqlo = ntohl(th->th_seq); th 3302 net/pf.c if ((th->th_flags & (TH_SYN|TH_ACK)) == th 3308 net/pf.c pf_change_a(&th->th_seq, &th->th_sum, th 3313 net/pf.c if (th->th_flags & TH_SYN) { th 3316 net/pf.c th->th_off, af); th 3318 net/pf.c s->src.max_win = MAX(ntohs(th->th_win), 1); th 3326 net/pf.c if (th->th_flags & TH_FIN) th 3365 net/pf.c pf_normalize_tcp_init(m, off, pd, th, &s->src, th 3375 net/pf.c th, s, &s->src, &s->dst, &rewrite)) { th 3459 net/pf.c (th->th_flags & (TH_SYN|TH_ACK)) == TH_SYN && th 3464 net/pf.c pf_change_ap(saddr, &th->th_sport, th 3465 net/pf.c pd->ip_sum, &th->th_sum, &pd->baddr, th 3467 net/pf.c sport = th->th_sport; th 3469 net/pf.c pf_change_ap(daddr, &th->th_dport, th 3470 net/pf.c pd->ip_sum, &th->th_sum, &pd->baddr, th 3472 net/pf.c sport = th->th_dport; th 3477 net/pf.c mss = pf_get_mss(m, off, th->th_off, af); th 3481 net/pf.c pf_send_tcp(r, af, daddr, saddr, th->th_dport, th 3482 net/pf.c th->th_sport, s->src.seqhi, ntohl(th->th_seq) + 1, th 3580 net/pf.c struct tcphdr *th = pd->hdr.tcp; th 3581 net/pf.c u_int16_t win = ntohs(th->th_win); th 3593 net/pf.c key.ext.port = th->th_sport; th 3594 net/pf.c key.gwy.port = th->th_dport; th 3598 net/pf.c key.lan.port = th->th_sport; th 3599 net/pf.c key.ext.port = th->th_dport; th 3617 net/pf.c if (th->th_flags & TH_SYN) { th 3618 net/pf.c if (ntohl(th->th_seq) != (*state)->src.seqlo) { th 3623 net/pf.c pd->src, th->th_dport, th->th_sport, th 3624 net/pf.c (*state)->src.seqhi, ntohl(th->th_seq) + 1, th 3629 net/pf.c } else if (!(th->th_flags & TH_ACK) || th 3630 net/pf.c (ntohl(th->th_ack) != (*state)->src.seqhi + 1) || th 3631 net/pf.c (ntohl(th->th_seq) != (*state)->src.seqlo + 1)) { th 3652 net/pf.c if (((th->th_flags & (TH_SYN|TH_ACK)) != TH_ACK) || th 3653 net/pf.c (ntohl(th->th_ack) != (*state)->src.seqhi + 1) || th 3654 net/pf.c (ntohl(th->th_seq) != (*state)->src.seqlo + 1)) { th 3658 net/pf.c (*state)->src.max_win = MAX(ntohs(th->th_win), 1); th 3667 net/pf.c } else if (((th->th_flags & (TH_SYN|TH_ACK)) != th 3669 net/pf.c (ntohl(th->th_ack) != (*state)->dst.seqhi + 1)) { th 3673 net/pf.c (*state)->dst.max_win = MAX(ntohs(th->th_win), 1); th 3674 net/pf.c (*state)->dst.seqlo = ntohl(th->th_seq); th 3676 net/pf.c pd->src, th->th_dport, th->th_sport, th 3677 net/pf.c ntohl(th->th_ack), ntohl(th->th_seq) + 1, th 3701 net/pf.c if (src->wscale && dst->wscale && !(th->th_flags & TH_SYN)) { th 3713 net/pf.c orig_seq = seq = ntohl(th->th_seq); th 3719 net/pf.c if (pf_normalize_tcp_init(m, off, pd, th, src, dst)) { th 3729 net/pf.c ack = ntohl(th->th_ack) - dst->seqdiff; th 3730 net/pf.c pf_change_a(&th->th_seq, &th->th_sum, htonl(seq + th 3732 net/pf.c pf_change_a(&th->th_ack, &th->th_sum, htonl(ack), 0); th 3735 net/pf.c ack = ntohl(th->th_ack); th 3739 net/pf.c if (th->th_flags & TH_SYN) { th 3742 net/pf.c src->wscale = pf_get_wscale(m, off, th->th_off, th 3760 net/pf.c if (th->th_flags & TH_FIN) th 3779 net/pf.c ack = ntohl(th->th_ack) - dst->seqdiff; th 3782 net/pf.c pf_change_a(&th->th_seq, &th->th_sum, htonl(seq + th 3784 net/pf.c pf_change_a(&th->th_ack, &th->th_sum, htonl(ack), 0); th 3788 net/pf.c if (th->th_flags & TH_SYN) th 3790 net/pf.c if (th->th_flags & TH_FIN) th 3794 net/pf.c if ((th->th_flags & TH_ACK) == 0) { th 3798 net/pf.c (th->th_flags & (TH_ACK|TH_RST)) == (TH_ACK|TH_RST)) || th 3829 net/pf.c if (dst->seqdiff && (th->th_off << 2) > sizeof(struct tcphdr)) { th 3830 net/pf.c if (pf_modulate_sack(m, off, pd, th, dst)) th 3844 net/pf.c ((th->th_flags & TH_RST) == 0 || orig_seq == src->seqlo || th 3849 net/pf.c if (pf_normalize_tcp_stateful(m, off, pd, reason, th, th 3866 net/pf.c if (th->th_flags & TH_SYN) th 3869 net/pf.c if (th->th_flags & TH_FIN) th 3872 net/pf.c if (th->th_flags & TH_ACK) { th 3884 net/pf.c if (th->th_flags & TH_RST) th 3938 net/pf.c pf_print_flags(th->th_flags); th 3946 net/pf.c if (pf_normalize_tcp_stateful(m, off, pd, reason, th, th 3966 net/pf.c if (th->th_flags & TH_FIN) th 3969 net/pf.c if (th->th_flags & TH_RST) th 3978 net/pf.c if (!(th->th_flags & TH_RST)) th 3980 net/pf.c pd->dst, pd->src, th->th_dport, th 3981 net/pf.c th->th_sport, ntohl(th->th_ack), 0, th 3991 net/pf.c pf_print_flags(th->th_flags); th 4017 net/pf.c pf_change_ap(pd->src, &th->th_sport, pd->ip_sum, th 4018 net/pf.c &th->th_sum, &(*state)->state_key->gwy.addr, th 4021 net/pf.c pf_change_ap(pd->dst, &th->th_dport, pd->ip_sum, th 4022 net/pf.c &th->th_sum, &(*state)->state_key->lan.addr, th 4024 net/pf.c m_copyback(m, off, sizeof(*th), th); th 4027 net/pf.c m_copyback(m, off, sizeof(*th), th); th 4329 net/pf.c struct tcphdr th; th 4340 net/pf.c if (!pf_pull_hdr(m, off2, &th, 8, NULL, reason, th 4353 net/pf.c key.ext.port = th.th_dport; th 4354 net/pf.c key.gwy.port = th.th_sport; th 4358 net/pf.c key.lan.port = th.th_dport; th 4359 net/pf.c key.ext.port = th.th_sport; th 4378 net/pf.c seq = ntohl(th.th_seq) - src->seqdiff; th 4380 net/pf.c pf_change_a(&th.th_seq, icmpsum, th 4403 net/pf.c pf_change_icmp(pd2.src, &th.th_sport, th 4409 net/pf.c pf_change_icmp(pd2.dst, &th.th_dport, th 4438 net/pf.c m_copyback(m, off2, 8, &th); th 5425 net/pf.c struct tcphdr th; th 5427 net/pf.c pd.hdr.tcp = &th; th 5428 net/pf.c if (!pf_pull_hdr(m, off, &th, sizeof(th), th 5433 net/pf.c pd.p_len = pd.tot_len - off - (th.th_off << 2); th 5434 net/pf.c if ((th.th_flags & TH_ACK) && pd.p_len == 0) th 5802 net/pf.c struct tcphdr th; th 5804 net/pf.c pd.hdr.tcp = &th; th 5805 net/pf.c if (!pf_pull_hdr(m, off, &th, sizeof(th), th 5810 net/pf.c pd.p_len = pd.tot_len - off - (th.th_off << 2); th 1225 net/pf_norm.c struct tcphdr *th = pd->hdr.tcp; th 1246 net/pf_norm.c r->src.port[0], r->src.port[1], th->th_sport)) th 1252 net/pf_norm.c r->dst.port[0], r->dst.port[1], th->th_dport)) th 1255 net/pf_norm.c pf_osfp_fingerprint(pd, m, off, th), th 1274 net/pf_norm.c flags = th->th_flags; th 1295 net/pf_norm.c if (th->th_off < (sizeof(struct tcphdr) >> 2)) th 1299 net/pf_norm.c if (flags != th->th_flags || th->th_x2 != 0) { th 1302 net/pf_norm.c ov = *(u_int16_t *)(&th->th_ack + 1); th 1303 net/pf_norm.c th->th_flags = flags; th 1304 net/pf_norm.c th->th_x2 = 0; th 1305 net/pf_norm.c nv = *(u_int16_t *)(&th->th_ack + 1); th 1307 net/pf_norm.c th->th_sum = pf_cksum_fixup(th->th_sum, ov, nv, 0); th 1312 net/pf_norm.c if (!(flags & TH_URG) && th->th_urp) { th 1313 net/pf_norm.c th->th_sum = pf_cksum_fixup(th->th_sum, th->th_urp, 0, 0); th 1314 net/pf_norm.c th->th_urp = 0; th 1319 net/pf_norm.c if (r->max_mss && pf_normalize_tcpopt(r, m, th, off)) th 1324 net/pf_norm.c m_copyback(m, off, sizeof(*th), th); th 1337 net/pf_norm.c struct tcphdr *th, struct pf_state_peer *src, struct pf_state_peer *dst) th 1372 net/pf_norm.c if ((th->th_flags & TH_SYN) == 0) th 1376 net/pf_norm.c if (th->th_off > (sizeof(struct tcphdr) >> 2) && src->scrub && th 1377 net/pf_norm.c pf_pull_hdr(m, off, hdr, th->th_off << 2, NULL, NULL, pd->af)) { th 1381 net/pf_norm.c hlen = (th->th_off << 2) - sizeof(struct tcphdr); th 1431 net/pf_norm.c u_short *reason, struct tcphdr *th, struct pf_state *state, th 1474 net/pf_norm.c if (th->th_off > (sizeof(struct tcphdr) >> 2) && th 1477 net/pf_norm.c pf_pull_hdr(m, off, hdr, th->th_off << 2, NULL, NULL, pd->af)) { th 1481 net/pf_norm.c hlen = (th->th_off << 2) - sizeof(struct tcphdr); th 1513 net/pf_norm.c &th->th_sum, th 1529 net/pf_norm.c &th->th_sum, htonl(tsecr), th 1546 net/pf_norm.c (th->th_off << 2) - sizeof(struct tcphdr), hdr + th 1701 net/pf_norm.c pf_print_flags(th->th_flags); th 1710 net/pf_norm.c } else if (!got_ts && (th->th_flags & TH_RST) == 0 && th 1712 net/pf_norm.c || pd->p_len > 0 || (th->th_flags & TH_SYN)) && th 1751 net/pf_norm.c pf_print_flags(th->th_flags); th 1781 net/pf_norm.c pf_print_flags(th->th_flags); th 1821 net/pf_norm.c pf_normalize_tcpopt(struct pf_rule *r, struct mbuf *m, struct tcphdr *th, th 1830 net/pf_norm.c thoff = th->th_off << 2; th 1851 net/pf_norm.c th->th_sum = pf_cksum_fixup(th->th_sum, th 183 net/slcompress.c struct tcphdr *th; th 198 net/slcompress.c th = (struct tcphdr *)&((int32_t *)ip)[hlen]; th 199 net/slcompress.c if ((th->th_flags & (TH_SYN|TH_FIN|TH_RST|TH_ACK)) != TH_ACK) th 211 net/slcompress.c *(int32_t *)th != ((int32_t *)&cs->cs_ip)[cs->cs_ip.ip_hl]) { th 232 net/slcompress.c && *(int32_t *)th == th 247 net/slcompress.c hlen += th->th_off; th 277 net/slcompress.c hlen += th->th_off; th 283 net/slcompress.c th->th_off != oth->th_off || th 286 net/slcompress.c (th->th_off > 5 && th 287 net/slcompress.c BCMP(th + 1, oth + 1, (th->th_off - 5) << 2))) th 296 net/slcompress.c if (th->th_flags & TH_URG) { th 297 net/slcompress.c deltaS = ntohs(th->th_urp); th 300 net/slcompress.c } else if (th->th_urp != oth->th_urp) th 307 net/slcompress.c deltaS = (u_int16_t)(ntohs(th->th_win) - ntohs(oth->th_win)); th 313 net/slcompress.c deltaA = ntohl(th->th_ack) - ntohl(oth->th_ack); th 321 net/slcompress.c deltaS = ntohl(th->th_seq) - ntohl(oth->th_seq); th 377 net/slcompress.c if (th->th_flags & TH_PUSH) th 383 net/slcompress.c deltaA = ntohs(th->th_sum); th 488 net/slcompress.c struct tcphdr *th; th 549 net/slcompress.c th = (struct tcphdr *)&((u_char *)&cs->cs_ip)[hlen]; th 550 net/slcompress.c th->th_sum = htons((*cp << 8) | cp[1]); th 553 net/slcompress.c th->th_flags |= TH_PUSH; th 555 net/slcompress.c th->th_flags &=~ TH_PUSH; th 561 net/slcompress.c th->th_ack = htonl(ntohl(th->th_ack) + i); th 562 net/slcompress.c th->th_seq = htonl(ntohl(th->th_seq) + i); th 567 net/slcompress.c th->th_seq = htonl(ntohl(th->th_seq) + ntohs(cs->cs_ip.ip_len) th 573 net/slcompress.c th->th_flags |= TH_URG; th 574 net/slcompress.c DECODEU(th->th_urp) th 576 net/slcompress.c th->th_flags &=~ TH_URG; th 578 net/slcompress.c DECODES(th->th_win) th 580 net/slcompress.c DECODEL(th->th_ack) th 582 net/slcompress.c DECODEL(th->th_seq) th 127 netinet/tcp_debug.c struct tcphdr *th; th 146 netinet/tcp_debug.c th = &ti6->ti6_t; th 155 netinet/tcp_debug.c th = &ti->ti_t; th 181 netinet/tcp_debug.c seq = th->th_seq; th 182 netinet/tcp_debug.c ack = th->th_ack; th 191 netinet/tcp_debug.c printf("@%x, urp=%x", ack, th->th_urp); th 192 netinet/tcp_debug.c flags = th->th_flags; th 196 netinet/tcp_debug.c #define pf(f) { if (th->th_flags&TH_##f) { printf("%s%s", cp, "f"); cp = ","; } } th 190 netinet/tcp_input.c tcp_reass(tp, th, m, tlen) th 192 netinet/tcp_input.c struct tcphdr *th; th 204 netinet/tcp_input.c if (th == 0) th 214 netinet/tcp_input.c if (tiqe != NULL && th->th_seq == tp->rcv_nxt) { th 219 netinet/tcp_input.c if (tiqe == NULL || th->th_seq != tp->rcv_nxt) { th 233 netinet/tcp_input.c if (SEQ_GT(q->tcpqe_tcp->th_seq, th->th_seq)) th 246 netinet/tcp_input.c i = phdr->th_seq + phdr->th_reseqlen - th->th_seq; th 257 netinet/tcp_input.c th->th_seq += i; th 269 netinet/tcp_input.c int i = (th->th_seq + *tlen) - qhdr->th_seq; th 287 netinet/tcp_input.c th->th_reseqlen = *tlen; th 288 netinet/tcp_input.c tiqe->tcpqe_tcp = th; th 386 netinet/tcp_input.c struct tcphdr *th; th 463 netinet/tcp_input.c IP6_EXTHDR_GET(th, struct tcphdr *, m, iphlen, sizeof(*th)); th 464 netinet/tcp_input.c if (!th) { th 550 netinet/tcp_input.c off = th->th_off << 2; th 557 netinet/tcp_input.c IP6_EXTHDR_GET(th, struct tcphdr *, m, iphlen, off); th 558 netinet/tcp_input.c if (!th) { th 563 netinet/tcp_input.c optp = (u_int8_t *)(th + 1); th 575 netinet/tcp_input.c (th->th_flags & TH_SYN) == 0) { th 582 netinet/tcp_input.c tiflags = th->th_flags; th 587 netinet/tcp_input.c NTOHL(th->th_seq); th 588 netinet/tcp_input.c NTOHL(th->th_ack); th 589 netinet/tcp_input.c NTOHS(th->th_win); th 590 netinet/tcp_input.c NTOHS(th->th_urp); th 599 netinet/tcp_input.c inp = in6_pcbhashlookup(&tcbtable, &ip6->ip6_src, th->th_sport, th 600 netinet/tcp_input.c &ip6->ip6_dst, th->th_dport); th 604 netinet/tcp_input.c inp = in_pcbhashlookup(&tcbtable, ip->ip_src, th->th_sport, th 605 netinet/tcp_input.c ip->ip_dst, th->th_dport); th 617 netinet/tcp_input.c &ip6->ip6_dst, th->th_dport, inpl_flags); th 622 netinet/tcp_input.c ip->ip_dst, th->th_dport, inpl_flags); th 649 netinet/tcp_input.c tiwin = th->th_win << tp->snd_scale; th 651 netinet/tcp_input.c tiwin = th->th_win; th 666 netinet/tcp_input.c src.sin.sin_port = th->th_sport; th 671 netinet/tcp_input.c dst.sin.sin_port = th->th_dport; th 679 netinet/tcp_input.c src.sin6.sin6_port = th->th_sport; th 684 netinet/tcp_input.c dst.sin6.sin6_port = th->th_dport; th 697 netinet/tcp_input.c bcopy(th, &tcp_saveti6.ti6_t, sizeof(*th)); th 702 netinet/tcp_input.c bcopy(th, &tcp_saveti.ti_t, sizeof(*th)); th 709 netinet/tcp_input.c syn_cache_reset(&src.sa, &dst.sa, th); th 720 netinet/tcp_input.c th, iphlen, tlen, so, m); th 823 netinet/tcp_input.c if (th->th_dport == th->th_sport) { th 848 netinet/tcp_input.c syn_cache_add(&src.sa, &dst.sa, th, iphlen, th 930 netinet/tcp_input.c tcp_del_sackholes(tp, th); /* Delete stale SACK holes */ th 941 netinet/tcp_input.c if (tcp_dooptions(tp, optp, optlen, th, m, iphlen, &opti)) th 984 netinet/tcp_input.c th->th_seq == tp->rcv_nxt && th 993 netinet/tcp_input.c if (opti.ts_present && SEQ_LEQ(th->th_seq, tp->last_ack_sent)) { th 999 netinet/tcp_input.c if (SEQ_GT(th->th_ack, tp->snd_una) && th 1000 netinet/tcp_input.c SEQ_LEQ(th->th_ack, tp->snd_max) && th 1010 netinet/tcp_input.c SEQ_GT(th->th_ack, tp->t_rtseq)) th 1013 netinet/tcp_input.c acked = th->th_ack - tp->snd_una; th 1026 netinet/tcp_input.c SEQ_GT(th->th_ack, tp->t_pmtud_th_seq)) th 1036 netinet/tcp_input.c tp->snd_una = th->th_ack; th 1074 netinet/tcp_input.c } else if (th->th_ack == tp->snd_una && th 1143 netinet/tcp_input.c if (SEQ_LEQ(th->th_ack, tp->snd_una) || th 1144 netinet/tcp_input.c SEQ_GT(th->th_ack, tp->snd_max)) th 1163 netinet/tcp_input.c (SEQ_LEQ(th->th_ack, tp->iss) || th 1164 netinet/tcp_input.c SEQ_GT(th->th_ack, tp->snd_max))) th 1179 netinet/tcp_input.c tp->snd_una = th->th_ack; th 1184 netinet/tcp_input.c tp->irs = th->th_seq; th 1259 netinet/tcp_input.c th->th_seq++; th 1268 netinet/tcp_input.c tp->snd_wl1 = th->th_seq - 1; th 1269 netinet/tcp_input.c tp->rcv_up = th->th_seq; th 1281 netinet/tcp_input.c SEQ_GT(th->th_seq, tp->rcv_nxt))) { th 1330 netinet/tcp_input.c todrop = tp->rcv_nxt - th->th_seq; th 1334 netinet/tcp_input.c th->th_seq++; th 1335 netinet/tcp_input.c if (th->th_urp > 1) th 1336 netinet/tcp_input.c th->th_urp--; th 1361 netinet/tcp_input.c th->th_seq += todrop; th 1363 netinet/tcp_input.c if (th->th_urp > todrop) th 1364 netinet/tcp_input.c th->th_urp -= todrop; th 1367 netinet/tcp_input.c th->th_urp = 0; th 1386 netinet/tcp_input.c todrop = (th->th_seq + tlen) - (tp->rcv_nxt+tp->rcv_wnd); th 1398 netinet/tcp_input.c if (tp->rcv_wnd == 0 && th->th_seq == tp->rcv_nxt) { th 1416 netinet/tcp_input.c SEQ_LEQ(th->th_seq, tp->last_ack_sent)) { th 1417 netinet/tcp_input.c if (SEQ_LEQ(tp->last_ack_sent, th->th_seq + tlen + th 1436 netinet/tcp_input.c if (th->th_seq != tp->last_ack_sent && th 1437 netinet/tcp_input.c th->th_seq != tp->rcv_nxt && th 1438 netinet/tcp_input.c th->th_seq != (tp->rcv_nxt + 1)) th 1511 netinet/tcp_input.c tp->snd_wl1 = th->th_seq - 1; th 1562 netinet/tcp_input.c if (SEQ_LEQ(th->th_ack, tp->snd_una)) { th 1577 netinet/tcp_input.c if (th->th_seq != tp->rcv_nxt && th 1578 netinet/tcp_input.c SEQ_LT(th->th_ack, th 1591 netinet/tcp_input.c if (th->th_ack != tp->snd_una) { th 1641 netinet/tcp_input.c if (SEQ_LT(th->th_ack, tp->snd_last)){ th 1689 netinet/tcp_input.c tp->snd_nxt = th->th_ack; th 1740 netinet/tcp_input.c if (tcp_sack_partialack(tp, th)) { th 1753 netinet/tcp_input.c th->th_ack) < tp->snd_ssthresh) th 1756 netinet/tcp_input.c th->th_ack); th 1759 netinet/tcp_input.c if (SEQ_GT(th->th_ack, tp->snd_fack)) th 1760 netinet/tcp_input.c tp->snd_fack = th->th_ack; th 1766 netinet/tcp_input.c !tcp_newreno(tp, th)) { th 1769 netinet/tcp_input.c if (tcp_seq_subtract(tp->snd_max, th->th_ack) < th 1773 netinet/tcp_input.c th->th_ack); th 1785 netinet/tcp_input.c if (SEQ_GT(th->th_ack, tp->snd_max)) { th 1789 netinet/tcp_input.c acked = th->th_ack - tp->snd_una; th 1804 netinet/tcp_input.c else if (tp->t_rtttime && SEQ_GT(th->th_ack, tp->t_rtseq)) th 1813 netinet/tcp_input.c if (th->th_ack == tp->snd_max) { th 1855 netinet/tcp_input.c SEQ_GT(th->th_ack, tp->t_pmtud_th_seq)) th 1865 netinet/tcp_input.c tp->snd_una = th->th_ack; th 1953 netinet/tcp_input.c (SEQ_LT(tp->snd_wl1, th->th_seq) || (tp->snd_wl1 == th->th_seq && th 1954 netinet/tcp_input.c (SEQ_LT(tp->snd_wl2, th->th_ack) || th 1955 netinet/tcp_input.c (tp->snd_wl2 == th->th_ack && tiwin > tp->snd_wnd))))) { th 1958 netinet/tcp_input.c tp->snd_wl2 == th->th_ack && tiwin > tp->snd_wnd) th 1961 netinet/tcp_input.c tp->snd_wl1 = th->th_seq; th 1962 netinet/tcp_input.c tp->snd_wl2 = th->th_ack; th 1971 netinet/tcp_input.c if ((tiflags & TH_URG) && th->th_urp && th 1979 netinet/tcp_input.c if (th->th_urp + so->so_rcv.sb_cc > sb_max) { th 1980 netinet/tcp_input.c th->th_urp = 0; /* XXX */ th 1998 netinet/tcp_input.c if (SEQ_GT(th->th_seq+th->th_urp, tp->rcv_up)) { th 1999 netinet/tcp_input.c tp->rcv_up = th->th_seq + th->th_urp; th 2013 netinet/tcp_input.c if (th->th_urp <= (u_int16_t) tlen th 2018 netinet/tcp_input.c tcp_pulloutofband(so, th->th_urp, m, hdroptlen); th 2040 netinet/tcp_input.c tcp_seq laststart = th->th_seq; th 2041 netinet/tcp_input.c tcp_seq lastend = th->th_seq + tlen; th 2044 netinet/tcp_input.c if (th->th_seq == tp->rcv_nxt && TAILQ_EMPTY(&tp->t_segq) && th 2049 netinet/tcp_input.c tiflags = th->th_flags & TH_FIN; th 2062 netinet/tcp_input.c tiflags = tcp_reass(tp, th, m, &tlen); th 2210 netinet/tcp_input.c tcp_respond(tp, mtod(m, caddr_t), m, (tcp_seq)0, th->th_ack, th 2215 netinet/tcp_input.c tcp_respond(tp, mtod(m, caddr_t), m, th->th_seq + tlen, th 2244 netinet/tcp_input.c tcp_dooptions(tp, cp, cnt, th, m, iphlen, oi) th 2248 netinet/tcp_input.c struct tcphdr *th; th 2281 netinet/tcp_input.c if (!(th->th_flags & TH_SYN)) th 2293 netinet/tcp_input.c if (!(th->th_flags & TH_SYN)) th 2310 netinet/tcp_input.c if (!(th->th_flags & TH_SYN)) th 2327 netinet/tcp_input.c if (!(th->th_flags & TH_SYN)) th 2335 netinet/tcp_input.c tcp_sack_option(tp, th, cp, optlen); th 2407 netinet/tcp_input.c if (tcp_signature(tdb, tp->pf, m, th, iphlen, 1, sig) < 0) th 2533 netinet/tcp_input.c tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen) th 2542 netinet/tcp_input.c if ((th->th_flags & TH_ACK) == 0) th 2545 netinet/tcp_input.c if (SEQ_LT(th->th_ack, tp->snd_una) || th 2546 netinet/tcp_input.c SEQ_GT(th->th_ack, tp->snd_max)) th 2578 netinet/tcp_input.c if (SEQ_GT(th->th_ack, tp->snd_una)) { th 2579 netinet/tcp_input.c if (SEQ_LT(sack.start, th->th_ack)) th 2592 netinet/tcp_input.c cur->start = th->th_ack; th 2761 netinet/tcp_input.c tcp_del_sackholes(tp, th) th 2763 netinet/tcp_input.c struct tcphdr *th; th 2767 netinet/tcp_input.c tcp_seq lastack = SEQ_GT(th->th_ack, tp->snd_una) ? th 2768 netinet/tcp_input.c th->th_ack : tp->snd_una; th 2809 netinet/tcp_input.c tcp_sack_partialack(tp, th) th 2811 netinet/tcp_input.c struct tcphdr *th; th 2813 netinet/tcp_input.c if (SEQ_LT(th->th_ack, tp->snd_last)) { th 2823 netinet/tcp_input.c if (tp->snd_cwnd > (th->th_ack - tp->snd_una)) { th 2824 netinet/tcp_input.c tp->snd_cwnd -= th->th_ack - tp->snd_una; th 3223 netinet/tcp_input.c tcp_newreno(tp, th) th 3225 netinet/tcp_input.c struct tcphdr *th; th 3227 netinet/tcp_input.c if (SEQ_LT(th->th_ack, tp->snd_last)) { th 3238 netinet/tcp_input.c tp->snd_nxt = th->th_ack; th 3243 netinet/tcp_input.c tp->snd_cwnd = tp->t_maxseg + (th->th_ack - tp->snd_una); th 3252 netinet/tcp_input.c if (tp->snd_cwnd > th->th_ack - tp->snd_una) th 3253 netinet/tcp_input.c tp->snd_cwnd -= th->th_ack - tp->snd_una; th 3631 netinet/tcp_input.c syn_cache_get(src, dst, th, hlen, tlen, so, m) th 3634 netinet/tcp_input.c struct tcphdr *th; th 3657 netinet/tcp_input.c if ((th->th_ack != sc->sc_iss + 1) || th 3658 netinet/tcp_input.c SEQ_LEQ(th->th_seq, sc->sc_irs) || th 3659 netinet/tcp_input.c SEQ_GT(th->th_seq, sc->sc_irs + 1 + sc->sc_win)) { th 3727 netinet/tcp_input.c inp->inp_lport = th->th_dport; th 3866 netinet/tcp_input.c tcp_respond(NULL, mtod(m, caddr_t), m, (tcp_seq)0, th->th_ack, TH_RST); th 3882 netinet/tcp_input.c syn_cache_reset(src, dst, th) th 3885 netinet/tcp_input.c struct tcphdr *th; th 3895 netinet/tcp_input.c if (SEQ_LT(th->th_seq, sc->sc_irs) || th 3896 netinet/tcp_input.c SEQ_GT(th->th_seq, sc->sc_irs+1)) { th 3907 netinet/tcp_input.c syn_cache_unreach(src, dst, th) th 3910 netinet/tcp_input.c struct tcphdr *th; th 3922 netinet/tcp_input.c if (ntohl (th->th_seq) != sc->sc_iss) { th 3962 netinet/tcp_input.c syn_cache_add(src, dst, th, iphlen, so, m, optp, optlen, oi, issp) th 3965 netinet/tcp_input.c struct tcphdr *th; th 4010 netinet/tcp_input.c if (tcp_dooptions(&tb, optp, optlen, th, m, iphlen, oi)) th 4069 netinet/tcp_input.c sc->sc_irs = th->th_seq; th 4104 netinet/tcp_input.c (th->th_flags & (TH_ECE|TH_CWR)) == (TH_ECE|TH_CWR)) th 4144 netinet/tcp_input.c struct tcphdr *th; th 4209 netinet/tcp_input.c th = (struct tcphdr *)(ip + 1); th 4210 netinet/tcp_input.c th->th_dport = sc->sc_src.sin.sin_port; th 4211 netinet/tcp_input.c th->th_sport = sc->sc_dst.sin.sin_port; th 4220 netinet/tcp_input.c th = (struct tcphdr *)(ip6 + 1); th 4221 netinet/tcp_input.c th->th_dport = sc->sc_src.sin6.sin6_port; th 4222 netinet/tcp_input.c th->th_sport = sc->sc_dst.sin6.sin6_port; th 4226 netinet/tcp_input.c th = NULL; th 4229 netinet/tcp_input.c th->th_seq = htonl(sc->sc_iss); th 4230 netinet/tcp_input.c th->th_ack = htonl(sc->sc_irs + 1); th 4231 netinet/tcp_input.c th->th_off = (sizeof(struct tcphdr) + optlen) >> 2; th 4232 netinet/tcp_input.c th->th_flags = TH_SYN|TH_ACK; th 4236 netinet/tcp_input.c th->th_flags |= TH_ECE; th 4238 netinet/tcp_input.c th->th_win = htons(sc->sc_win); th 4243 netinet/tcp_input.c optp = (u_int8_t *)(th + 1); th 4312 netinet/tcp_input.c if (tcp_signature(tdb, sc->sc_src.sa.sa_family, m, th, th 4332 netinet/tcp_input.c th->th_sum = 0; th 4333 netinet/tcp_input.c th->th_sum = in_cksum(m, tlen); th 4338 netinet/tcp_input.c th->th_sum = 0; th 4339 netinet/tcp_input.c th->th_sum = in6_cksum(m, IPPROTO_TCP, hlen, tlen - hlen); th 215 netinet/tcp_output.c struct tcphdr *th; th 778 netinet/tcp_output.c th = (struct tcphdr *)(mtod(m, caddr_t) + tp->t_template->m_len - th 803 netinet/tcp_output.c th->th_seq = htonl(tp->snd_nxt); th 805 netinet/tcp_output.c th->th_seq = htonl(tp->snd_max); th 816 netinet/tcp_output.c th->th_seq = htonl(p->rxmit); th 826 netinet/tcp_output.c th->th_ack = htonl(tp->rcv_nxt); th 828 netinet/tcp_output.c bcopy((caddr_t)opt, (caddr_t)(th + 1), optlen); th 829 netinet/tcp_output.c th->th_off = (sizeof (struct tcphdr) + optlen) >> 2; th 864 netinet/tcp_output.c th->th_flags = flags; th 878 netinet/tcp_output.c th->th_win = htons((u_int16_t) (win>>tp->rcv_scale)); th 883 netinet/tcp_output.c th->th_urp = htons((u_int16_t)urp); th 884 netinet/tcp_output.c th->th_flags |= TH_URG; th 935 netinet/tcp_output.c if (tcp_signature(tdb, tp->pf, m, th, iphlen, 0, th 952 netinet/tcp_output.c th->th_sum = in_cksum_addword(th->th_sum, th 958 netinet/tcp_output.c th->th_sum = in6_cksum(m, IPPROTO_TCP, sizeof(struct ip6_hdr), th 209 netinet/tcp_subr.c struct tcphdr *th; th 259 netinet/tcp_subr.c th = (struct tcphdr *)(mtod(m, caddr_t) + th 261 netinet/tcp_subr.c th->th_sum = in_cksum_phdr(ipovly->ih_src.s_addr, th 283 netinet/tcp_subr.c th = (struct tcphdr *)(mtod(m, caddr_t) + th 285 netinet/tcp_subr.c th->th_sum = 0; th 291 netinet/tcp_subr.c th->th_sport = inp->inp_lport; th 292 netinet/tcp_subr.c th->th_dport = inp->inp_fport; th 293 netinet/tcp_subr.c th->th_seq = 0; th 294 netinet/tcp_subr.c th->th_ack = 0; th 295 netinet/tcp_subr.c th->th_x2 = 0; th 296 netinet/tcp_subr.c th->th_off = 5; th 297 netinet/tcp_subr.c th->th_flags = 0; th 298 netinet/tcp_subr.c th->th_win = 0; th 299 netinet/tcp_subr.c th->th_urp = 0; th 330 netinet/tcp_subr.c struct tcphdr *th; th 386 netinet/tcp_subr.c th = (void *)((caddr_t)ti + sizeof(struct ip6_hdr)); th 392 netinet/tcp_subr.c th = (void *)((caddr_t)ti + sizeof(struct ip)); th 395 netinet/tcp_subr.c xchg(th->th_dport, th->th_sport, u_int16_t); th 402 netinet/tcp_subr.c th = (struct tcphdr *)((caddr_t)ti + sizeof(struct ip6_hdr)); th 408 netinet/tcp_subr.c th = (struct tcphdr *)((caddr_t)ti + sizeof(struct ip)); th 415 netinet/tcp_subr.c th->th_seq = htonl(seq); th 416 netinet/tcp_subr.c th->th_ack = htonl(ack); th 417 netinet/tcp_subr.c th->th_x2 = 0; th 418 netinet/tcp_subr.c th->th_off = sizeof (struct tcphdr) >> 2; th 419 netinet/tcp_subr.c th->th_flags = flags; th 424 netinet/tcp_subr.c th->th_win = htons((u_int16_t)win); th 425 netinet/tcp_subr.c th->th_urp = 0; th 435 netinet/tcp_subr.c th->th_sum = 0; th 436 netinet/tcp_subr.c th->th_sum = in6_cksum(m, IPPROTO_TCP, th 453 netinet/tcp_subr.c th->th_sum = 0; th 454 netinet/tcp_subr.c th->th_sum = in_cksum(m, tlen); th 698 netinet/tcp_subr.c struct tcphdr th; th 760 netinet/tcp_subr.c bzero(&th, sizeof(th)); th 762 netinet/tcp_subr.c if (sizeof(*thp) > sizeof(th)) th 765 netinet/tcp_subr.c m_copydata(m, off, sizeof(*thp), (caddr_t)&th); th 773 netinet/tcp_subr.c th.th_dport, (struct in6_addr *)&sa6_src->sin6_addr, th 774 netinet/tcp_subr.c th.th_sport); th 787 netinet/tcp_subr.c seq = ntohl(th.th_seq); th 798 netinet/tcp_subr.c sa, &th); th 813 netinet/tcp_subr.c struct tcphdr *th; th 845 netinet/tcp_subr.c th = (struct tcphdr *)((caddr_t)ip + (ip->ip_hl << 2)); th 846 netinet/tcp_subr.c seq = ntohl(th->th_seq); th 848 netinet/tcp_subr.c ip->ip_dst, th->th_dport, ip->ip_src, th->th_sport); th 903 netinet/tcp_subr.c th = (struct tcphdr *)((caddr_t)ip + (ip->ip_hl << 2)); th 905 netinet/tcp_subr.c ip->ip_dst, th->th_dport, ip->ip_src, th->th_sport); th 907 netinet/tcp_subr.c seq = ntohl(th->th_seq); th 922 netinet/tcp_subr.c sin.sin_port = th->th_sport; th 925 netinet/tcp_subr.c sa, th); th 1118 netinet/tcp_subr.c tcp_signature(struct tdb *tdb, int af, struct mbuf *m, struct tcphdr *th, th 1168 netinet/tcp_subr.c th0 = *th; th 1179 netinet/tcp_subr.c len = m->m_pkthdr.len - iphlen - th->th_off * sizeof(uint32_t); th 1182 netinet/tcp_subr.c m_apply(m, iphlen + th->th_off * sizeof(uint32_t), len, th 913 scsi/cd.c struct ioc_toc_header th; th 915 scsi/cd.c if ((error = cd_read_toc(cd, 0, 0, &th, sizeof(th), 0)) != 0) th 918 scsi/cd.c th.len = letoh16(th.len); th 920 scsi/cd.c th.len = betoh16(th.len); th 921 scsi/cd.c bcopy(&th, addr, sizeof(th)); th 928 scsi/cd.c struct ioc_toc_header *th; th 937 scsi/cd.c th = &toc->header; th 953 scsi/cd.c th->ending_track - th->starting_track + 1; th 966 scsi/cd.c th->len = letoh16(th->len); th 968 scsi/cd.c th->len = betoh16(th->len); th 969 scsi/cd.c len = min(len, th->len - (sizeof(th->starting_track) + th 970 scsi/cd.c sizeof(th->ending_track))); th 204 xfs/xfs_dev-common.c thread_t th = current_thread(); th 205 xfs/xfs_dev-common.c struct np_uthread *npu = thread_to_np_uthread(th);