⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

RipDaemon

Struct RipDaemon 

Source
pub struct RipDaemon { /* private fields */ }
Expand description

RIP v2 routing daemon

Implementations§

Source§

impl RipDaemon

Source

pub fn new(router_address: Ipv4Address) -> Self

Create a new RIP daemon

Source

pub fn tick(&mut self, ticks: u64)

Advance the tick counter and age routes

Source

pub fn is_update_due(&self) -> bool

Check if periodic update is due

Source

pub fn has_triggered_update(&self) -> bool

Check if a triggered update is pending

Source

pub fn mark_update_sent(&mut self)

Clear triggered update flag and record update time

Source

pub fn add_route(&mut self, route: RipRoute)

Add or update a route

Source

pub fn remove_route( &mut self, destination: Ipv4Address, prefix_len: u8, ) -> Option<RipRoute>

Remove a route by destination

Source

pub fn get_route( &self, destination: Ipv4Address, prefix_len: u8, ) -> Option<&RipRoute>

Get a route by destination

Source

pub fn route_count(&self) -> usize

Get total number of routes

Source

pub fn age_routes(&mut self)

Age routes: mark timed-out routes for garbage collection, remove expired garbage

Source

pub fn process_message(&mut self, msg: &RipMessage, source: Ipv4Address)

Process an incoming RIP message from a neighbor

Source

pub fn generate_response(&self, neighbor: Ipv4Address) -> Vec<RipMessage>

Generate a RIP response message for a neighbor (split horizon with poisoned reverse)

Auto Trait Implementations§

§

impl Freeze for RipDaemon

§

impl RefUnwindSafe for RipDaemon

§

impl Send for RipDaemon

§

impl Sync for RipDaemon

§

impl Unpin for RipDaemon

§

impl UnwindSafe for RipDaemon

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.