Skip to content

Instantly share code, notes, and snippets.

@garyachy
Last active May 18, 2019
Embed
What would you like to do?
eBPF application example
#include <linux/bpf.h>
#ifndef __section
# define __section(NAME) \
__attribute__((section(NAME), used))
#endif
__section("prog")
int xdp_drop(struct xdp_md *ctx)
{
return XDP_DROP;
}
char __license[] __section("license") = "GPL";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment