Skip to content

Helper function bpf_tcp_raw_gen_syncookie_ipv6

v6.0

Definition

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

Try to issue a SYN cookie for the packet with corresponding IPv6/TCP headers, iph and th, without depending on a listening socket.

iph points to the IPv6 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.

-EPROTONOSUPPORT if CONFIG_IPV6 is not builtin.

static __s64 (* const bpf_tcp_raw_gen_syncookie_ipv6)(struct ipv6hdr *iph, struct tcphdr *th, __u32 th_len) = (void *) 205;

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