pub enum NeighborState {
Down,
Init,
TwoWay,
ExStart,
Exchange,
Loading,
Full,
}Expand description
OSPF neighbor states (RFC 2328 Section 10.1)
Variants§
Down
No information received from neighbor
Init
Hello received, but bidirectionality not established
TwoWay
Bidirectional communication established
ExStart
Master/slave negotiation
Exchange
Database description exchange
Loading
Link state requests being sent
Full
Fully adjacent
Implementations§
Source§impl NeighborState
impl NeighborState
Sourcepub fn on_hello_received(self) -> Self
pub fn on_hello_received(self) -> Self
Transition on receiving a Hello packet
Sourcepub fn on_two_way_received(self) -> Self
pub fn on_two_way_received(self) -> Self
Transition when bidirectionality is confirmed (our router_id seen in neighbor’s Hello)
Sourcepub fn on_adjacency_ok(self) -> Self
pub fn on_adjacency_ok(self) -> Self
Transition to begin adjacency formation (DR/BDR or point-to-point)
Sourcepub fn on_negotiation_done(self) -> Self
pub fn on_negotiation_done(self) -> Self
Transition when negotiation completes
Sourcepub fn on_exchange_done(self) -> Self
pub fn on_exchange_done(self) -> Self
Transition when exchange completes
Sourcepub fn on_loading_done(self) -> Self
pub fn on_loading_done(self) -> Self
Transition when loading completes
Sourcepub fn is_adjacent(&self) -> bool
pub fn is_adjacent(&self) -> bool
Whether this state represents an established adjacency
Trait Implementations§
Source§impl Clone for NeighborState
impl Clone for NeighborState
Source§fn clone(&self) -> NeighborState
fn clone(&self) -> NeighborState
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NeighborState
impl Debug for NeighborState
Source§impl Default for NeighborState
impl Default for NeighborState
Source§fn default() -> NeighborState
fn default() -> NeighborState
Returns the “default value” for a type. Read more
Source§impl Ord for NeighborState
impl Ord for NeighborState
Source§impl PartialEq for NeighborState
impl PartialEq for NeighborState
Source§impl PartialOrd for NeighborState
impl PartialOrd for NeighborState
Source§fn partial_cmp(&self, other: &NeighborState) -> Option<Ordering>
fn partial_cmp(&self, other: &NeighborState) -> Option<Ordering>
impl Copy for NeighborState
impl Eq for NeighborState
impl StructuralPartialEq for NeighborState
Auto Trait Implementations§
impl Freeze for NeighborState
impl RefUnwindSafe for NeighborState
impl Send for NeighborState
impl Sync for NeighborState
impl Unpin for NeighborState
impl UnwindSafe for NeighborState
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)