Lines Matching refs:tcp2
735 struct tcphdr *tcp, *tcp2; in ipf_send_reset() local
766 if (sizeof(*tcp2) + hlen > MHLEN) { in ipf_send_reset()
776 m->m_len = sizeof(*tcp2) + hlen; in ipf_send_reset()
785 bzero((char *)ip, sizeof(*tcp2) + hlen); in ipf_send_reset()
786 tcp2 = (struct tcphdr *)((char *)ip + hlen); in ipf_send_reset()
787 tcp2->th_sport = tcp->th_dport; in ipf_send_reset()
788 tcp2->th_dport = tcp->th_sport; in ipf_send_reset()
791 tcp2->th_seq = tcp->th_ack; in ipf_send_reset()
792 tcp2->th_flags = TH_RST; in ipf_send_reset()
793 tcp2->th_ack = 0; in ipf_send_reset()
795 tcp2->th_seq = 0; in ipf_send_reset()
796 tcp2->th_ack = ntohl(tcp->th_seq); in ipf_send_reset()
797 tcp2->th_ack += tlen; in ipf_send_reset()
798 tcp2->th_ack = htonl(tcp2->th_ack); in ipf_send_reset()
799 tcp2->th_flags = TH_RST|TH_ACK; in ipf_send_reset()
801 tcp2->th_x2 = 0; in ipf_send_reset()
802 TCP_OFF_A(tcp2, sizeof(*tcp2) >> 2); in ipf_send_reset()
803 tcp2->th_win = tcp->th_win; in ipf_send_reset()
804 tcp2->th_sum = 0; in ipf_send_reset()
805 tcp2->th_urp = 0; in ipf_send_reset()
815 tcp2->th_sum = in6_cksum(m, IPPROTO_TCP, in ipf_send_reset()
816 sizeof(*ip6), sizeof(*tcp2)); in ipf_send_reset()
825 tcp2->th_sum = in_cksum(m, hlen + sizeof(*tcp2)); in ipf_send_reset()
826 ip->ip_len = hlen + sizeof(*tcp2); in ipf_send_reset()