mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
![]() |
#ifndef __BPF_KFUNCS__
|
||
|
#define __BPF_KFUNCS__
|
||
|
|
||
|
/* Description
|
||
|
* Initializes an skb-type dynptr
|
||
|
* Returns
|
||
|
* Error code
|
||
|
*/
|
||
|
extern int bpf_dynptr_from_skb(struct __sk_buff *skb, __u64 flags,
|
||
|
struct bpf_dynptr *ptr__uninit) __ksym;
|
||
|
|
||
|
/* Description
|
||
|
* Initializes an xdp-type dynptr
|
||
|
* Returns
|
||
|
* Error code
|
||
|
*/
|
||
|
extern int bpf_dynptr_from_xdp(struct xdp_md *xdp, __u64 flags,
|
||
|
struct bpf_dynptr *ptr__uninit) __ksym;
|
||
|
|
||
|
/* Description
|
||
|
* Obtain a read-only pointer to the dynptr's data
|
||
|
* Returns
|
||
|
* Either a direct pointer to the dynptr data or a pointer to the user-provided
|
||
|
* buffer if unable to obtain a direct pointer
|
||
|
*/
|
||
|
extern void *bpf_dynptr_slice(const struct bpf_dynptr *ptr, __u32 offset,
|
||
|
void *buffer, __u32 buffer__szk) __ksym;
|
||
|
|
||
|
/* Description
|
||
|
* Obtain a read-write pointer to the dynptr's data
|
||
|
* Returns
|
||
|
* Either a direct pointer to the dynptr data or a pointer to the user-provided
|
||
|
* buffer if unable to obtain a direct pointer
|
||
|
*/
|
||
|
extern void *bpf_dynptr_slice_rdwr(const struct bpf_dynptr *ptr, __u32 offset,
|
||
|
void *buffer, __u32 buffer__szk) __ksym;
|
||
|
|
||
|
#endif
|