Skip to content

KFunc bpf_strlen

v6.17

Calculate the length of a string

Definition

Parameters

s__ign: The string

Returns

  • >=0 - The length of s__ign
  • -EFAULT - Cannot read s__ign
  • -E2BIG - s__ign is too large
  • -ERANGE - s__ign is outside of kernel address space

Signature

int bpf_strlen(const char *s__ign)

Usage

Docs could be improved

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

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