#[non_exhaustive]pub struct RefusedStep {
pub scanner: ScannerKind,
pub reason: String,
}Expand description
Something the scan will not do, decided at planning time.
The ground was never probed, for a reason knowable before anything is sent. It is reported so a caller can tell “nothing is there” from “nobody looked”.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.scanner: ScannerKindThe strategy that would have taken this work.
reason: StringOne short line: the ground, then the reason and any remedy in brief. The full reasoning is on the function that builds each refusal.
Implementations§
Source§impl RefusedStep
impl RefusedStep
Sourcepub fn technique_needs_raw_sockets(technique: TcpScanTechnique) -> Self
pub fn technique_needs_raw_sockets(technique: TcpScanTechnique) -> Self
The TCP half left undone because technique cannot be expressed without
raw sockets.
A connect scan answers roughly what a SYN scan asks, but cannot send a FIN, a flagless segment or a bare ACK, so it cannot stand in for those.
Reached from PortScanPlan::build when there are no raw sockets, and from
the scan’s coverage check when a raw socket was expected and would not open.
Sourcepub fn sctp_needs_raw_sockets() -> Self
pub fn sctp_needs_raw_sockets() -> Self
SCTP ports were named by a scan with no raw sockets to probe them with.
There is no unprivileged INIT scan: the kernel offers no way to send a chunk and read the answer without completing an association.
Sourcepub fn sctp_not_in_an_idle_scan() -> Self
pub fn sctp_not_in_an_idle_scan() -> Self
SCTP ports were named for a scan running as an idle scan, which probes through a third party and has no way to carry an INIT.
An INIT sent directly would leave this host’s own address on the target.
Sourcepub fn udp_not_in_an_idle_scan() -> Self
pub fn udp_not_in_an_idle_scan() -> Self
UDP ports were named for a scan running as an idle scan, for the reason
sctp_not_in_an_idle_scan gives:
the zombie’s counter moves only for the TCP segments it answers, so a
datagram has no way to be read through it, and one sent directly would
put this host’s address on the target.
Sourcepub fn idle_needs_privilege() -> Self
pub fn idle_needs_privilege() -> Self
An idle scan was asked for without the privilege it needs.
The forged source address can only ride a self-built frame, which needs privilege. There is no fallback, since scanning under this host’s own address defeats an idle scan.
Sourcepub fn routed_range_not_enumerable(range: &Ipv6Range) -> Self
pub fn routed_range_not_enumerable(range: &Ipv6Range) -> Self
A routed IPv6 range with more addresses than any strategy can walk.
See MAX_ENUMERABLE_ADDRESSES
for the ceiling.
Sourcepub fn unprivileged_range_not_enumerable(range: &Ipv6Range) -> Self
pub fn unprivileged_range_not_enumerable(range: &Ipv6Range) -> Self
The same range, refused by an unprivileged scan.
Worded apart from
routed_range_not_enumerable because
the remedy differs: on the local segment, raw sockets reach a range this size
through the all-nodes echo, one packet per /64.
Sourcepub fn link_local_port_target_needs_an_interface(range: &Ipv6Range) -> Self
pub fn link_local_port_target_needs_an_interface(range: &Ipv6Range) -> Self
A port target that is link-local and names no interface.
Every interface holds an fe80::/64, so fe80::1 names a different machine
on each. Written as fe80::1%en0, it names one. The reason suggests the
target with an interface this host has: up, able to broadcast and holding a
link-local address, preferring the default route’s.
RoutedTargets::ambiguous
refuses the same target on the discovery path.
Sourcepub fn link_local_port_target_names_two_segments(range: &Ipv6Range) -> Self
pub fn link_local_port_target_names_two_segments(range: &Ipv6Range) -> Self
One link-local address given on two interfaces in a single scan.
Each is a different machine, but a port scan records verdicts under the address, so both sets of answers would land on one host.
Sourcepub fn local_range_needs_a_sweep(range: &Ipv6Range) -> Self
pub fn local_range_needs_a_sweep(range: &Ipv6Range) -> Self
An on-link IPv6 range too large to walk, in a scan that will not sweep the segment it is on.
A local segment is covered by the all-nodes solicitation, one packet
whatever the prefix length, so the remedy is a sweep. A Scope::Sweep step
sends that packet and refuses nothing.
Walking the range would fail silently: the address count overflows the deadline’s target count, and the sweep stops a couple of thousand solicitations in having reported the range covered.
Trait Implementations§
Source§impl Clone for RefusedStep
impl Clone for RefusedStep
Source§impl Debug for RefusedStep
impl Debug for RefusedStep
Source§impl From<RefusedStep> for Refusal
impl From<RefusedStep> for Refusal
Source§fn from(step: RefusedStep) -> Self
fn from(step: RefusedStep) -> Self
The recorded form of a refusal a plan carries.
One direction only: a recorded refusal keeps the words, not the decision.
Auto Trait Implementations§
impl Freeze for RefusedStep
impl RefUnwindSafe for RefusedStep
impl Send for RefusedStep
impl Sync for RefusedStep
impl Unpin for RefusedStep
impl UnsafeUnpin for RefusedStep
impl UnwindSafe for RefusedStep
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<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