Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 1.81 KB

bpf_tcp_raw_gen_syncookie_ipv6.md

File metadata and controls

53 lines (33 loc) · 1.81 KB
title description
Helper Function 'bpf_tcp_raw_gen_syncookie_ipv6'
This page documents the 'bpf_tcp_raw_gen_syncookie_ipv6' eBPF helper function, including its defintion, usage, program types that can use it, and examples.

Helper function bpf_tcp_raw_gen_syncookie_ipv6

:octicons-tag-24: 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.

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

Usage

!!! example "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

!!! example "Docs could be improved" This part of the docs is incomplete, contributions are very welcome