Skip to content

KFunc bpf_session_cookie

v6.10

Get a pointer to a 64-bit session cookie.

Definition

Returns

Returns pointer to the cookie value. The bpf program can use the pointer to store (on entry) and load (on return) the value.

__u64 *bpf_session_cookie()

Usage

The session cookie is u64 value, implemented via fprobe feature that allows to share values between entry and return ftrace fprobe callbacks.

Program types

The following program types can make use of this kfunc:

Example

Docs could be improved

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