Skip to content

Helper function bpf_tcp_check_syncookie

v5.2

Definition

Copyright (c) 2015 The Libbpf Authors. All rights reserved.

Check whether iph and th contain a valid SYN cookie ACK for the listening socket in sk.

iph points to the start of the IPv4 or IPv6 header, while iph_len contains sizeof(struct iphdr) or sizeof(struct ipv6hdr).

th points to the start of the TCP header, while th_len contains the length of the TCP header (at least sizeof(struct tcphdr)).

Returns

0 if iph and th are a valid SYN cookie ACK, or a negative error otherwise.

static long (* const bpf_tcp_check_syncookie)(void *sk, void *iph, __u32 iph_len, struct tcphdr *th, __u32 th_len) = (void *) 100;

Usage

Docs could be improved

This part of the docs is incomplete, contributions are very welcome

Program types

This helper call can be used in the following program types:

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome