How pk-218/aegis-node works
Main System Components
• eBPF Program Component (aegis-node-ebpf)
• Userspace Program Component (aegis-node)
• Common Library Component (aegis-node-common)
• Build System Component (xtask)
┌─ Userspace Layer ─────────────────────┐
• aegis-node (Userspace Application) │
• ┤
• aegis-node-common (Shared Library) │
• ┤
• Kernel Layer │
• aegis-node-ebpf (eBPF Program) │
• ┘
Component Relationships
• Data flow between userspace and kernel space
• Dependency relationships between components
• Build process flow
Specific Elements
a) eBPF Program Component (aegis-node-ebpf):
• Connection to kernel hooks
• Packet processing functionality (based on packet_info.rs)
• As running in kernel context
b) Userspace Component (aegis-node):
• EBPF program loading mechanism
• Communication channel with eBPF program
• As running in user context
c) Common Library (aegis-node-common):
• Shared structures and types
• Usage by both userspace and eBPF components
d) Build System (xtask):
• Build workflow
• Separate compilation paths for eBPF and userspace code
Additional Details
Technical specifications:
• Rust toolchain requirements (stable and nightly)
• BPF linker dependency
• Compilation targets
• Runtime configuration (RUST_LOG=info)