pub struct ReceivedNetworkReport {
pub source_mac: MacAddr,
pub source_network: Option<NpduAddress>,
pub report: NetworkReport,
}Expand description
A NetworkReport and where it came from.
Fields§
§source_mac: MacAddrThe link-layer peer that sent it: for an I-Am-Router-To-Network, the router to send through to reach the networks it lists.
source_network: Option<NpduAddress>SNET/SADR, when a router passed the message on from another network, as a reject from a router further along the path is.
report: NetworkReportWhat the message reports.
Implementations§
Source§impl ReceivedNetworkReport
impl ReceivedNetworkReport
Sourcepub fn parse(control: &ReceivedNetworkControl) -> Option<Self>
pub fn parse(control: &ReceivedNetworkControl) -> Option<Self>
Read control as a report, or None for any other message type or
a payload its parser refuses.
- I-Am-Router-To-Network: router-core’s
Networksview. Entries 0 and 0xFFFF name no network a router can reach and are dropped, as router-core’s table drops them (is_reserved); the message is refused only when no other entry is left. - Network-Number-Is:
NumberControl::parse, the reader the local Number controls use, so a routed, unicast or malformed one is ignored here too (Clause 6.4.20). - Reject-Message-To-Network:
RejectMessageToNetwork::decode, exactly three octets.
Sourcepub fn parse_with(
control: &ReceivedNetworkControl,
number: Option<NumberControl>,
) -> Option<Self>
pub fn parse_with( control: &ReceivedNetworkControl, number: Option<NumberControl>, ) -> Option<Self>
Self::parse for a caller that already read control with
NumberControl::parse and passes that result as number, so a
Network-Number-Is is read once.
Trait Implementations§
Source§impl Clone for ReceivedNetworkReport
impl Clone for ReceivedNetworkReport
Source§impl Debug for ReceivedNetworkReport
impl Debug for ReceivedNetworkReport
impl Eq for ReceivedNetworkReport
Source§impl PartialEq for ReceivedNetworkReport
impl PartialEq for ReceivedNetworkReport
impl StructuralPartialEq for ReceivedNetworkReport
Auto Trait Implementations§
impl Freeze for ReceivedNetworkReport
impl RefUnwindSafe for ReceivedNetworkReport
impl Send for ReceivedNetworkReport
impl Sync for ReceivedNetworkReport
impl Unpin for ReceivedNetworkReport
impl UnsafeUnpin for ReceivedNetworkReport
impl UnwindSafe for ReceivedNetworkReport
Blanket Implementations§
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
Mutably borrows from an owned value. Read more