Skip to content

Helper function bpf_skb_under_cgroup

v4.8

Definition

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

Check whether skb is a descendant of the cgroup2 held by map of type BPF_MAP_TYPE_CGROUP_ARRAY, at index.

Returns

The return value depends on the result of the test, and can be:

  • 0, if the skb failed the cgroup2 descendant test.
  • 1, if the skb succeeded the cgroup2 descendant test.
  • A negative error code, if an error occurred.

static long (* const bpf_skb_under_cgroup)(struct __sk_buff *skb, void *map, __u32 index) = (void *) 33;

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