Lines Matching refs:tcp_len
258 __u16 tcp_len, __be32 *tsval, in tscookie_init() argument
263 .end = (__u8 *)tcp_header + tcp_len, in tscookie_init()
350 __u16 tcp_len; member
401 hdr->tcp_len = hdr->tcp->doff * 4; in tcp_dissect()
402 if (hdr->tcp_len < sizeof(*hdr->tcp)) in tcp_dissect()
532 hdr->tcp_len = hdr->tcp->doff * 4; in tcpv4_gen_synack()
533 hdr->ipv4->tot_len = bpf_htons(sizeof(*hdr->ipv4) + hdr->tcp_len); in tcpv4_gen_synack()
553 hdr->tcp_len = hdr->tcp->doff * 4; in tcpv6_gen_synack()
554 hdr->ipv6->payload_len = bpf_htons(hdr->tcp_len); in tcpv6_gen_synack()
605 value = bpf_csum_diff(0, 0, (void *)hdr->tcp, hdr->tcp_len, 0); in syncookie_handle_syn()
609 hdr->tcp_len, IPPROTO_TCP, value) != 0) in syncookie_handle_syn()
615 hdr->tcp_len); in syncookie_handle_syn()
618 value = bpf_csum_diff(0, 0, (void *)hdr->tcp, hdr->tcp_len, 0); in syncookie_handle_syn()
622 hdr->tcp_len, IPPROTO_TCP, value) != 0) in syncookie_handle_syn()
628 hdr->tcp_len); in syncookie_handle_syn()
637 if (tscookie_init((void *)hdr->tcp, hdr->tcp_len, in syncookie_handle_syn()
668 value = bpf_csum_diff(0, 0, (void *)hdr->tcp, hdr->tcp_len, 0); in syncookie_handle_syn()
674 hdr->tcp_len, in syncookie_handle_syn()
686 hdr->tcp_len, in syncookie_handle_syn()
750 if (bpf_xdp_adjust_tail(ctx, TCP_MAXLEN - hdr->tcp_len)) in syncookie_part1()
758 if (bpf_skb_change_tail(ctx, old_len + TCP_MAXLEN - hdr->tcp_len, 0)) in syncookie_part1()
791 hdr->tcp_len = hdr->tcp->doff * 4; in syncookie_part2()
792 if (hdr->tcp_len < sizeof(*hdr->tcp)) in syncookie_part2()