pub struct LinkVxlan;Expand description
Represent VxLAN interface. Example code on creating a VxLAN interface
use rtnetlink::{new_connection, LinkVxlan};
#[tokio::main]
async fn main() -> Result<(), String> {
let (connection, handle, _) = new_connection().unwrap();
tokio::spawn(connection);
handle
.link()
.add(LinkVxlan::new("vxlan100", 100)
.dev(10)
.port(4789)
.up()
.build())
.execute()
.await
.map_err(|e| format!("{e}"))
}Please check LinkMessageBuilder::
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LinkVxlan
impl RefUnwindSafe for LinkVxlan
impl Send for LinkVxlan
impl Sync for LinkVxlan
impl Unpin for LinkVxlan
impl UnwindSafe for LinkVxlan
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