Lines Matching defs:tcph
287 struct tcphdr *tcph = buf;
289 memset(tcph, 0, sizeof(*tcph));
291 tcph->source = htons(SPORT);
292 tcph->dest = htons(DPORT);
293 tcph->seq = ntohl(START_SEQ + seq_offset);
294 tcph->ack_seq = ntohl(START_ACK + ack_offset);
295 tcph->ack = 1;
296 tcph->fin = fin;
297 tcph->doff = 5;
298 tcph->window = htons(TCP_MAXWIN);
299 tcph->urg_ptr = 0;
300 tcph->check = tcp_checksum(tcph, payload_len);
342 struct tcphdr *tcph;
350 tcph = (struct tcphdr *)(flag_buf + tcp_offset);
351 tcph->psh = psh;
352 tcph->syn = syn;
353 tcph->rst = rst;
354 tcph->urg = urg;
355 tcph->check = 0;
356 tcph->check = tcp_checksum(tcph, payload_len);
518 struct tcphdr *tcph = (struct tcphdr *)(buf + tcp_offset);
525 tcph->check = tcph->check - 1;
533 struct tcphdr *tcph = (struct tcphdr *)(buf + tcp_offset);
540 tcph->seq = ntohl(htonl(tcph->seq) + 1);
541 tcph->check = 0;
542 tcph->check = tcp_checksum(tcph, PAYLOAD_LEN);
934 struct tcphdr *tcph;
959 tcph = (struct tcphdr *)(buffer + tcp_offset + ip_ext_len);
961 if (tcph->fin)
964 tcp_ext_len = (tcph->doff - 5) * 4;