#[non_exhaustive]pub enum FtpMessage {
Command {
verb: FtpCommand,
args: String,
},
Reply {
code: u16,
text: String,
},
Banner {
banner: String,
},
Credentials {
user: String,
pass: String,
},
TlsUpgrade,
Transfer {
kind: TransferKind,
filename: String,
},
}ftp only.Expand description
One parsed FTP control-channel message. Emitted in arrival order across both directions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Command
A command from the client (initiator). args is the
raw argument string — empty when the command takes
no argument (e.g. PASV, QUIT).
Reply
A reply from the server (responder). code is the
3-digit numeric code; text is the trailing text.
Multi-line replies are coalesced to their final-line
text only per RFC 959 §4.2.
Banner
Server banner — first 220 reply on a fresh session.
Convenience emission alongside the corresponding
Self::Reply; commonly carries vendor + version
strings (220 (vsFTPd 3.0.3)).
Fields
Credentials
A USER name / PASS secret pair, surfaced as one
event after both have been observed on the initiator
side. Cleartext credential capture (T1078, T1110).
TlsUpgrade
AUTH TLS / AUTH SSL was accepted (234 reply).
After this event the parser stops draining bytes —
pair with flowscope::tls for the encrypted
handshake.
Transfer
A data-transfer command. Surfaced as its own event
(in addition to the underlying Self::Command) so
downstream rules can react without parsing arg
strings.
Trait Implementations§
Source§impl Clone for FtpMessage
impl Clone for FtpMessage
Source§fn clone(&self) -> FtpMessage
fn clone(&self) -> FtpMessage
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FtpMessage
impl Debug for FtpMessage
Source§impl<'de> Deserialize<'de> for FtpMessage
impl<'de> Deserialize<'de> for FtpMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for FtpMessage
Source§impl PartialEq for FtpMessage
impl PartialEq for FtpMessage
Source§impl Serialize for FtpMessage
impl Serialize for FtpMessage
impl StructuralPartialEq for FtpMessage
Auto Trait Implementations§
impl Freeze for FtpMessage
impl RefUnwindSafe for FtpMessage
impl Send for FtpMessage
impl Sync for FtpMessage
impl Unpin for FtpMessage
impl UnsafeUnpin for FtpMessage
impl UnwindSafe for FtpMessage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.