Lines Matching refs:tcphdr
72 #define TOTAL_HDR_LEN (ETH_HLEN + sizeof(struct ipv6hdr) + sizeof(struct tcphdr))
73 #define MSS (4096 - sizeof(struct tcphdr) - sizeof(struct ipv6hdr))
74 #define MAX_PAYLOAD (IP_MAXPACKET - sizeof(struct tcphdr) - sizeof(struct ipv6hdr))
76 #define MAX_HDR_LEN (ETH_HLEN + sizeof(struct ipv6hdr) + sizeof(struct tcphdr))
103 const int dport_off = tcp_offset + offsetof(struct tcphdr, dest); in setup_sock_filter()
186 ph6.payload_len = htons(sizeof(struct tcphdr) + payload_len); in tcp_checksum()
195 ph4.payload_len = htons(sizeof(struct tcphdr) + payload_len); in tcp_checksum()
200 return checksum_fold(buf, sizeof(struct tcphdr) + payload_len, sum); in tcp_checksum()
229 ip6h->payload_len = htons(sizeof(struct tcphdr) + payload_len); in fill_networklayer()
243 iph->tot_len = htons(sizeof(struct tcphdr) + in fill_networklayer()
257 struct tcphdr *tcph = buf; in fill_transportlayer()
302 struct tcphdr *tcph; in send_flags()
310 tcph = (struct tcphdr *)(flag_buf + tcp_offset); in send_flags()
377 struct tcphdr *tcphdr = (struct tcphdr *)(buf + tcp_offset); in recompute_packet() local
385 tcphdr->doff = tcphdr->doff + (extlen / 4); in recompute_packet()
386 tcphdr->check = 0; in recompute_packet()
387 tcphdr->check = tcp_checksum(tcphdr, PAYLOAD_LEN + extlen); in recompute_packet()
471 struct tcphdr *tcph = (struct tcphdr *)(buf + tcp_offset); in send_changed_checksum()
486 struct tcphdr *tcph = (struct tcphdr *)(buf + tcp_offset); in send_changed_seq()
569 sizeof(struct tcphdr) + PAYLOAD_LEN); in add_ipv4_ts_option()
709 sizeof(struct tcphdr) + PAYLOAD_LEN); in send_fragment6()
747 struct tcphdr *tcph; in check_recv_pkts()
771 tcph = (struct tcphdr *)(buffer + tcp_offset + ip_ext_len); in check_recv_pkts()
784 - sizeof(struct tcphdr) - sizeof(struct iphdr); in check_recv_pkts()
1079 total_hdr_len = tcp_offset + sizeof(struct tcphdr); in main()