|
|
|
@ -39,7 +39,6 @@ use aya::programs::SocketFilter;
|
|
|
|
|
use aya_log::BpfLogger;
|
|
|
|
|
use clap::Parser;
|
|
|
|
|
use log::info;
|
|
|
|
|
use simplelog::{ColorChoice, ConfigBuilder, LevelFilter, TermLogger, TerminalMode};
|
|
|
|
|
use tokio::signal;
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Parser)]
|
|
|
|
@ -60,15 +59,7 @@ struct Opt {
|
|
|
|
|
async fn main() -> Result<(), anyhow::Error> {
|
|
|
|
|
let opt = Opt::parse();
|
|
|
|
|
|
|
|
|
|
TermLogger::init(
|
|
|
|
|
LevelFilter::Debug,
|
|
|
|
|
ConfigBuilder::new()
|
|
|
|
|
.set_target_level(LevelFilter::Error)
|
|
|
|
|
.set_location_level(LevelFilter::Error)
|
|
|
|
|
.build(),
|
|
|
|
|
TerminalMode::Mixed,
|
|
|
|
|
ColorChoice::Auto,
|
|
|
|
|
)?;
|
|
|
|
|
env_logger::init();
|
|
|
|
|
|
|
|
|
|
// This will include your eBPF object file as raw bytes at compile-time and load it at
|
|
|
|
|
// runtime. This approach is recommended for most real-world use cases. If you would
|
|
|
|
|