From: Pierre Chifflier Date: Tue, 21 May 2019 19:10:02 +0000 (+0200) Subject: rust/snmp: fix missing IPPROTO_* declarations (use core) X-Git-Tag: suricata-5.0.0-rc1~420 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c60f2028e5a0540547385b835fe4aa6101156138;p=thirdparty%2Fsuricata.git rust/snmp: fix missing IPPROTO_* declarations (use core) --- diff --git a/rust/src/snmp/snmp.rs b/rust/src/snmp/snmp.rs index 3f8f6fd748..5c8ff05339 100644 --- a/rust/src/snmp/snmp.rs +++ b/rust/src/snmp/snmp.rs @@ -564,7 +564,7 @@ pub unsafe extern "C" fn rs_register_snmp_parser() { let mut parser = RustParser { name : PARSER_NAME.as_ptr() as *const libc::c_char, default_port : default_port.as_ptr(), - ipproto : libc::IPPROTO_UDP, + ipproto : core::IPPROTO_UDP, probe_ts : rs_snmp_probing_parser, probe_tc : rs_snmp_probing_parser, min_depth : 0, @@ -600,7 +600,7 @@ pub unsafe extern "C" fn rs_register_snmp_parser() { if AppLayerParserConfParserEnabled(ip_proto_str.as_ptr(), parser.name) != 0 { let _ = AppLayerRegisterParser(&parser, alproto); } - AppLayerParserRegisterGetTxIterator(libc::IPPROTO_UDP as u8, alproto, rs_snmp_get_tx_iterator); + AppLayerParserRegisterGetTxIterator(core::IPPROTO_UDP as u8, alproto, rs_snmp_get_tx_iterator); // port 162 let default_port_traps = CString::new("162").unwrap(); parser.default_port = default_port_traps.as_ptr();