pub struct NetSetup { /* private fields */ }Expand description
Manages proxy NDP entries and routes for gateway virtual IPs.
Implementations§
Source§impl NetSetup
impl NetSetup
Sourcepub fn new(lan_interface: String, pool_cidr: String) -> Self
pub fn new(lan_interface: String, pool_cidr: String) -> Self
Create a new network setup manager.
Sourcepub async fn add_pool_route(&mut self) -> Result<(), Error>
pub async fn add_pool_route(&mut self) -> Result<(), Error>
Add a local route for the virtual IP pool range.
The local route tells the kernel to accept packets destined for
addresses in the pool as locally-owned, enabling NAT processing.
Uses dev lo because local routes don’t need to reference the LAN
interface — the kernel matches on the routing table regardless of
which interface the packet arrives on.
Sourcepub async fn add_proxy_ndp(&mut self, addr: Ipv6Addr) -> Result<(), Error>
pub async fn add_proxy_ndp(&mut self, addr: Ipv6Addr) -> Result<(), Error>
Add a proxy NDP entry for a virtual IP on the LAN interface.
Auto Trait Implementations§
impl Freeze for NetSetup
impl RefUnwindSafe for NetSetup
impl Send for NetSetup
impl Sync for NetSetup
impl Unpin for NetSetup
impl UnsafeUnpin for NetSetup
impl UnwindSafe for NetSetup
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
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>
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 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>
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