#[non_exhaustive]pub enum IpProtocolState {
Unasked,
OpenOrNoReply,
Blocked,
Closed,
Open,
}Expand description
What a scan established about a host accepting one IP protocol.
Ordered from least to most definitive, so Host::merge promotes by
comparison.
As with PortState, a packet outranks silence:
Blocked sits above OpenOrNoReply.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unasked
No probe was sent, so nothing was established either way.
A protocol the scan named but never reached. The counterpart of
PortState::Unasked.
OpenOrNoReply
A probe was sent and nothing came back.
The ordinary verdict: most protocols answer nothing even where the host speaks them, so silence cannot tell acceptance from a filter.
Blocked
Something in the path refused the protocol, by an ICMP unreachable that was not a protocol unreachable: administratively prohibited, or a communication filter.
A statement about the path; the host may speak the protocol.
Closed
The host’s own stack said it does not speak this protocol, by an ICMP protocol unreachable (RFC 792 type 3 code 2, RFC 4443 type 1 code 4).
The host’s own negative verdict, which proves it is there.
Open
The host answered in the protocol that was asked about.
Only reachable for a protocol whose answers this build can recognise and
capture; see IpProtocolScan for
which those are and why silence is the usual answer for the rest.
Implementations§
Source§impl IpProtocolState
impl IpProtocolState
Sourcepub const ALL: &'static [Self]
pub const ALL: &'static [Self]
Every state, in declaration order, which is least definitive first and is
the order this type’s Ord ranks by.
Read by the check holding the exported schema to what this build can write.
Sourcepub fn is_accepted(&self) -> bool
pub fn is_accepted(&self) -> bool
Whether the host is known to take delivery of the protocol.
Sourcepub fn is_established(&self) -> bool
pub fn is_established(&self) -> bool
Whether anything at all was established.
False only for Unasked, a fact about the scan.
Trait Implementations§
Source§impl Clone for IpProtocolState
impl Clone for IpProtocolState
impl Copy for IpProtocolState
Source§impl Debug for IpProtocolState
impl Debug for IpProtocolState
impl Eq for IpProtocolState
Source§impl Hash for IpProtocolState
impl Hash for IpProtocolState
Source§impl Ord for IpProtocolState
impl Ord for IpProtocolState
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for IpProtocolState
impl PartialEq for IpProtocolState
Source§impl PartialOrd for IpProtocolState
impl PartialOrd for IpProtocolState
impl StructuralPartialEq for IpProtocolState
Auto Trait Implementations§
impl Freeze for IpProtocolState
impl RefUnwindSafe for IpProtocolState
impl Send for IpProtocolState
impl Sync for IpProtocolState
impl Unpin for IpProtocolState
impl UnsafeUnpin for IpProtocolState
impl UnwindSafe for IpProtocolState
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more