Lines Matching refs:tcp
226 #include <netinet/tcp.h>
454 "tcp",
1545 struct tcphdr *const tcp = (struct tcphdr *) outp;
1547 tcp->th_sport = htons(ident);
1548 tcp->th_dport = htons(port + (fixedPort ? 0 : outdata->seq));
1549 tcp->th_seq = (tcp->th_sport << 16) | tcp->th_dport;
1550 tcp->th_ack = 0;
1551 tcp->th_off = 5;
1552 tcp->th_flags = TH_SYN;
1553 tcp->th_sum = 0;
1556 tcp->th_sum = p_cksum(outip, (u_short*)tcp, protlen, protlen);
1562 struct tcphdr *const tcp = (struct tcphdr *) data;
1564 return (ntohs(tcp->th_sport) == ident
1565 && ntohs(tcp->th_dport) == port + (fixedPort ? 0 : seq)
1566 && tcp->th_seq == (tcp_seq)((tcp->th_sport << 16) | tcp->th_dport));