Lines Matching refs:tcph
258 struct tcphdr *tcph = buf; in fill_transportlayer() local
260 memset(tcph, 0, sizeof(*tcph)); in fill_transportlayer()
262 tcph->source = htons(SPORT); in fill_transportlayer()
263 tcph->dest = htons(DPORT); in fill_transportlayer()
264 tcph->seq = ntohl(START_SEQ + seq_offset); in fill_transportlayer()
265 tcph->ack_seq = ntohl(START_ACK + ack_offset); in fill_transportlayer()
266 tcph->ack = 1; in fill_transportlayer()
267 tcph->fin = fin; in fill_transportlayer()
268 tcph->doff = 5; in fill_transportlayer()
269 tcph->window = htons(TCP_MAXWIN); in fill_transportlayer()
270 tcph->urg_ptr = 0; in fill_transportlayer()
271 tcph->check = tcp_checksum(tcph, payload_len); in fill_transportlayer()
303 struct tcphdr *tcph; in send_flags() local
311 tcph = (struct tcphdr *)(flag_buf + tcp_offset); in send_flags()
312 tcph->psh = psh; in send_flags()
313 tcph->syn = syn; in send_flags()
314 tcph->rst = rst; in send_flags()
315 tcph->urg = urg; in send_flags()
316 tcph->check = 0; in send_flags()
317 tcph->check = tcp_checksum(tcph, payload_len); in send_flags()
472 struct tcphdr *tcph = (struct tcphdr *)(buf + tcp_offset); in send_changed_checksum() local
479 tcph->check = tcph->check - 1; in send_changed_checksum()
487 struct tcphdr *tcph = (struct tcphdr *)(buf + tcp_offset); in send_changed_seq() local
494 tcph->seq = ntohl(htonl(tcph->seq) + 1); in send_changed_seq()
495 tcph->check = 0; in send_changed_seq()
496 tcph->check = tcp_checksum(tcph, PAYLOAD_LEN); in send_changed_seq()
748 struct tcphdr *tcph; in check_recv_pkts() local
772 tcph = (struct tcphdr *)(buffer + tcp_offset + ip_ext_len); in check_recv_pkts()
774 if (tcph->fin) in check_recv_pkts()
777 tcp_ext_len = (tcph->doff - 5) * 4; in check_recv_pkts()