foniod / redbpf

Rust library for building and running BPF/eBPF modules
Apache License 2.0
1.71k stars 136 forks source link

Handle of missing structures in bindgen from sources #350

Closed qjerome closed 2 years ago

qjerome commented 2 years ago

Hello,

I noticed that fs_struct binding was missing while generating bindings from sources in redbpf-probes. I propose a way, that I hope follow your standards to fix that. Basically I created a file kernel_supplement.h where missing headers should be put when needed. This file is used only when building from sources.

I also added accessors for task_struct and fs_struct

This patch has been tested on Archlinux and works for both vmlinux and kernel source building.