Skip to main content

HostChange

Enum HostChange 

Source
#[non_exhaustive]
pub enum HostChange { Status(Change<HostStatus>), Hostname(Change<Option<String>>), Names { gained: Vec<HostName>, lost: Vec<HostName>, }, Addresses { gained: Vec<IpAddr>, lost: Vec<IpAddr>, }, Os(Box<Change<Option<OsFingerprint>>>), Macs { gained: Vec<MacAddr>, lost: Vec<MacAddr>, }, Vendor(Change<Option<String>>), Roles { gained: Vec<NetworkRole>, lost: Vec<NetworkRole>, }, Filtering { gained: Vec<Filtering>, lost: Vec<Filtering>, }, IpProtocols { changed: Vec<IpProtocolChange>, }, Findings { appeared: Vec<Finding>, resolved: Vec<Finding>, reassessed: Vec<Reassessment>, }, }
Expand description

Something that moved about a host.

#[non_exhaustive] because new protocols let a scan establish more about a host, and adding a variant should not need a major version.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Status(Change<HostStatus>)

Whether the host answers changed. A host that stopped answering moves to Unknown; only an intermediary saying so produces Down.

§

Hostname(Change<Option<String>>)

The resolved name changed.

§

Names

The names the host gave for itself changed, each list in the model’s order.

Compared only within the protocols the current scan heard names in. A scan that opened no SMB session or read no directory established nothing about those names, so a quick scan against a thorough one does not report them lost. Os follows the same rule.

Fields

§gained: Vec<HostName>

Names the current scan heard and the baseline did not.

§lost: Vec<HostName>

Names the baseline heard, in a protocol the current scan also heard names in, and the current scan did not.

§

Addresses

The addresses the host answers at changed, each list ascending.

Fields

§gained: Vec<IpAddr>

Addresses the current scan found it at and the baseline did not.

§lost: Vec<IpAddr>

Addresses the baseline found it at and the current scan does not.

§

Os(Box<Change<Option<OsFingerprint>>>)

What the host was identified as running changed, or was first identified.

The same system at a different confidence is not a change, and a current scan that identified nothing is not reported, so after is never None.

Boxed because a pair of fingerprints is several times the size of any other variant, and a change list is mostly the other variants.

§

Macs

The hardware addresses the host was seen at changed, each list ascending.

Only a scan that reached the link layer sees these, so both lists are empty when either scan did not.

Fields

§gained: Vec<MacAddr>

Addresses the current scan saw and the baseline did not.

§lost: Vec<MacAddr>

Addresses the baseline saw and the current scan does not.

§

Vendor(Change<Option<String>>)

The hardware vendor the address resolves to changed or was first named. A current scan that named none is not reported, so after is never None.

§

Roles

The roles inferred for the host changed, each list ascending.

Fields

§gained: Vec<NetworkRole>

Roles the current scan inferred and the baseline did not.

§lost: Vec<NetworkRole>

Roles the baseline inferred and the current scan does not.

§

Filtering

What the filter in front of the host was shown to be doing changed, each list ascending.

A verdict about the network path, such as a stateful filter appearing or one that stopped reassembling fragments.

Each conclusion comes from a comparative probe that runs only when asked for, so both lists are empty when characterise was off in either scan.

Fields

§gained: Vec<Filtering>

Conclusions the current scan drew and the baseline did not.

§lost: Vec<Filtering>

Conclusions the baseline drew and the current scan does not.

§

IpProtocols

The IP protocols whose verdict moved, ascending by number.

Only the protocols both scans established something about. One that only one scan asked about is a difference in what was asked, read the same way as PortState::Unasked in port. A scan that named a protocol and never reached it holds IpProtocolState::Unasked for it.

Fields

§changed: Vec<IpProtocolChange>

What moved, ascending by protocol number.

§

Findings

Findings that appeared on the host, findings the current scan stopped claiming, and findings whose severity moved.

Paired by ClaimId, so a detection’s own version bump does not read as one finding going away and another arriving.

Fields

§appeared: Vec<Finding>

Findings the current scan claims and the baseline did not.

§resolved: Vec<Finding>

Findings the baseline claimed and the current scan does not.

§reassessed: Vec<Reassessment>

Findings both scans claim, where the severity moved.

Implementations§

Source§

impl HostChange

Source

pub fn significance(&self) -> Significance

How much this change is worth somebody’s attention.

Matched with no wildcard, so a new kind of change fails to compile here until somebody decides what it is worth.

Trait Implementations§

Source§

impl Clone for HostChange

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 HostChange

Source§

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

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

impl PartialEq for HostChange

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for HostChange

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