fn simple_exact_match(fingerprint: &OSFingerprint, mdb: &Vec<OSFingerprint>) -> Option<(String, String)> {
    for mf in mdb {
        if fingerprint.icmp_echo_code != mf.icmp_echo_code {
            continue;
        }
        if fingerprint.icmp_ip_ttl != mf.icmp_ip_ttl {
            continue;
        }
        if fingerprint.icmp_echo_ip_df != mf.icmp_echo_ip_df {
            continue;
        }
        if fingerprint.icmp_unreach_ip_df != mf.icmp_unreach_ip_df {
            continue;
        }
        if fingerprint.icmp_unreach_ip_len != mf.icmp_unreach_ip_len {
            continue;
        }
        if fingerprint.icmp_unreach_data_ip_id_byte_order != mf.icmp_unreach_data_ip_id_byte_order {
            continue;
        }
        if fingerprint.tcp_ip_ttl != mf.tcp_ip_ttl {
            continue;
        }
        if fingerprint.tcp_ip_df != mf.tcp_ip_df {
            continue;
        }
        if fingerprint.tcp_window_size.len() > 0 {
            if !mf.tcp_window_size.contains(&fingerprint.tcp_window_size[0]) {
                continue;
            } 
        }else{
            continue;
        }
        if fingerprint.tcp_option_order.len() > 0 {
            if !mf.tcp_option_order.contains(&fingerprint.tcp_option_order[0]) {
                continue;
            } 
        }else{
            continue;
        }
        if fingerprint.tcp_rst_text_payload != mf.tcp_rst_text_payload {
            continue;
        }
        return Some((mf.os_name.clone(), mf.version.clone()));
    }
    None
}
// TCP ECN Probe is used for version detection, so it is skipped in simple detection
TCP ECN Probe is used for version detection, so it is skipped in simple detection
TCP ECN Probe is used for version detection so it is skipped in simple detection
fn simple_exact_match(fingerprint: &OSFingerprint, mdb: &Vec<OSFingerprint>) -> Option<(String, String)> {
    for mf in mdb {
        if fingerprint.icmp_echo_code != mf.icmp_echo_code {
            continue;
        }
        if fingerprint.icmp_ip_ttl != mf.icmp_ip_ttl {
            continue;
        }
        if fingerprint.icmp_echo_ip_df != mf.icmp_echo_ip_df {
            continue;
        }
        if fingerprint.icmp_unreach_ip_df != mf.icmp_unreach_ip_df {
            continue;
        }
        if fingerprint.icmp_unreach_ip_len != mf.icmp_unreach_ip_len {
            continue;
        }
        if fingerprint.icmp_unreach_data_ip_id_byte_order != mf.icmp_unreach_data_ip_id_byte_order {
            continue;
        }
        if fingerprint.tcp_ip_ttl != mf.tcp_ip_ttl {
            continue;
        }
        if fingerprint.tcp_ip_df != mf.tcp_ip_df {
            continue;
        }
        if fingerprint.tcp_window_size.len() > 0 {
            if !mf.tcp_window_size.contains(&fingerprint.tcp_window_size[0]) {
                continue;
            } 
        }else{
            continue;
        }
        if fingerprint.tcp_option_order.len() > 0 {
            if !mf.tcp_option_order.contains(&fingerprint.tcp_option_order[0]) {
                continue;
            } 
        }else{
            continue;
        }
        if fingerprint.tcp_rst_text_payload != mf.tcp_rst_text_payload {
            continue;
        }
        return Some((mf.os_name.clone(), mf.version.clone()));
    }
    None
}
fn simple_exact_match ( fingerprint : & OSFingerprint , mdb : & Vec < OSFingerprint > ) -> Option < ( String , String ) > { for mf in mdb { if fingerprint . icmp_echo_code != mf . icmp_echo_code { continue ; } if fingerprint . icmp_ip_ttl != mf . icmp_ip_ttl { continue ; } if fingerprint . icmp_echo_ip_df != mf . icmp_echo_ip_df { continue ; } if fingerprint . icmp_unreach_ip_df != mf . icmp_unreach_ip_df { continue ; } if fingerprint . icmp_unreach_ip_len != mf . icmp_unreach_ip_len { continue ; } if fingerprint . icmp_unreach_data_ip_id_byte_order != mf . icmp_unreach_data_ip_id_byte_order { continue ; } if fingerprint . tcp_ip_ttl != mf . tcp_ip_ttl { continue ; } if fingerprint . tcp_ip_df != mf . tcp_ip_df { continue ; } if fingerprint . tcp_window_size . len ( ) > 0 { if ! mf . tcp_window_size . contains ( & fingerprint . tcp_window_size [ 0 ] ) { continue ; } } else { continue ; } if fingerprint . tcp_option_order . len ( ) > 0 { if ! mf . tcp_option_order . contains ( & fingerprint . tcp_option_order [ 0 ] ) { continue ; } } else { continue ; } if fingerprint . tcp_rst_text_payload != mf . tcp_rst_text_payload { continue ; } return Some ( ( mf . os_name . clone ( ) , mf . version . clone ( ) ) ) ; } None }
TCP ECN Probe is used for version detection, so it is skipped in simple detection
TCP ECN Probe is used for version detection so it is skipped in simple detection
fingerprint
&OSFingerprint
mdb
&Vec<OSFingerprint>
fingerprint
&OSFingerprint
mdb
&Vec<OSFingerprint>