pub struct ListenScope { /* private fields */ }Expand description
What a listening phase reads, and for how long.
A listener is aimed at a link, and cannot narrow what it hears, so the scope controls what may be recorded.
A caller who wants every link names them; see
system::interface for how to find them.
Implementations§
Source§impl ListenScope
impl ListenScope
Sourcepub fn on(links: Vec<Zone>) -> Self
pub fn on(links: Vec<Zone>) -> Self
Listens on links until stopped, recording the machines attached to
them.
A link carries evidence about every remote host its traffic reaches: on a
mirror port, every server a laptop connects to is a real host with an
open port, and on a busy uplink that would be most of the report.
recording_everything records those too.
Sourcepub fn recording_everything(self) -> Self
pub fn recording_everything(self) -> Self
Records every machine heard, wherever it lives.
Shows which machines elsewhere this network depends on, and what they answer. Nothing extra is captured; only what reaches the report changes.
Sourcepub fn recording_only(self, addresses: IpSet) -> Self
pub fn recording_only(self, addresses: IpSet) -> Self
Records findings only about addresses.
Everything on the link is still heard; anything outside addresses is
dropped before it reaches the store.
Sourcepub fn for_at_most(self, span: Duration) -> Self
pub fn for_at_most(self, span: Duration) -> Self
Stops after span.
Trait Implementations§
Source§impl Clone for ListenScope
impl Clone for ListenScope
Auto Trait Implementations§
impl Freeze for ListenScope
impl RefUnwindSafe for ListenScope
impl Send for ListenScope
impl Sync for ListenScope
impl Unpin for ListenScope
impl UnsafeUnpin for ListenScope
impl UnwindSafe for ListenScope
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