Lines Matching defs:tcp
71 #include <netinet/tcp.h>
735 struct tcphdr *tcp, *tcp2;
743 tcp = fin->fin_dp;
744 if (tcp->th_flags & TH_RST)
750 tlen = fin->fin_dlen - (TCP_OFF(tcp) << 2) +
751 ((tcp->th_flags & TH_SYN) ? 1 : 0) +
752 ((tcp->th_flags & TH_FIN) ? 1 : 0);
787 tcp2->th_sport = tcp->th_dport;
788 tcp2->th_dport = tcp->th_sport;
790 if (tcp->th_flags & TH_ACK) {
791 tcp2->th_seq = tcp->th_ack;
796 tcp2->th_ack = ntohl(tcp->th_seq);
803 tcp2->th_win = tcp->th_win;