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