|
|
@ -46,6 +46,7 @@ use aya_log::BpfLogger;
|
|
|
|
use clap::Parser;
|
|
|
|
use clap::Parser;
|
|
|
|
{% endif -%}
|
|
|
|
{% endif -%}
|
|
|
|
use log::{info, warn};
|
|
|
|
use log::{info, warn};
|
|
|
|
|
|
|
|
use rlimit::Resource;
|
|
|
|
use tokio::signal;
|
|
|
|
use tokio::signal;
|
|
|
|
|
|
|
|
|
|
|
|
{% if program_types_with_opts contains program_type -%}
|
|
|
|
{% if program_types_with_opts contains program_type -%}
|
|
|
@ -71,6 +72,14 @@ async fn main() -> Result<(), anyhow::Error> {
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
env_logger::init();
|
|
|
|
env_logger::init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if !Resource::MEMLOCK
|
|
|
|
|
|
|
|
.set(rlimit::INFINITY, rlimit::INFINITY)
|
|
|
|
|
|
|
|
.is_ok()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
warn!("cannot remove mem lock");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// This will include your eBPF object file as raw bytes at compile-time and load it at
|
|
|
|
// 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
|
|
|
|
// runtime. This approach is recommended for most real-world use cases. If you would
|
|
|
|
// like to specify the eBPF program at runtime rather than at compile-time, you can
|
|
|
|
// like to specify the eBPF program at runtime rather than at compile-time, you can
|
|
|
|