Lines Matching refs:tcph
1265 tcph_t *tcph;
1330 tcph = tcp->tcp_tcph;
1331 *(uint16_t *)tcph->th_fport = dstport;
1436 tcph_t *tcph;
1493 tcph = (tcph_t *)&cr_pkt->b_rptr[ip_hdr_len];
1497 bcopy(tcph->th_lport, acceptor->tcp_tcph->th_fport, sizeof (in_port_t));
1505 acceptor->tcp_lport = *(in_port_t *)tcph->th_fport;
1506 bcopy(tcph->th_fport, acceptor->tcp_tcph->th_lport,
1527 tcp_process_options(acceptor, tcph);
1531 (tcph->th_flags[0] & (TH_ECE|TH_CWR)) == (TH_ECE|TH_CWR)) {
1802 tcpha_t *tcph;
1807 tcph = (tcpha_t *)(iph + 1);
1815 old_sum = tcph->tha_sum;
1816 tcph->tha_sum = 0;
1829 tcp_lookup_ipv4(struct ip *iph, tcpha_t *tcph, int min_state, int *sock_id)
1837 if (tcph->tha_lport == tcp->tcp_fport &&
1838 tcph->tha_fport == tcp->tcp_lport &&
1850 if (tcph->tha_lport == tcp->tcp_fport &&
1851 tcph->tha_fport == tcp->tcp_lport &&
1886 tcp_lookup_eager_ipv4(tcp_t *listener, struct ip *iph, tcpha_t *tcph)
1895 if (tcph->tha_lport == tcp->tcp_fport &&
1896 tcph->tha_fport == tcp->tcp_lport &&
1905 if (tcph->tha_lport == tcp->tcp_fport &&
1906 tcph->tha_fport == tcp->tcp_lport &&
2021 tcp_parse_options(tcph_t *tcph, tcp_opt_t *tcpopt)
2026 uchar_t *up = (uchar_t *)tcph;
2032 endp = up + TCP_HDR_LENGTH(tcph);
2231 tcp_process_options(tcp_t *tcp, tcph_t *tcph)
2239 options = tcp_parse_options(tcph, &tcpopt);
2364 tcp_paws_check(tcp_t *tcp, tcph_t *tcph, tcp_opt_t *tcpoptp)
2370 flags = (unsigned int)tcph->th_flags[0] & 0xFF;
2376 if (TCP_HDR_LENGTH(tcph) == (uint32_t)TCP_MIN_HEADER_LENGTH +
2378 OK_32PTR((up = ((uint8_t *)tcph) +
2391 options = tcp_parse_options(tcph, tcpoptp);
2617 tcpha_t *tcph;
2658 tcph = (tcpha_t *)&rptr[ip_hdr_len];
2659 seg_seq = ntohl(tcph->tha_seq);
2660 seg_ack = ntohl(tcph->tha_ack);
2663 (ip_hdr_len + TCP_HDR_LENGTH(((tcph_t *)tcph)));
2681 tcph->tha_lport != tcp->tcp_fport ||
2682 tcph->tha_fport != tcp->tcp_lport ||
2698 if ((tcp1 = tcp_lookup_ipv4(iph, tcph, TCPS_SYN_SENT,
2701 tcph->tha_fport, &sock_id)) != NULL) {
2704 iph, tcph)) == NULL) {
2739 flags = tcph->tha_flags & 0xFF;
2743 seg_len, (tcph_t *)tcph, sock_id);
2838 tcp_process_options(tcp, (tcph_t *)tcph);
2892 new_swnd = BE16_TO_U16(((tcph_t *)tcph)->th_win);
2945 mp->b_rptr = (uchar_t *)tcph + TCP_HDR_LENGTH((tcph_t *)tcph);
2946 new_swnd = ntohs(tcph->tha_win) <<
2951 if (!tcp_paws_check(tcp, (tcph_t *)tcph, &tcpopt)) {
2967 (void) tcp_parse_options((tcph_t *)tcph, &tcpopt);
4807 tcph_t *tcph;
4856 tcph = tcp->tcp_tcph;
4860 tcph->th_flags[0] = TH_ACK;
4862 tcph->th_flags[0] = (TH_ACK | TH_PUSH);
4864 U32_TO_ABE32(snxt, tcph->th_seq);
4980 (char *)tcph+TCP_MIN_HEADER_LENGTH+4);
4982 (char *)tcph+TCP_MIN_HEADER_LENGTH+8);
5013 * Set tcph to point to the header of the outgoing packet,
5016 tcph = (tcph_t *)(rptr + tcp->tcp_ip_hdr_len);
5027 tcph->th_flags[0] |= TH_ECE;
5029 tcph->th_flags[0] |= TH_CWR;
5054 tcph->th_offset_and_rsrvd[0] += ((num_sack_blk * 2 + 1)
5203 uint32_t seg_seq, uint32_t seg_ack, int seg_len, tcph_t *tcph,
5221 flags = (unsigned int)tcph->th_flags[0] & 0xFF;
5222 new_swnd = BE16_TO_U16(tcph->th_win) <<
5223 ((tcph->th_flags[0] & TH_SYN) ? 0 : tcp->tcp_snd_ws);
5225 if (!tcp_paws_check(tcp, tcph, &tcpopt)) {
5467 tcph_t *tcph;
5502 tcph = (tcph_t *)(tcp->tcp_iphc + sizeof (struct ip));
5503 tcp->tcp_tcph = tcph;
5504 tcph->th_offset_and_rsrvd[0] = (5 << 4);
5519 tcph_t *tcph;
5530 tcph = (tcph_t *)(rptr + ip_hdr_len);
5532 if (tcph->th_flags[0] & TH_RST) {
5559 tcph = (tcph_t *)&rptr[tcp_ip_hdr_len];
5560 tcph->th_flags[0] = (uint8_t)ctl;
5572 tcph->th_offset_and_rsrvd[0] -= (3 << 4);
5580 (char *)tcph+TCP_MIN_HEADER_LENGTH+4);
5582 (char *)tcph+TCP_MIN_HEADER_LENGTH+8);
5589 U32_TO_BE32(seq, tcph->th_seq);
5590 U32_TO_BE32(ack, tcph->th_ack);
5620 tcph_t *tcph;
5649 tcph = (tcph_t *)&rptr[tcp->tcp_ip_hdr_len];
5660 tcp->tcp_suna : tcp->tcp_snxt, tcph->th_seq);
5663 tcph->th_flags[0] = (uchar_t)TH_ACK;
5665 tcph->th_flags[0] |= TH_ECE;
5675 (char *)tcph+TCP_MIN_HEADER_LENGTH+4);
5677 (char *)tcph+TCP_MIN_HEADER_LENGTH+8);
5682 uchar_t *wptr = (uchar_t *)tcph + tcp->tcp_tcp_hdr_len;
5700 tcph->th_offset_and_rsrvd[0] += ((num_sack_blk * 2 + 1)
5737 tcph_t *tcph;
5812 tcph = (tcph_t *)&rptr[tcp->tcp_ip_hdr_len];
5813 U32_TO_ABE32(seq, tcph->th_seq);
5871 tcph->th_offset_and_rsrvd[0] += (1 << 4);
5891 tcph->th_offset_and_rsrvd[0] +=
5910 tcph->th_offset_and_rsrvd[0] +=
5921 tcph->th_offset_and_rsrvd[0] +=
5943 tcph->th_offset_and_rsrvd[0] += (1 << 4);
5953 tcph->th_offset_and_rsrvd[0] +=
5997 tcph->th_flags[0] = (uchar_t)flags;
6006 (char *)tcph+TCP_MIN_HEADER_LENGTH+4);
6008 (char *)tcph+TCP_MIN_HEADER_LENGTH+8);
6013 uchar_t *wptr = (uchar_t *)tcph + tcp->tcp_tcp_hdr_len;
6031 tcph->th_offset_and_rsrvd[0] += ((num_sack_blk * 2 + 1) << 4);
6076 tcph_t *tcph;
6083 tcph = (tcph_t *)&rptr[ip_hdr_len];
6084 seg_seq = BE32_TO_U32(tcph->th_seq);
6085 seg_ack = BE32_TO_U32(tcph->th_ack);
6086 flags = tcph->th_flags[0];
6088 seg_len = msgdsize(mp) - (TCP_HDR_LENGTH(tcph) + ip_hdr_len);
6126 tcph_t *tcph;
6158 tcph = (tcph_t *)&mp->b_rptr[ip_hdr_len];
6159 if (tcph->th_flags[0] & TH_RST) {
6180 tcph = (tcph_t *)&mp->b_rptr[ip_hdr_len];
6182 tcph->th_offset_and_rsrvd[0] = (5 << 4);
6183 tcp_xchg(tcph->th_fport, tcph->th_lport, 2);
6184 U32_TO_BE32(ack, tcph->th_ack);
6185 U32_TO_BE32(seq, tcph->th_seq);
6186 U16_TO_BE16(0, tcph->th_win);
6187 bzero(tcph->th_sum, sizeof (int16_t));
6188 tcph->th_flags[0] = (uint8_t)ctl;
6214 tcpha_t *tcph;
6218 tcph = (tcpha_t *)(iph + 1);
6225 tcph->tha_sum = 0;
6226 tcph->tha_sum = tcp_cksum((uint16_t *)&(iph->ip_ttl),