Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v6.7 58 lines 2.0 kB view raw
1#ifndef __BPF_KFUNCS__ 2#define __BPF_KFUNCS__ 3 4struct bpf_sock_addr_kern; 5 6/* Description 7 * Initializes an skb-type dynptr 8 * Returns 9 * Error code 10 */ 11extern int bpf_dynptr_from_skb(struct __sk_buff *skb, __u64 flags, 12 struct bpf_dynptr *ptr__uninit) __ksym; 13 14/* Description 15 * Initializes an xdp-type dynptr 16 * Returns 17 * Error code 18 */ 19extern int bpf_dynptr_from_xdp(struct xdp_md *xdp, __u64 flags, 20 struct bpf_dynptr *ptr__uninit) __ksym; 21 22/* Description 23 * Obtain a read-only pointer to the dynptr's data 24 * Returns 25 * Either a direct pointer to the dynptr data or a pointer to the user-provided 26 * buffer if unable to obtain a direct pointer 27 */ 28extern void *bpf_dynptr_slice(const struct bpf_dynptr *ptr, __u32 offset, 29 void *buffer, __u32 buffer__szk) __ksym; 30 31/* Description 32 * Obtain a read-write pointer to the dynptr's data 33 * Returns 34 * Either a direct pointer to the dynptr data or a pointer to the user-provided 35 * buffer if unable to obtain a direct pointer 36 */ 37extern void *bpf_dynptr_slice_rdwr(const struct bpf_dynptr *ptr, __u32 offset, 38 void *buffer, __u32 buffer__szk) __ksym; 39 40extern int bpf_dynptr_adjust(const struct bpf_dynptr *ptr, __u32 start, __u32 end) __ksym; 41extern bool bpf_dynptr_is_null(const struct bpf_dynptr *ptr) __ksym; 42extern bool bpf_dynptr_is_rdonly(const struct bpf_dynptr *ptr) __ksym; 43extern __u32 bpf_dynptr_size(const struct bpf_dynptr *ptr) __ksym; 44extern int bpf_dynptr_clone(const struct bpf_dynptr *ptr, struct bpf_dynptr *clone__init) __ksym; 45 46/* Description 47 * Modify the address of a AF_UNIX sockaddr. 48 * Returns__bpf_kfunc 49 * -EINVAL if the address size is too big or, 0 if the sockaddr was successfully modified. 50 */ 51extern int bpf_sock_addr_set_sun_path(struct bpf_sock_addr_kern *sa_kern, 52 const __u8 *sun_path, __u32 sun_path__sz) __ksym; 53 54void *bpf_cast_to_kern_ctx(void *) __ksym; 55 56void *bpf_rdonly_cast(void *obj, __u32 btf_id) __ksym; 57 58#endif