Lines Matching defs:tcp
101 #include <netinet/tcp.h>
917 struct tcphdr *tcp = L3HDR(struct tcphdr,ip);
918 u_char *cp = (u_char *)(tcp + 1);
919 int x = (tcp->th_off << 2) - sizeof(struct tcphdr);
1157 struct tcphdr *const tcp = (struct tcphdr *)icmp;
1178 ntohs(tcp->th_sport),
1180 ntohs(tcp->th_dport));
1372 struct tcphdr *tcp)
1453 if (tcp) {
1455 u_int32_t ack = ntohl(tcp->th_ack);
1739 struct tcphdr *tcp;
1750 tcp = (struct tcphdr *)(ip + 1); /* no IP options */
1752 tcp->th_off = 5;
1759 tcp->th_sport = htons(id->dst_port);
1760 tcp->th_dport = htons(id->src_port);
1763 tcp->th_seq = htonl(ack);
1764 tcp->th_ack = htonl(0);
1765 tcp->th_flags = TH_RST;
1769 tcp->th_seq = htonl(0);
1770 tcp->th_ack = htonl(seq);
1771 tcp->th_flags = TH_RST | TH_ACK;
1786 tcp->th_dport = htons(id->dst_port);
1787 tcp->th_sport = htons(id->src_port);
1789 tcp->th_seq = htonl(seq);
1790 tcp->th_ack = htonl(ack);
1791 tcp->th_flags = TH_ACK;
1795 * the tcp checksum on the pseudoheader
1799 tcp->th_sum = in_cksum(m, m->m_pkthdr.len);
1827 struct tcphdr *const tcp =
1829 if ( (tcp->th_flags & TH_RST) == 0) {
1832 m = send_pkt(&(args->fwa_id), ntohl(tcp->th_seq),
1833 ntohl(tcp->th_ack),
1834 tcp->th_flags | TH_RST);
2058 struct tcphdr *tcp;
2061 tcp = L3HDR(struct tcphdr, ip);
2062 dst_port = tcp->th_dport;
2063 src_port = tcp->th_sport;
2064 args->fwa_id.flags = tcp->th_flags;