pub struct DataPlane { /* private fields */ }Expand description
Transforms packets to make tailscale happen.
Implementations§
Source§impl DataPlane
impl DataPlane
Sourcepub fn new(my_key: NodeKeyPair) -> Self
pub fn new(my_key: NodeKeyPair) -> Self
Create a new data plane for a wireguard node key.
The caller must configure overlay/underlay output queues for the data plane to be useful, otherwise all it can do is drop packets.
Sourcepub async fn new_underlay_transport(
&self,
) -> (UnderlayTransportId, DataplaneFromUnderlay, DataplaneToUnderlay)
pub async fn new_underlay_transport( &self, ) -> (UnderlayTransportId, DataplaneFromUnderlay, DataplaneToUnderlay)
Allocate a new underlay transport.
Sourcepub async fn new_overlay_transport(
&self,
) -> (OverlayTransportId, DataplaneToOverlay, DataplaneFromOverlay)
pub async fn new_overlay_transport( &self, ) -> (OverlayTransportId, DataplaneToOverlay, DataplaneFromOverlay)
Allocate a new overlay transport.
Sourcepub async fn run(&self) -> Infallible
pub async fn run(&self) -> Infallible
Run the data plane forever, moving packets from the input queues to output queues.
Sourcepub async fn inner(&self) -> impl DerefMut<Target = DataPlane>
pub async fn inner(&self) -> impl DerefMut<Target = DataPlane>
Get a mutable reference to the inner crate::DataPlane.
Primarily intended for mutating the routing tables.
The returned value is a mutex guard, so limit how long it’s held.
Auto Trait Implementations§
impl !Freeze for DataPlane
impl !RefUnwindSafe for DataPlane
impl !UnwindSafe for DataPlane
impl Send for DataPlane
impl Sync for DataPlane
impl Unpin for DataPlane
impl UnsafeUnpin for DataPlane
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