Commit Graph

3 Commits (da81c221d36fd7a73fd935332a688c113b601295)

Author SHA1 Message Date
Krish Sharma da81c221d3 feat: add comprehensive structured logging system
Structured Logging Module (logger.rs):
- Multiple output formats: JSON, CSV, JSONL, Console
- Configurable buffering and log rotation settings
- Thread-safe logging with Arc<Mutex<>> for concurrent access
- Rich log entries with metadata and flow correlation

Log Entry Features:
- Timestamp (Unix and ISO 8601 formats)
- Source/destination IP addresses and ports
- Protocol information (name and number)
- Packet size and action taken (LOG/DROP)
- Network interface and unique flow hash
- Structured serialization with serde

Output Format Support:
- Console: Human-readable real-time logging
- JSON: Structured array format for batch processing
- JSONL: Line-delimited JSON for streaming analytics
- CSV: Spreadsheet-compatible format with headers

Performance Optimizations:
- Buffered I/O with configurable buffer sizes
- Efficient serialization and string formatting
- Minimal allocation during high-throughput logging

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
3 weeks ago
Krish Sharma 21bd2041e7 feat: implement core eBPF traffic monitoring functionality
Core eBPF Program (traffic_monitor.bpf.rs):
- XDP-based packet processing for high performance
- IP header parsing and CIDR range matching
- Configurable packet dropping or logging
- Ring buffer event logging to userspace

Supporting Modules:
- config.rs: JSON configuration management for CIDR ranges
- ip_utils.rs: CIDR parsing and IP matching utilities
- event_handler.rs: Traffic event processing and statistics
- lib.rs: Module exports and shared structures

Key Features:
- Line-rate packet filtering in kernel space
- Support for up to 256 permitted CIDR ranges
- Real-time event streaming via ring buffers
- Protocol-aware logging (TCP/UDP/ICMP/etc.)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
3 weeks ago
Krish Sharma c590290bdf feat: initialize eBPF traffic monitor project structure
- Add Cargo.toml with aya dependencies and project configuration
- Add build.rs with aya-build integration for eBPF compilation
- Configure workspace and example targets

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
3 weeks ago