eBPF

1 program Added 2026-02-13T11:31:16Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: extended Berkeley Packet Filter, BPF
Provenance: commit 9ba6735dc2 · authored 2026-02-13T12:32:06+01:00 · agent claude-code · model sonnet

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

BPF (0.48)PF (0.30)EBF (0.23)Extended ML (0.19)EXAPT (0.19)

LLM-contributed programs

XDP TCP Packet Filter

Provenance: commit 9ba6735dc2 · authored 2026-02-13T12:32:06+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.c · license: GPL · added: 2026-02-13T11:31:16Z
#include <linux/bpf.h>
#include <linux/if_ether.h>
#include <linux/ip.h>

SEC("xdp")
int xdp_drop_tcp(struct xdp_md *ctx)
{
    void *data_end = (void *)(long)ctx->data_end;
    void *data = (void *)(long)ctx->data;
    struct ethhdr *eth = data;

    if ((void *)(eth + 1) > data_end)
        return XDP_PASS;

    if (eth->h_proto != __constant_htons(ETH_P_IP))
        return XDP_PASS;

    struct iphdr *ip = (void *)(eth + 1);
    if ((void *)(ip + 1) > data_end)
        return XDP_PASS;

    if (ip->protocol == IPPROTO_TCP)
        return XDP_DROP;

    return XDP_PASS;
}

char _license[] SEC("license") = "GPL";

Contribute — propose a file extension

Tell us where to find evidence about eBPF (mapped to pl/ebpf). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/eBPF/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← ebnf Ebur →