fn should_handle_new_sock()

in nfm-common/src/sock_ops_handler.rs [42:50]


    fn should_handle_new_sock(&self) -> bool {
        let control_option = bpf_map_get!(self, NFM_CONTROL, &SINGLETON_KEY);
        if let Some(control_data) = control_option {
            let sampling_interval = control_data.sampling_interval;
            sampling_interval <= 1 || bpf_get_rand_u32!(self) % sampling_interval == 0
        } else {
            true
        }
    }