Helper function bpf_tcp_raw_gen_syncookie_ipv4
Definition
Copyright (c) 2015 The Libbpf Authors. All rights reserved.
Try to issue a SYN cookie for the packet with corresponding IPv4/TCP headers, iph and th, without depending on a listening socket.
iph points to the IPv4 header.
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
On success, lower 32 bits hold the generated SYN cookie in followed by 16 bits which hold the MSS value for that cookie, and the top 16 bits are unused.
On failure, the returned value is one of the following:
-EINVAL if th_len is invalid.
static __s64 (* const bpf_tcp_raw_gen_syncookie_ipv4)(struct iphdr *iph, struct tcphdr *th, __u32 th_len) = (void *) 204;
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