pub fn ensure_caps() -> anyhow::Result<()> {
    if caps::has_cap(None, caps::CapSet::Permitted, caps::Capability::CAP_NET_RAW)? {
        caps::raise(None, caps::CapSet::Effective, caps::Capability::CAP_NET_RAW)?;
    } else {
        eprintln!("capability CAP_NET_RAW is required, see https://github.com/fujiapple852/trippy#privileges");
        std::process::exit(-1);
    }
    Ok(())
}
/// Check if `CAP_NET_RAW` is in the permitted set and if so raise it to the effective set.
Check if `CAP_NET_RAW` is in the permitted set and if so raise it to the effective set.
Check if ` CAP_NET_RAW ` is in the permitted set and if so raise it to the effective set .
pub fn ensure_caps() -> anyhow::Result<()> {
    if caps::has_cap(None, caps::CapSet::Permitted, caps::Capability::CAP_NET_RAW)? {
        caps::raise(None, caps::CapSet::Effective, caps::Capability::CAP_NET_RAW)?;
    } else {
        eprintln!("capability CAP_NET_RAW is required, see https://github.com/fujiapple852/trippy#privileges");
        std::process::exit(-1);
    }
    Ok(())
}
pub fn ensure_caps ( ) -> anyhow :: Result < ( ) > { if caps :: has_cap ( None , caps :: CapSet :: Permitted , caps :: Capability :: CAP_NET_RAW ) ? { caps :: raise ( None , caps :: CapSet :: Effective , caps :: Capability :: CAP_NET_RAW ) ? ; } else { eprintln ! ( " " ) ; std :: process :: exit ( - 1 ) ; } Ok ( ( ) ) }
Check if `CAP_NET_RAW` is in the permitted set and if so raise it to the effective set.
Check if ` CAP_NET_RAW ` is in the permitted set and if so raise it to the effective set .