Files
Yaya48 cf256aa081 Import QEMU upstream snapshot d2e570c
Upstream: https://gitlab.com/qemu-project/qemu.git

Upstream-Commit: d2e570cc0f97b936902a5b1b86b73c0f5998b475
2026-08-31 02:15:30 +02:00

30 lines
954 B
C

/*
* QEMU eBPF binary declaration routine.
*
* Developed by Daynix Computing LTD (http://www.daynix.com)
*
* Authors:
* Andrew Melnychenko <[email protected]>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef EBPF_H
#define EBPF_H
void ebpf_register_binary_data(int id, const void *data,
size_t datalen);
const void *ebpf_find_binary_by_id(int id, size_t *sz,
struct Error **errp);
#define ebpf_binary_init(id, fn) \
static void __attribute__((constructor)) ebpf_binary_init_ ## fn(void) \
{ \
size_t datalen = 0; \
const void *data = fn(&datalen); \
ebpf_register_binary_data(id, data, datalen); \
}
#endif /* EBPF_H */