Skip to main content

RefusedStep

Struct RefusedStep 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§scanner: ScannerKind

The strategy that would have taken this work.

§reason: String

One 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

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

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.

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.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RefusedStep

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<RefusedStep> for Refusal

Source§

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more