Helper function bpf_dynptr_write
Definition
Copyright (c) 2015 The Libbpf Authors. All rights reserved.
Write len bytes from src into dst, starting from offset into dst.
flags must be 0 except for skb-type dynptrs.
For skb-type dynptrs: _ All data slices of the dynptr are automatically invalidated after bpf_dynptr_write(). This is because writing may pull the skb and change the underlying packet buffer.
_ For _flags_, please see the flags accepted by **bpf_skb_store_bytes**().
Returns
0 on success, -E2BIG if offset + len exceeds the length of dst's data, -EINVAL if dst is an invalid dynptr or if dst is a read-only dynptr or if flags is not correct. For skb-type dynptrs, other errors correspond to errors returned by bpf_skb_store_bytes().
static long (* const bpf_dynptr_write)(const struct bpf_dynptr *dst, __u32 offset, void *src, __u32 len, __u64 flags) = (void *) 202;
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