pub struct FtpParser { /* private fields */ }Available on crate feature
ftp only.Expand description
SessionParser that emits one FtpMessage per parsed
FTP command / reply line plus aggregated
FtpMessage::Credentials / FtpMessage::Transfer /
FtpMessage::TlsUpgrade convenience events.
Implementations§
Trait Implementations§
Source§impl SessionParser for FtpParser
impl SessionParser for FtpParser
Source§type Message = FtpMessage
type Message = FtpMessage
Available on crate feature
session only.L7 message produced by this parser. Read more
Source§fn parser_kind(&self) -> ParserKind
fn parser_kind(&self) -> ParserKind
Available on crate feature
session only.Typed identity of this parser, surfaced on
crate::driver::Event::ParserClosed::parser_kind and
crate::driver::SlotHandle::parser_kind. Lifted from
&'static str to the ParserKind enum in 0.20 (#109);
originally added in 0.5.0. Read moreSource§fn feed_initiator(
&mut self,
bytes: &[u8],
_ts: Timestamp,
out: &mut Vec<Self::Message>,
)
fn feed_initiator( &mut self, bytes: &[u8], _ts: Timestamp, out: &mut Vec<Self::Message>, )
Available on crate feature
session only.Feed the next chunk of bytes from the initiator side.
ts is the observed time of the packet carrying these bytes.
Push any complete messages parsed during this call into
out. Read moreSource§fn feed_responder(
&mut self,
bytes: &[u8],
_ts: Timestamp,
out: &mut Vec<Self::Message>,
)
fn feed_responder( &mut self, bytes: &[u8], _ts: Timestamp, out: &mut Vec<Self::Message>, )
Available on crate feature
session only.Feed the next chunk of bytes from the responder side.
Source§fn fin_initiator(&mut self, _out: &mut Vec<Self::Message>)
fn fin_initiator(&mut self, _out: &mut Vec<Self::Message>)
Available on crate feature
session only.Initiator side has FIN’d. Default: no-op.
Source§fn fin_responder(&mut self, _out: &mut Vec<Self::Message>)
fn fin_responder(&mut self, _out: &mut Vec<Self::Message>)
Available on crate feature
session only.Responder side has FIN’d.
Source§fn rst_initiator(&mut self)
fn rst_initiator(&mut self)
Available on crate feature
session only.Initiator side observed a RST. Default: no-op.
Source§fn rst_responder(&mut self)
fn rst_responder(&mut self)
Available on crate feature
session only.Responder side observed a RST.
Source§fn on_tick(&mut self, _now: Timestamp, _out: &mut Vec<Self::Message>)
fn on_tick(&mut self, _now: Timestamp, _out: &mut Vec<Self::Message>)
Available on crate feature
session only.Periodic time hook. The driver calls this on every
sweep /
finish with the sweep’s now, for every still-live parser.
Lets stateful parsers emit time-driven messages (timeouts,
unanswered requests). Emitted messages are attributed to
FlowSide::Initiator. Default: no-op.Source§fn is_poisoned(&self) -> bool
fn is_poisoned(&self) -> bool
Available on crate feature
session only.True after the parser has hit an unrecoverable error and
can no longer make progress. The driver checks this after
every
feed_* / fin_* call and tears the flow down on
true. Default: false (parser never poisons). Read moreSource§fn poison_reason(&self) -> Option<&str>
fn poison_reason(&self) -> Option<&str>
Available on crate feature
session only.Optional human-readable description of why the parser
poisoned. Consulted only when
is_poisoned
returns true. Default: None. Read moreAuto Trait Implementations§
impl Freeze for FtpParser
impl RefUnwindSafe for FtpParser
impl Send for FtpParser
impl Sync for FtpParser
impl Unpin for FtpParser
impl UnsafeUnpin for FtpParser
impl UnwindSafe for FtpParser
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more