]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust/telnet: convert parsers to nom7
authorPierre Chifflier <chifflier@wzdftpd.net>
Wed, 19 Jan 2022 13:28:30 +0000 (14:28 +0100)
committerVictor Julien <vjulien@oisf.net>
Thu, 29 Sep 2022 08:37:50 +0000 (10:37 +0200)
rust/src/telnet/telnet.rs

index bf12369c8c98706a9e7aff4bbe6075d38137ac6c..0fd2bb27ed6dc6a8f6a12651bd26801cfd6dfa53 100644 (file)
@@ -20,7 +20,7 @@ use crate::core::{ALPROTO_UNKNOWN, AppProto, Flow, IPPROTO_TCP};
 use crate::applayer::{self, *};
 use crate::frames::*;
 use std::ffi::CString;
-use nom;
+use nom7::IResult;
 use super::parser;
 
 static mut ALPROTO_TELNET: AppProto = ALPROTO_UNKNOWN;
@@ -375,7 +375,7 @@ impl TelnetState {
 
 /// Probe for a valid header.
 ///
-fn probe(input: &[u8]) -> nom::IResult<&[u8], ()> {
+fn probe(input: &[u8]) -> IResult<&[u8], ()> {
     // TODO see if we can implement something here. Ctl message is easy,
     // and 'login: ' is common, but we can have random text and possibly
     // other output as well. So for now data on port 23 is it.