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