title | description |
---|---|
Helper Function 'bpf_sysctl_get_new_value' |
This page documents the 'bpf_sysctl_get_new_value' eBPF helper function, including its defintion, usage, program types that can use it, and examples. |
Copyright (c) 2015 The Libbpf Authors. All rights reserved.
Get new value being written by user space to sysctl (before the actual write happens) and copy it as a string into provided by program buffer buf of size buf_len.
User space may write new value at file position > 0.
The buffer is always NUL terminated, unless it's zero-sized.
Number of character copied (not including the trailing NUL).
-E2BIG if the buffer wasn't big enough (buf will contain truncated name in this case).
-EINVAL if sysctl is being read.
#!c static long (* const bpf_sysctl_get_new_value)(struct bpf_sysctl *ctx, char *buf, unsigned long buf_len) = (void *) 103;
!!! example "Docs could be improved" This part of the docs is incomplete, contributions are very welcome
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