*/
use std;
-use core::{self, ALPROTO_UNKNOWN, AppProto, Flow};
+use core::{self, ALPROTO_UNKNOWN, AppProto, Flow, IPPROTO_TCP};
use libc;
use log::*;
use std::mem::transmute;
let parser = RustParser {
name: PARSER_NAME.as_ptr() as *const libc::c_char,
default_port: default_port.as_ptr(),
- ipproto: libc::IPPROTO_TCP,
+ ipproto: IPPROTO_TCP,
probe_ts: rs_template_probing_parser,
probe_tc: rs_template_probing_parser,
min_depth: 0,
pub const ALPROTO_UNKNOWN : AppProto = 0;
pub static mut ALPROTO_FAILED : AppProto = 0; // updated during init
+pub const IPPROTO_TCP : i32 = 6;
+pub const IPPROTO_UDP : i32 = 17;
+
macro_rules!BIT_U64 {
($x:expr) => (1 << $x);
}
use applayer;
use core;
-use core::{ALPROTO_UNKNOWN, AppProto, Flow};
+use core::{ALPROTO_UNKNOWN, AppProto, Flow, IPPROTO_UDP};
use core::{sc_detect_engine_state_free, sc_app_layer_decoder_events_free_events};
use dhcp::parser::*;
use libc;
let parser = RustParser {
name: PARSER_NAME.as_ptr() as *const libc::c_char,
default_port: ports.as_ptr(),
- ipproto: libc::IPPROTO_UDP,
+ ipproto: IPPROTO_UDP,
probe_ts: rs_dhcp_probing_parser,
probe_tc: rs_dhcp_probing_parser,
min_depth: 0,
let 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_ikev2_probing_parser,
probe_tc : rs_ikev2_probing_parser,
min_depth : 0,
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_krb5_probing_parser,
probe_tc : rs_krb5_probing_parser,
min_depth : 0,
SCLogDebug!("Protocol detecter and parser disabled for KRB5/UDP.");
}
// register TCP parser
- parser.ipproto = libc::IPPROTO_TCP;
+ parser.ipproto = core::IPPROTO_TCP;
parser.probe_ts = rs_krb5_probing_parser_tcp;
parser.probe_tc = rs_krb5_probing_parser_tcp;
parser.parse_ts = rs_krb5_parse_request_tcp;
let 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 : ntp_probing_parser,
probe_tc : ntp_probing_parser,
min_depth : 0,
/// Default port
pub default_port: *const c_char,
- /// IP Protocol (libc::IPPROTO_UDP, libc::IPPROTO_TCP, etc.)
+ /// IP Protocol (core::IPPROTO_UDP, core::IPPROTO_TCP, etc.)
pub ipproto: c_int,
/// Probing function, for packets going to server