fn start_backend(
    tracer_config: TracerConfig,
    trace_data: Arc<RwLock<Trace>>,
) -> anyhow::Result<()> {
    let channel = TracerChannel::new(
        tracer_config.target_addr,
        tracer_config.trace_identifier,
        tracer_config.packet_size,
        tracer_config.payload_pattern,
        tracer_config.source_port,
    )?;
    thread::Builder::new()
        .name(format!("tracer-{}", tracer_config.trace_identifier.0))
        .spawn(move || {
            drop_caps().expect("failed to drop capabilities in tracer thread");
            backend::run_backend(&tracer_config, channel, trace_data).expect("backend failed");
        })?;

    Ok(())
}
/// Create the network channel and then dropping all capabilities.
Create the network channel and then dropping all capabilities.
Create the network channel and then dropping all capabilities .
fn start_backend(
    tracer_config: TracerConfig,
    trace_data: Arc<RwLock<Trace>>,
) -> anyhow::Result<()> {
    let channel = TracerChannel::new(
        tracer_config.target_addr,
        tracer_config.trace_identifier,
        tracer_config.packet_size,
        tracer_config.payload_pattern,
        tracer_config.source_port,
    )?;
    thread::Builder::new()
        .name(format!("tracer-{}", tracer_config.trace_identifier.0))
        .spawn(move || {
            drop_caps().expect("failed to drop capabilities in tracer thread");
            backend::run_backend(&tracer_config, channel, trace_data).expect("backend failed");
        })?;
    Ok(())
}
fn start_backend ( tracer_config : TracerConfig , trace_data : Arc < RwLock < Trace > > , ) -> anyhow :: Result < ( ) > { let channel = TracerChannel :: new ( tracer_config . target_addr , tracer_config . trace_identifier , tracer_config . packet_size , tracer_config . payload_pattern , tracer_config . source_port , ) ? ; thread :: Builder :: new ( ) . name ( format ! ( " " tracer_config trace_identifier 0 ) ) . spawn ( move | | { drop_caps ( ) . expect ( " " ) ; backend :: run_backend ( & tracer_config , channel , trace_data ) . expect ( " " ) ; } ) ? ; Ok ( ( ) ) }
Create the network channel and then dropping all capabilities.
Create the network channel and then dropping all capabilities .
tracer_config
TracerConfig
trace_data
Arc<RwLock<Trace>>