fn inspect_content_filter(
    configpath: &str,
    meta: HashMap<String, String>,
    headers: HashMap<String, String>,
    mbody: Option<&[u8]>,
    ip: String,
    content_filter_id: String,
) -> Result<InspectionResult, String> {
    let mut logs = Logs::default();
    logs.debug("Inspection init");
    let rmeta: RequestMeta = RequestMeta::from_map(meta)?;

    let raw = RawRequest {
        ipstr: ip,
        meta: rmeta,
        headers,
        mbody,
    };

    let (dec, reqinfo, tags) =
        content_filter_check_generic_request_map(configpath, &raw, &content_filter_id, &mut logs);

    Ok(InspectionResult {
        decision: dec,
        tags: Some(tags),
        logs,
        err: None,
        rinfo: Some(reqinfo),
    })
}
/// Rust-native inspection top level function
Rust-native inspection top level function
Rust - native inspection top level function
fn inspect_content_filter(
    configpath: &str,
    meta: HashMap<String, String>,
    headers: HashMap<String, String>,
    mbody: Option<&[u8]>,
    ip: String,
    content_filter_id: String,
) -> Result<InspectionResult, String> {
    let mut logs = Logs::default();
    logs.debug("Inspection init");
    let rmeta: RequestMeta = RequestMeta::from_map(meta)?;
    let raw = RawRequest {
        ipstr: ip,
        meta: rmeta,
        headers,
        mbody,
    };
    let (dec, reqinfo, tags) =
        content_filter_check_generic_request_map(configpath, &raw, &content_filter_id, &mut logs);
    Ok(InspectionResult {
        decision: dec,
        tags: Some(tags),
        logs,
        err: None,
        rinfo: Some(reqinfo),
    })
}
fn inspect_content_filter ( configpath : & str , meta : HashMap < String , String > , headers : HashMap < String , String > , mbody : Option < & [ u8 ] > , ip : String , content_filter_id : String , ) -> Result < InspectionResult , String > { let mut logs = Logs :: default ( ) ; logs . debug ( " " ) ; let rmeta : RequestMeta = RequestMeta :: from_map ( meta ) ? ; let raw = RawRequest { ipstr : ip , meta : rmeta , headers , mbody , } ; let ( dec , reqinfo , tags ) = content_filter_check_generic_request_map ( configpath , & raw , & content_filter_id , & mut logs ) ; Ok ( InspectionResult { decision : dec , tags : Some ( tags ) , logs , err : None , rinfo : Some ( reqinfo ) , } ) }
Rust-native inspection top level function
Rust - native inspection top level function
configpath
&str
meta
HashMap<String, String>
headers
HashMap<String, String>
mbody
Option<&[u8]>
ip
String
content_filter_id
String